mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch
This commit is contained in:
@@ -7,6 +7,9 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incom
|
|||||||
|
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
if not frappe.db.get_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate"):
|
||||||
|
return
|
||||||
|
|
||||||
for company in frappe.get_all("Company", pluck="name"):
|
for company in frappe.get_all("Company", pluck="name"):
|
||||||
table = frappe.qb.DocType("Purchase Receipt Item")
|
table = frappe.qb.DocType("Purchase Receipt Item")
|
||||||
parent = frappe.qb.DocType("Purchase Receipt")
|
parent = frappe.qb.DocType("Purchase Receipt")
|
||||||
|
|||||||
Reference in New Issue
Block a user