From 5207d1205ec8fa7d6dbe882ded57515ebd221644 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 29 Apr 2015 15:38:00 +0530 Subject: [PATCH] minor issue fixed for precision --- erpnext/public/js/controllers/taxes_and_totals.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index d39cc1ac68..6acf64cc3d 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -335,9 +335,9 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({ var diff = me.frm.doc.net_total - flt(last_tax.total / me.frm.doc.conversion_rate, precision("grand_total")); - if ( diff && Math.abs(diff) <= (2.0 / Math.pow(10, last_tax.precision("tax_amount"))) ) { + if ( diff && Math.abs(diff) <= (2.0 / Math.pow(10, precision("tax_amount", last_tax))) ) { var adjustment_amount = flt(diff * me.frm.doc.conversion_rate, - last_tax.precision("tax_amount")); + precision("tax_amount", last_tax)); last_tax.tax_amount += adjustment_amount; last_tax.tax_amount_after_discount += adjustment_amount; last_tax.total += adjustment_amount;