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

This commit is contained in:
Anuja Pawar
2021-10-29 20:52:47 +05:30
committed by GitHub
parent 15e9b5170d
commit 1a6e98ed48
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',