From ee6c107d588ca30e909d9add4a026755eda722de Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 21 Mar 2023 15:38:39 +0530 Subject: [PATCH] fix(client): Amount calculation for 0 qty debit notes (#34455) fix(client): Amount calculaton for 0 qty debit notes Co-authored-by: Anand Baburajan --- 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 d1a55e6f42..8e57ebd367 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -135,7 +135,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { } 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)); }