fix(client): Amount calculation for 0 qty debit notes (#34455)

fix(client): Amount calculaton for 0 qty debit notes

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
This commit is contained in:
Deepesh Garg 2023-03-21 15:38:39 +05:30 committed by GitHub
parent 2d19cee713
commit ee6c107d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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