From c2e5e569a0d63b5542d0d5326947bec120e17657 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 27 Jun 2019 11:15:18 +0530 Subject: [PATCH] fix: same taxes adding multiple times in pos --- erpnext/public/js/controllers/transaction.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index d0ebce8c429..79119b262ca 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1290,10 +1290,13 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ }, callback: function(r) { if(!r.exc) { - for (let tax of r.message) { - me.frm.add_child("taxes", tax); + me.frm.set_value("taxes", r.message); + + if(me.frm.doc.shipping_rule) { + me.frm.script_manager.trigger("shipping_rule"); + } else { + me.calculate_taxes_and_totals(); } - me.calculate_taxes_and_totals(); } } });