Merge pull request #34679 from ruthra-kumar/fix_credit_note_with_positive_total

fix: enclose ternary operator in parentheses
This commit is contained in:
ruthra kumar
2023-03-31 13:31:16 +05:30
committed by GitHub

View File

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