add flt() for None type error (backport #38299) (#38306)

add flt() for None type error (#38299)

(cherry picked from commit 64b44a360af8c2d3a6a9cb99e03358b97cdf9fa5)

Co-authored-by: NandhiniDevi <95607404+Nandhinidevi123@users.noreply.github.com>
This commit is contained in:
mergify[bot] 2023-11-23 22:42:37 +05:30 committed by GitHub
parent 4c9890a24e
commit 30c349b010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -868,7 +868,7 @@ class JournalEntry(AccountsController):
party_account_currency = d.account_currency
elif frappe.get_cached_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
bank_amount += d.debit_in_account_currency or d.credit_in_account_currency
bank_amount += flt(d.debit_in_account_currency) or flt(d.credit_in_account_currency)
bank_account_currency = d.account_currency
if party_type and pay_to_recd_from: