Merge branch 'develop' into handle_rare_cases_of_null_in_outstanding_calculation
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index a03de9e..2608c03 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -1512,9 +1512,12 @@
ref_doc = frappe.get_doc(voucher_type, voucher_no)
# Didn't use db_set for optimisation purpose
- ref_doc.outstanding_amount = outstanding["outstanding_in_account_currency"]
+ ref_doc.outstanding_amount = outstanding["outstanding_in_account_currency"] or 0.0
frappe.db.set_value(
- voucher_type, voucher_no, "outstanding_amount", outstanding["outstanding_in_account_currency"]
+ voucher_type,
+ voucher_no,
+ "outstanding_amount",
+ outstanding["outstanding_in_account_currency"] or 0.0,
)
ref_doc.set_status(update=True)