mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 13:09:17 +00:00
fix(regional,italy): autoset company cf, tax_id before validating
This commit is contained in:
@@ -199,6 +199,8 @@ def sales_invoice_validate(doc):
|
|||||||
else:
|
else:
|
||||||
doc.company_fiscal_regime = company_fiscal_regime
|
doc.company_fiscal_regime = company_fiscal_regime
|
||||||
|
|
||||||
|
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 and not doc.company_fiscal_code:
|
||||||
frappe.throw(_("Please set either the Tax ID or Fiscal Code on Company '%s'" % doc.company), title=_("E-Invoicing Information Missing"))
|
frappe.throw(_("Please set either the Tax ID or Fiscal Code on Company '%s'" % doc.company), title=_("E-Invoicing Information Missing"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user