Skip to content

Commit

Permalink
fix: precision for invoice outstandings (#38323)
Browse files Browse the repository at this point in the history
fix: precision while setting inv outstanding
  • Loading branch information
GursheenK committed Nov 26, 2023
1 parent 095d99d commit 190f77a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions erpnext/accounts/doctype/gl_entry/gl_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 190f77a

Please sign in to comment.