Skip to content

Commit

Permalink
fix: enclose ternary operator in parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Mar 31, 2023
1 parent f7780cd commit 986daa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/public/js/controllers/taxes_and_totals.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || 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));
}

Expand Down

0 comments on commit 986daa6

Please sign in to comment.