fix: wrong round off and rounded total
This commit is contained in:
parent
ee29526bbe
commit
3a487bd33a
@ -54,6 +54,7 @@ class calculate_taxes_and_totals(object):
|
||||
if self.doc.apply_discount_on == "Grand Total" and self.doc.get("is_cash_or_non_trade_discount"):
|
||||
self.doc.grand_total -= self.doc.discount_amount
|
||||
self.doc.base_grand_total -= self.doc.base_discount_amount
|
||||
self.doc.rounding_adjustment = self.doc.base_rounding_adjustment = 0.0
|
||||
self.set_rounded_total()
|
||||
|
||||
self.calculate_shipping_charges()
|
||||
|
@ -43,6 +43,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
|
||||
if (this.frm.doc.apply_discount_on == "Grand Total" && this.frm.doc.is_cash_or_non_trade_discount) {
|
||||
this.frm.doc.grand_total -= this.frm.doc.discount_amount;
|
||||
this.frm.doc.base_grand_total -= this.frm.doc.base_discount_amount;
|
||||
this.frm.doc.rounding_adjustment = 0;
|
||||
this.frm.doc.base_rounding_adjustment = 0;
|
||||
this.set_rounded_total();
|
||||
}
|
||||
|
||||
await this.calculate_shipping_charges();
|
||||
|
Loading…
x
Reference in New Issue
Block a user