Merge pull request #17700 from rohitwaghchaure/italian_localization_issue_for_invoices_develop
fix: removed translation for customer type and tax charge type
This commit is contained in:
commit
0432d3844b
@ -75,7 +75,7 @@ def prepare_invoice(invoice, progressive_number):
|
|||||||
invoice.tax_data = tax_data
|
invoice.tax_data = tax_data
|
||||||
|
|
||||||
#Check if stamp duty (Bollo) of 2 EUR exists.
|
#Check if stamp duty (Bollo) of 2 EUR exists.
|
||||||
stamp_duty_charge_row = next((tax for tax in invoice.taxes if tax.charge_type == _("Actual") and tax.tax_amount == 2.0 ), None)
|
stamp_duty_charge_row = next((tax for tax in invoice.taxes if tax.charge_type == "Actual" and tax.tax_amount == 2.0 ), None)
|
||||||
if stamp_duty_charge_row:
|
if stamp_duty_charge_row:
|
||||||
invoice.stamp_duty = stamp_duty_charge_row.tax_amount
|
invoice.stamp_duty = stamp_duty_charge_row.tax_amount
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ def sales_invoice_validate(doc):
|
|||||||
#Validate customer details
|
#Validate customer details
|
||||||
customer = frappe.get_doc("Customer", doc.customer)
|
customer = frappe.get_doc("Customer", doc.customer)
|
||||||
|
|
||||||
if customer.customer_type == _("Individual"):
|
if customer.customer_type == "Individual":
|
||||||
doc.customer_fiscal_code = customer.fiscal_code
|
doc.customer_fiscal_code = customer.fiscal_code
|
||||||
if not doc.customer_fiscal_code:
|
if not doc.customer_fiscal_code:
|
||||||
frappe.throw(_("Please set Fiscal Code for the customer '%s'" % doc.customer), title=_("E-Invoicing Information Missing"))
|
frappe.throw(_("Please set Fiscal Code for the customer '%s'" % doc.customer), title=_("E-Invoicing Information Missing"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user