fix: closing amount reset to expected amount on save (#43358)

This commit is contained in:
jabir-elat
2024-09-24 16:04:30 +05:30
committed by GitHub
parent 59071f1cd4
commit 9974b7c4ae

View File

@@ -194,7 +194,9 @@ function refresh_payments(d, frm) {
}
if (payment) {
payment.expected_amount += flt(p.amount);
payment.closing_amount = payment.expected_amount;
if (payment.closing_amount === 0) {
payment.closing_amount = payment.expected_amount;
}
payment.difference = payment.closing_amount - payment.expected_amount;
} else {
frm.add_child("payment_reconciliation", {