mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 09:54:47 +00:00
fix: Rounding adjustment while additional discount amount is aplied on grand total
This commit is contained in:
@@ -515,7 +515,7 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
|||||||
net_total += item.net_amount;
|
net_total += item.net_amount;
|
||||||
|
|
||||||
// discount amount rounding loss adjustment if no taxes
|
// discount amount rounding loss adjustment if no taxes
|
||||||
if ((!(me.frm.doc.taxes || []).length || (me.frm.doc.apply_discount_on == "Net Total"))
|
if ((!(me.frm.doc.taxes || []).length || total_for_discount_amount==me.frm.doc.net_total || (me.frm.doc.apply_discount_on == "Net Total"))
|
||||||
&& i == (me.frm.doc.items || []).length - 1) {
|
&& i == (me.frm.doc.items || []).length - 1) {
|
||||||
var discount_amount_loss = flt(me.frm.doc.net_total - net_total
|
var discount_amount_loss = flt(me.frm.doc.net_total - net_total
|
||||||
- me.frm.doc.discount_amount, precision("net_total"));
|
- me.frm.doc.discount_amount, precision("net_total"));
|
||||||
|
|||||||
Reference in New Issue
Block a user