fix: IntegrityError while cancelling journals against cr note
This commit is contained in:
parent
a0eb5e5535
commit
b9a7ff7c3d
@ -1512,9 +1512,12 @@ def update_voucher_outstanding(voucher_type, voucher_no, account, party_type, pa
|
|||||||
ref_doc = frappe.get_doc(voucher_type, voucher_no)
|
ref_doc = frappe.get_doc(voucher_type, voucher_no)
|
||||||
|
|
||||||
# Didn't use db_set for optimisation purpose
|
# 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(
|
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)
|
ref_doc.set_status(update=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user