fix: apply grand total to default payment mode in Sales and POS invoices

This commit is contained in:
diptanilsaha
2025-08-18 13:23:23 +05:30
parent 4378be45e4
commit 9aa7f87a27
6 changed files with 24 additions and 15 deletions

View File

@@ -450,7 +450,6 @@ erpnext.PointOfSale.Payment = class {
}
render_payment_section() {
this.grand_total_to_default_mop();
this.render_payment_mode_dom();
this.make_invoice_field_dialog();
this.update_totals_section();
@@ -498,17 +497,6 @@ erpnext.PointOfSale.Payment = class {
}
}
grand_total_to_default_mop() {
if (this.set_gt_to_default_mop) return;
const doc = this.events.get_frm().doc;
const payments = doc.payments;
payments.forEach((p) => {
if (p.default) {
frappe.model.set_value(p.doctype, p.name, "amount", 0);
}
});
}
render_payment_mode_dom() {
const doc = this.events.get_frm().doc;
const payments = doc.payments;