Merge pull request #41269 from frappe/mergify/bp/version-14-hotfix/pr-41268

fix: validation to prevent overallocation (backport #41268)
This commit is contained in:
ruthra kumar
2024-04-30 18:40:47 +05:30
committed by GitHub

View File

@@ -479,6 +479,11 @@ def reconcile_against_document(
# re-submit advance entry
doc = frappe.get_doc(entry.voucher_type, entry.voucher_no)
gl_map = doc.build_gl_map()
from erpnext.accounts.general_ledger import process_debit_credit_difference
# Make sure there is no overallocation
process_debit_credit_difference(gl_map)
create_payment_ledger_entry(gl_map, update_outstanding="No", cancel=0, adv_adj=1)
# Only update outstanding for newly linked vouchers