From 198830a6c80463554d5fb2e7d4e4455c1d0cc612 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 31 Mar 2023 12:09:57 +0530 Subject: [PATCH] fix: enclose ternary operator in parentheses (cherry picked from commit 986daa65784fde3a2334599b58be222f030d79f6) --- 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 7b64087102fd..7ea12a86b8a4 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 || me.frm.doc.is_debit_note ? 1 : -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)); }