fix: update payment amount for partial pos return
(cherry picked from commit 53ef6336b6)
Co-authored-by: Kavin <78342682+kavin0411@users.noreply.github.com>
This commit is contained in:
@@ -828,13 +828,13 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
|
||||
);
|
||||
}
|
||||
|
||||
if(!this.frm.doc.is_return){
|
||||
this.frm.doc.payments.find(payment => {
|
||||
if (payment.default) {
|
||||
payment.amount = total_amount_to_pay;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.frm.doc.payments.find(payment => {
|
||||
if (payment.default) {
|
||||
payment.amount = total_amount_to_pay;
|
||||
} else {
|
||||
payment.amount = 0
|
||||
}
|
||||
});
|
||||
|
||||
this.frm.refresh_fields();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user