From 09536f402e46dc023126726325c945628ad016b3 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 20 May 2019 17:01:22 +0530 Subject: [PATCH] fix: payment reconciliation not update the status of the expense claim --- erpnext/accounts/utils.py | 3 +++ .../expense_claim/expense_claim_dashboard.py | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index e9ae6ee21ac..120bfe2489d 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -333,6 +333,9 @@ def reconcile_against_document(args): doc = frappe.get_doc(d.voucher_type, d.voucher_no) doc.make_gl_entries(cancel = 0, adv_adj =1) + if d.voucher_type == 'Payment Entry': + doc.update_expense_claim() + def check_if_advance_entry_modified(args): """ check if there is already a voucher reference diff --git a/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py b/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py new file mode 100644 index 00000000000..d27245f944e --- /dev/null +++ b/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py @@ -0,0 +1,13 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return { + 'fieldname': 'reference_name', + 'transactions': [ + { + 'label': _('Payment'), + 'items': ['Payment Entry'] + }, + ] + } \ No newline at end of file