From 19dda807d1a63034dfc217a5adfee7af6580cf18 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 21 Mar 2023 16:06:10 +0530 Subject: [PATCH] fix(client): Amount calculation for 0 qty debit notes (#34455) fix(client): Amount calculation for 0 qty debit notes (#34455) fix(client): Amount calculaton for 0 qty debit notes Co-authored-by: Anand Baburajan (cherry picked from commit ee6c107d588ca30e909d9add4a026755eda722de) Co-authored-by: Deepesh Garg --- 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 79196c976f8..7b64087102f 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -125,7 +125,7 @@ erpnext.taxes_and_totals = erpnext.payments.extend({ } else { // allow for '0' qty on Credit/Debit notes - let qty = item.qty || -1 + let qty = item.qty || me.frm.doc.is_debit_note ? 1 : -1; item.net_amount = item.amount = flt(item.rate * qty, precision("amount", item)); }