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

This commit is contained in:
Subin Tom 2021-11-10 15:57:41 +05:30
parent c78b8b7897
commit 18ae03d967

View File

@ -259,6 +259,10 @@ class calculate_taxes_and_totals(object):
self.doc.round_floats_in(self.doc, ["total", "base_total", "net_total", "base_net_total"]) 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): def calculate_taxes(self):
self.doc.rounding_adjustment = 0 self.doc.rounding_adjustment = 0
# maintain actual tax rate based on idx # maintain actual tax rate based on idx