fix: wrong round off and rounded total

(cherry picked from commit 3a487bd33a)
This commit is contained in:
Dany Robert
2023-11-18 13:32:04 +00:00
committed by Mergify
parent d0ae566e38
commit 70eccf7da0
2 changed files with 4 additions and 0 deletions

View File

@@ -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()