style: formate according to Codacy/PR Quality Review

This commit is contained in:
Afshan 2020-06-19 15:10:15 +05:30
parent 6f7652f425
commit 0fe14ce94e

View File

@ -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;