fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch
(cherry picked from commit 95d1976931)
# Conflicts:
# erpnext/patches/v15_0/recalculate_amount_difference_field.py
This commit is contained in:
@@ -7,6 +7,7 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incom
|
||||
|
||||
|
||||
def execute():
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
table = frappe.qb.DocType("Purchase Receipt Item")
|
||||
parent = frappe.qb.DocType("Purchase Receipt")
|
||||
@@ -52,6 +53,11 @@ def execute():
|
||||
adjusted_amt * flt(item.conversion_rate),
|
||||
precision,
|
||||
=======
|
||||
=======
|
||||
if not frappe.db.get_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate"):
|
||||
return
|
||||
|
||||
>>>>>>> 95d1976931 (fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch)
|
||||
for company in frappe.get_all("Company", pluck="name"):
|
||||
table = frappe.qb.DocType("Purchase Receipt Item")
|
||||
parent = frappe.qb.DocType("Purchase Receipt")
|
||||
|
||||
Reference in New Issue
Block a user