fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch

This commit is contained in:
Mihir Kandoi
2025-03-06 13:11:31 +05:30
parent 0492b941ff
commit 95d1976931

View File

@@ -7,6 +7,9 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incom
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"):
table = frappe.qb.DocType("Purchase Receipt Item")
parent = frappe.qb.DocType("Purchase Receipt")