fix: precision for invoice outstandings (#38323)
fix: precision while setting inv outstanding
This commit is contained in:
committed by
GitHub
parent
095d99dbd2
commit
190f77abff
@@ -358,6 +358,7 @@ def update_outstanding_amt(
|
||||
if against_voucher_type in ["Sales Invoice", "Purchase Invoice", "Fees"]:
|
||||
ref_doc = frappe.get_doc(against_voucher_type, against_voucher)
|
||||
|
||||
bal = flt(bal, frappe.get_precision(against_voucher_type, "outstanding_amount"))
|
||||
# Didn't use db_set for optimization purpose
|
||||
ref_doc.outstanding_amount = bal
|
||||
frappe.db.set_value(against_voucher_type, against_voucher, "outstanding_amount", bal)
|
||||
|
||||
Reference in New Issue
Block a user