From 678a01d4bda8bdcb3a29fcfc56b461286d647a26 Mon Sep 17 00:00:00 2001 From: marination Date: Tue, 10 May 2022 14:02:43 +0530 Subject: [PATCH] fix: Calculate totals even though pricing rule is not applied on mapped doc - `apply_pricing_rule` is triggered due to change in some data which most likely contributes to Total. (cherry picked from commit 494ddd1eb4926df9e78b2e0cba89e2094d965ecb) --- erpnext/public/js/controllers/transaction.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index fdc129b9116..9d6ef1c868f 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1502,6 +1502,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ // Target doc created from a mapped doc if (this.frm.doc.__onload && this.frm.doc.__onload.ignore_price_list) { + // Calculate totals even though pricing rule is not applied. + // `apply_pricing_rule` is triggered due to change in data which most likely contributes to Total. + if(calculate_taxes_and_totals) me.calculate_taxes_and_totals(); return; }