[fix] Total Amount in Journal Entry
This commit is contained in:
parent
c978b9c36a
commit
77532cc8db
@ -351,6 +351,7 @@ class JournalEntry(AccountsController):
|
||||
def set_print_format_fields(self):
|
||||
total_amount = 0.0
|
||||
bank_account_currency = None
|
||||
self.pay_to_recd_from = None
|
||||
for d in self.get('accounts'):
|
||||
if d.party_type and d.party:
|
||||
if not self.pay_to_recd_from:
|
||||
@ -360,7 +361,10 @@ class JournalEntry(AccountsController):
|
||||
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
|
||||
total_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
|
||||
bank_account_currency = d.account_currency
|
||||
|
||||
|
||||
if not self.pay_to_recd_from:
|
||||
total_amount = 0
|
||||
|
||||
self.set_total_amount(total_amount, bank_account_currency)
|
||||
|
||||
def set_total_amount(self, amt, currency):
|
||||
|
Loading…
x
Reference in New Issue
Block a user