mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 20:49:19 +00:00
Set Paid amount and write off amount for pos
This commit is contained in:
@@ -182,13 +182,16 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
|
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
|
||||||
// this will make outstanding amount 0
|
// this will make outstanding amount 0
|
||||||
this.frm.set_value("write_off_amount",
|
this.frm.set_value("write_off_amount",
|
||||||
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount), precision("write_off_amount"));
|
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount),
|
||||||
|
precision("write_off_amount"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.calculate_outstanding_amount();
|
||||||
|
this.frm.refresh_fields();
|
||||||
},
|
},
|
||||||
|
|
||||||
write_off_amount: function() {
|
write_off_amount: function() {
|
||||||
this.calculate_outstanding_amount();
|
this.write_off_outstanding_amount_automatically();
|
||||||
this.frm.refresh_fields();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
paid_amount: function() {
|
paid_amount: function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user