From 1d04ea121239f86810bb2398f158968c266d3e0e Mon Sep 17 00:00:00 2001 From: Himanshu Warekar Date: Fri, 22 Mar 2019 17:47:57 +0530 Subject: [PATCH 1/2] fix: include fiscal code in invoice xml if present --- erpnext/regional/italy/e-invoice.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/regional/italy/e-invoice.xml b/erpnext/regional/italy/e-invoice.xml index c886ee9aa8e..c789808faba 100644 --- a/erpnext/regional/italy/e-invoice.xml +++ b/erpnext/regional/italy/e-invoice.xml @@ -95,14 +95,13 @@ {{ doc.customer_data.last_name }} {%- else %} - {%- if doc.customer_data.is_public_administration %} - {{ doc.customer_data.fiscal_code }} - {%- else %} + {%- if doc.customer_data.fiscal_code %} + {{ doc.customer_data.fiscal_code }} + {%- endif %} {{ doc.customer_address_data.country_code }} {{ doc.tax_id | replace("IT","") }} - {%- endif %} {{ doc.customer_name }} From 138e030055481807baa038e8dc5ba6af39dcc836 Mon Sep 17 00:00:00 2001 From: Himanshu Date: Fri, 22 Mar 2019 23:22:52 +0530 Subject: [PATCH 2/2] CodiceFiscale should be after IdFiscaleIVA --- erpnext/regional/italy/e-invoice.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/regional/italy/e-invoice.xml b/erpnext/regional/italy/e-invoice.xml index c789808faba..912b7899d6b 100644 --- a/erpnext/regional/italy/e-invoice.xml +++ b/erpnext/regional/italy/e-invoice.xml @@ -95,13 +95,13 @@ {{ doc.customer_data.last_name }} {%- else %} - {%- if doc.customer_data.fiscal_code %} - {{ doc.customer_data.fiscal_code }} - {%- endif %} {{ doc.customer_address_data.country_code }} {{ doc.tax_id | replace("IT","") }} + {%- if doc.customer_data.fiscal_code %} + {{ doc.customer_data.fiscal_code }} + {%- endif %} {{ doc.customer_name }}