From 404f39d3737263e076b64d26dfba79a5506fe939 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 14 May 2018 15:46:45 +0530 Subject: [PATCH] [fix] apply price list in_apply_price_list flag remains true if server exception occurs --- erpnext/public/js/controllers/transaction.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 4ab413b321..d9bd50c226 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -106,7 +106,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ } if( - this.frm.docstatus < 2 + this.frm.docstatus < 2 && this.frm.fields_dict["payment_terms_template"] && this.frm.fields_dict["payment_schedule"] && this.frm.doc.payment_terms_template @@ -1094,6 +1094,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ me.in_apply_price_list = false; } } + }).always(() => { + me.in_apply_price_list = false; }); },