mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-30 23:18:02 +00:00
Merge branch 'develop' of https://github.com/frappe/erpnext into deferred_revenue_default_account_fixes
This commit is contained in:
@@ -330,7 +330,6 @@ def make_return_doc(doctype, source_name, target_doc=None):
|
||||
doc = frappe.get_doc(target)
|
||||
doc.is_return = 1
|
||||
doc.return_against = source.name
|
||||
doc.ignore_pricing_rule = 1
|
||||
doc.set_warehouse = ""
|
||||
if doctype == "Sales Invoice" or doctype == "POS Invoice":
|
||||
doc.is_pos = source.is_pos
|
||||
|
||||
@@ -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.get("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)
|
||||
|
||||
Reference in New Issue
Block a user