fix: calculate outstanding amount on reconcile correctly

This commit is contained in:
Gursheen Anand
2023-06-13 15:00:46 +05:30
parent 5e9821dce2
commit 17341adf1c
8 changed files with 85 additions and 72 deletions

View File

@@ -472,7 +472,7 @@ def reconcile_against_document(args, skip_ref_details_update_for_pe=False): # n
doc.save(ignore_permissions=True)
# re-submit advance entry
doc = frappe.get_doc(entry.voucher_type, entry.voucher_no)
gl_map = doc.build_gl_map()
gl_map = doc.build_gl_map(is_reconcile=True)
create_payment_ledger_entry(gl_map, update_outstanding="No", cancel=0, adv_adj=1)
# Only update outstanding for newly linked vouchers