Merge pull request #41270 from frappe/mergify/bp/version-15-hotfix/pr-41268
fix: validation to prevent overallocation (backport #41268)
This commit is contained in:
@@ -516,6 +516,10 @@ def reconcile_against_document(
|
|||||||
doc.make_advance_gl_entries()
|
doc.make_advance_gl_entries()
|
||||||
else:
|
else:
|
||||||
gl_map = doc.build_gl_map()
|
gl_map = doc.build_gl_map()
|
||||||
|
# Make sure there is no overallocation
|
||||||
|
from erpnext.accounts.general_ledger import process_debit_credit_difference
|
||||||
|
|
||||||
|
process_debit_credit_difference(gl_map)
|
||||||
create_payment_ledger_entry(gl_map, update_outstanding="No", cancel=0, adv_adj=1)
|
create_payment_ledger_entry(gl_map, update_outstanding="No", cancel=0, adv_adj=1)
|
||||||
|
|
||||||
# Only update outstanding for newly linked vouchers
|
# Only update outstanding for newly linked vouchers
|
||||||
|
|||||||
Reference in New Issue
Block a user