fix: Rounded total for cash and non trade discount invoices

(cherry picked from commit 318da16b99)
This commit is contained in:
Deepesh Garg
2022-08-29 14:18:39 +05:30
committed by Mergify
parent 11657effa5
commit 6c4fcd80c6

View File

@@ -41,6 +41,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.set_rounded_total()
self.calculate_shipping_charges()