fix: calling shipping rule method during net_total calculation in taxes_adn_totals.py

(cherry picked from commit 18ae03d967)
This commit is contained in:
Subin Tom
2021-11-10 15:57:41 +05:30
committed by mergify-bot
parent e65a720810
commit e6d0103cf3

View File

@@ -258,6 +258,10 @@ class calculate_taxes_and_totals(object):
self.doc.round_floats_in(self.doc, ["total", "base_total", "net_total", "base_net_total"])
if hasattr(self.doc, "shipping_rule"):
shipping_rule = frappe.get_doc("Shipping Rule", self.doc.shipping_rule)
shipping_rule.apply(self.doc)
def calculate_taxes(self):
if not self.doc.get('is_consolidated'):
self.doc.rounding_adjustment = 0