[fixes] fix perpetual inventory

This commit is contained in:
Saurabh
2016-03-18 14:40:03 +05:30
committed by Nabin Hait
parent bd5fc8ecbe
commit 4bd34a58ba
7 changed files with 139 additions and 188 deletions

View File

@@ -519,7 +519,7 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
if(this.frm.doc.doctype == "Sales Invoice" || this.frm.doc.doctype == "Purchase Invoice") {
frappe.model.round_floats_in(this.frm.doc, ["paid_amount"]);
if(this.frm.doc.is_pos || this.frm.doc.is_cash) {
if(this.frm.doc.is_pos || this.frm.doc.is_paid) {
if(!this.frm.doc.paid_amount || update_paid_amount===undefined || update_paid_amount) {
this.frm.doc.paid_amount = flt(total_amount_to_pay);
}