From cc2771baa79e1bf6bf0909a03cc2feeeca0620ea Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Mon, 2 Mar 2020 18:09:19 +0530 Subject: [PATCH] fix: Total amount not displayed in Journal Entry (#20794) * fix: Total amount not displayed in Journal Entry * fix: Update paid_to_received field * fix: set total amount Co-authored-by: Nabin Hait --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 4491f7a225..2cbd40b70d 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -457,8 +457,7 @@ class JournalEntry(AccountsController): for d in self.get('accounts'): if d.party_type in ['Customer', 'Supplier'] and d.party: if not pay_to_recd_from: - pay_to_recd_from = frappe.db.get_value(d.party_type, d.party, - "customer_name" if d.party_type=="Customer" else "supplier_name") + pay_to_recd_from = d.party if pay_to_recd_from and pay_to_recd_from == d.party: party_amount += (d.debit_in_account_currency or d.credit_in_account_currency) @@ -469,7 +468,8 @@ class JournalEntry(AccountsController): bank_account_currency = d.account_currency if pay_to_recd_from: - self.pay_to_recd_from = pay_to_recd_from + self.pay_to_recd_from = frappe.db.get_value(d.party_type, pay_to_recd_from, + "customer_name" if d.party_type=="Customer" else "supplier_name") if bank_amount: total_amount = bank_amount currency = bank_account_currency