fix(Payment Reconciliation): clear child tables on company/party change (#28153)

This commit is contained in:
mergify[bot]
2021-11-02 17:10:27 +05:30
committed by GitHub
parent 27570db761
commit 0a608911f1
2 changed files with 70 additions and 65 deletions

View File

@@ -450,7 +450,8 @@ def update_reference_in_journal_entry(d, journal_entry, do_not_save=False):
# new row with references
new_row = journal_entry.append("accounts")
new_row.update(jv_detail.as_dict().copy())
new_row.update((frappe.copy_doc(jv_detail)).as_dict())
new_row.set(d["dr_or_cr"], d["allocated_amount"])
new_row.set('debit' if d['dr_or_cr'] == 'debit_in_account_currency' else 'credit',