fix: COGS account in purchase receipt
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 9afe365..9272bc4 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -566,10 +566,10 @@
frappe.msgprint(_("Payment Entries {0} are un-linked").format("\n".join(linked_pe)))
@frappe.whitelist()
-def get_company_default(company, fieldname):
- value = frappe.get_cached_value('Company', company, fieldname)
+def get_company_default(company, fieldname, ignore_validation=False):
+ value = frappe.get_cached_value('Company', company, fieldname)
- if not value:
+ if not ignore_validation and not value:
throw(_("Please set default {0} in Company {1}")
.format(frappe.get_meta("Company").get_label(fieldname), company))