mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-13 01:34:10 +00:00
Merge pull request #46447 from frappe/mergify/bp/version-15-hotfix/pr-46344
fix: make 'company_tax_id' and 'company_fiscal_code' as mandatory (backport #46344)
This commit is contained in:
@@ -261,12 +261,11 @@ def sales_invoice_validate(doc):
|
||||
|
||||
doc.company_tax_id = frappe.get_cached_value("Company", doc.company, "tax_id")
|
||||
doc.company_fiscal_code = frappe.get_cached_value("Company", doc.company, "fiscal_code")
|
||||
if not doc.company_tax_id and not doc.company_fiscal_code:
|
||||
if not doc.company_tax_id or not doc.company_fiscal_code:
|
||||
frappe.throw(
|
||||
_("Please set either the Tax ID or Fiscal Code on Company '%s'" % doc.company),
|
||||
_("Please set both the Tax ID and Fiscal Code on Company {0}").format(doc.company),
|
||||
title=_("E-Invoicing Information Missing"),
|
||||
)
|
||||
|
||||
# Validate customer details
|
||||
customer = frappe.get_doc("Customer", doc.customer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user