fix: include fiscal code in invoice xml if present

This commit is contained in:
Himanshu Warekar 2019-03-22 17:47:57 +05:30
parent 56e491bccd
commit 1d04ea1212

View File

@ -95,14 +95,13 @@
<Cognome>{{ doc.customer_data.last_name }}</Cognome>
</Anagrafica>
{%- else %}
{%- if doc.customer_data.is_public_administration %}
<CodiceFiscale>{{ doc.customer_data.fiscal_code }}</CodiceFiscale>
{%- else %}
{%- if doc.customer_data.fiscal_code %}
<CodiceFiscale>{{ doc.customer_data.fiscal_code }}</CodiceFiscale>
{%- endif %}
<IdFiscaleIVA>
<IdPaese>{{ doc.customer_address_data.country_code }}</IdPaese>
<IdCodice>{{ doc.tax_id | replace("IT","") }}</IdCodice>
</IdFiscaleIVA>
{%- endif %}
<Anagrafica>
<Denominazione>{{ doc.customer_name }}</Denominazione>
</Anagrafica>