mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix: Rounding adjustment while additional discount amount is aplied on grand total
This commit is contained in:
@@ -397,7 +397,7 @@ class calculate_taxes_and_totals(object):
|
|||||||
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 (not taxes or self.doc.apply_discount_on == "Net Total") \
|
if (self.doc.apply_discount_on == "Net Total" or not taxes or total_for_discount_amount==self.doc.net_total) \
|
||||||
and i == len(self.doc.get("items")) - 1:
|
and i == len(self.doc.get("items")) - 1:
|
||||||
discount_amount_loss = flt(self.doc.net_total - net_total - self.doc.discount_amount,
|
discount_amount_loss = flt(self.doc.net_total - net_total - self.doc.discount_amount,
|
||||||
self.doc.precision("net_total"))
|
self.doc.precision("net_total"))
|
||||||
|
|||||||
Reference in New Issue
Block a user