diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 6b8dc2804f..a449bdcca6 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -337,9 +337,9 @@ erpnext.taxes_and_totals = erpnext.payments.extend({ // To set row_id by default as previous row. if(["On Previous Row Amount", "On Previous Row Total"].includes(tax.charge_type)) { - if (tax.idx == 1) { - frappe.throw( - __("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")) + if (tax.idx === 1) { + frappe.throw( + __("Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); } if (!tax.row_id) { tax.row_id = tax.idx - 1;