From e7d707797aeab2f5d209690c959e88851c9a6999 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sat, 2 Mar 2024 16:44:07 +0530 Subject: [PATCH] fix: rate change on changing of the qty (#40241) --- erpnext/public/js/controllers/taxes_and_totals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index bd5a136a15..30991846c4 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -22,7 +22,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { item_rate = flt(item.rate_with_margin , precision("rate", item)); - if (item.discount_percentage) { + if (item.discount_percentage && !item.discount_amount) { item.discount_amount = flt(item.rate_with_margin) * flt(item.discount_percentage) / 100; }