From 482ffac83f4da79c037bdaa293ce7457143c12ad Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 13 Mar 2014 16:32:43 +0530 Subject: [PATCH] Set paid amount to zero if not pos --- erpnext/selling/sales_common.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index 74b9bb9228..d2eab6888e 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -407,6 +407,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ "paid_amount"]); var total_amount_to_pay = this.frm.doc.grand_total - this.frm.doc.write_off_amount - this.frm.doc.total_advance; + this.frm.doc.paid_amount = (this.frm.doc.is_pos && !this.frm.doc.paid_amount) ? flt(total_amount_to_pay): 0.0; this.frm.set_value("outstanding_amount", flt(total_amount_to_pay