From 221dec8cac99dfcc58c0346cee68eae282d980ef Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 3 Jun 2014 14:12:49 +0530 Subject: [PATCH] transaction.js: calculate only if one entry in table --- erpnext/public/js/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js index c086aedcf52..a1d9f388ffb 100644 --- a/erpnext/public/js/transaction.js +++ b/erpnext/public/js/transaction.js @@ -38,7 +38,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ onload_post_render: function() { var me = this; - if(this.frm.doc.__islocal && this.frm.doc.company && !this.frm.doc.is_pos) { + if(this.frm.doc.__islocal && this.frm.doc.company && this.frm.doc[this.fname] && !this.frm.doc.is_pos) { this.calculate_taxes_and_totals(); } if(frappe.meta.get_docfield(this.tname, "item_code")) {