fix: on unreconciliation, update advance paid

(cherry picked from commit c9e2f03a3a)
This commit is contained in:
ruthra kumar 2024-02-26 17:08:56 +05:30 committed by Mergify
parent ad53633c66
commit 4d1f56c4bd

View File

@ -82,6 +82,11 @@ class UnreconcilePayment(Document):
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)