mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 00:25:01 +00:00
chore: consider currency precision
This commit is contained in:
@@ -48,6 +48,7 @@ class BankClearance(Document):
|
||||
entries = []
|
||||
|
||||
# get entries from all the apps
|
||||
precision = cint(frappe.db.get_default("currency_precision")) or 2
|
||||
for method_name in frappe.get_hooks("get_payment_entries_for_bank_clearance"):
|
||||
entries += (
|
||||
frappe.get_attr(method_name)(
|
||||
@@ -76,8 +77,8 @@ class BankClearance(Document):
|
||||
|
||||
if not d.get("account_currency"):
|
||||
d.account_currency = default_currency
|
||||
|
||||
formatted_amount = fmt_money(abs(amount), 2, d.account_currency)
|
||||
|
||||
formatted_amount = fmt_money(abs(amount), precision, d.account_currency)
|
||||
d.amount = formatted_amount + " " + (_("Dr") if amount > 0 else _("Cr"))
|
||||
d.posting_date = getdate(d.posting_date)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user