fix: Do not apply shipping rule for POS transactions

(cherry picked from commit c0ebcfb393)

# Conflicts:
#	erpnext/public/js/controllers/taxes_and_totals.js
This commit is contained in:
Deepesh Garg
2022-04-04 20:05:10 +05:30
committed by mergify-bot
parent ff7d81020c
commit 714fc08150
2 changed files with 14 additions and 0 deletions

View File

@@ -307,6 +307,11 @@ class calculate_taxes_and_totals(object):
self.doc.round_floats_in(self.doc, ["total", "base_total", "net_total", "base_net_total"])
def calculate_shipping_charges(self):
# Do not apply shipping rule for POS
if self.doc.is_pos:
return
if hasattr(self.doc, "shipping_rule") and self.doc.shipping_rule:
shipping_rule = frappe.get_doc("Shipping Rule", self.doc.shipping_rule)
shipping_rule.apply(self.doc)