mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-01 17:45:56 +00:00
[sales common] [fix] calculate outstanding amount only for docstatus=0 on client side
This commit is contained in:
@@ -397,7 +397,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
// NOTE:
|
||||
// write_off_amount is only for POS Invoice
|
||||
// total_advance is only for non POS Invoice
|
||||
if(this.frm.doc.doctype == "Sales Invoice" && this.frm.doc.docstatus < 2) {
|
||||
if(this.frm.doc.doctype == "Sales Invoice" && this.frm.doc.docstatus==0) {
|
||||
wn.model.round_floats_in(this.frm.doc, ["grand_total", "total_advance", "write_off_amount",
|
||||
"paid_amount"]);
|
||||
var total_amount_to_pay = this.frm.doc.grand_total - this.frm.doc.write_off_amount;
|
||||
|
||||
Reference in New Issue
Block a user