Merge pull request #34246 from frappe/mergify/bp/version-13-hotfix/pr-34241

fix: pos return throwing amount greater than grand total (backport #34241)
This commit is contained in:
ruthra kumar
2023-02-28 18:33:47 +05:30
committed by GitHub

View File

@@ -124,8 +124,8 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
item.net_amount = item.amount = flt(item.rate * item.qty, precision("amount", item));
}
else {
let qty = item.qty || 1;
qty = me.frm.doc.is_return ? -1 * qty : qty;
// allow for '0' qty on Credit/Debit notes
let qty = item.qty || -1
item.net_amount = item.amount = flt(item.rate * qty, precision("amount", item));
}