From f6607a60501297dca70322cbe0d375323fba3fc4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 28 Feb 2023 12:05:10 +0530 Subject: [PATCH] fix: pos return throwing amount greater than grand total (cherry picked from commit 35c70f39fa28860b6c22dc3091eadb79c727a4de) --- erpnext/public/js/controllers/taxes_and_totals.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index be4eab03386..79196c976f8 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -124,8 +124,8 @@ erpnext.taxes_and_totals = erpnext.payments.extend({ item.net_amount = item.amount = flt(item.rate * item.qty, precision("amount", item)); } else { - let qty = item.qty || 1; - qty = me.frm.doc.is_return ? -1 * qty : qty; + // allow for '0' qty on Credit/Debit notes + let qty = item.qty || -1 item.net_amount = item.amount = flt(item.rate * qty, precision("amount", item)); }