From 4d1f56c4bd92b9dd54c2dec7da00882ce3ec6ad0 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 26 Feb 2024 17:08:56 +0530 Subject: [PATCH] fix: on unreconciliation, update advance paid (cherry picked from commit c9e2f03a3a30a382c0fdb2c065e77f43fed2ced3) --- .../doctype/unreconcile_payment/unreconcile_payment.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py index e258a73d4dc2..c3eaea37e7aa 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py @@ -82,6 +82,11 @@ def on_submit(self): update_voucher_outstanding( alloc.reference_doctype, alloc.reference_name, alloc.account, alloc.party_type, alloc.party ) + if doc.doctype in frappe.get_hooks("advance_payment_payable_doctypes") + frappe.get_hooks( + "advance_payment_receivable_doctypes" + ): + doc.set_total_advance_paid() + frappe.db.set_value("Unreconcile Payment Entries", alloc.name, "unlinked", True)