Do not show empty invoice address fields on confirmation

This commit is contained in:
Raphael Michel
2023-01-09 11:24:30 +01:00
parent 59730ff501
commit 2e702b87de
2 changed files with 10 additions and 6 deletions

View File

@@ -99,7 +99,7 @@
<dt>{% trans "State" context "address" %}</dt>
<dd>{{ addr.state_name }}</dd>
{% endif %}
{% if request.event.settings.invoice_address_vatid %}
{% if request.event.settings.invoice_address_vatid and addr.vat_id %}
<dt>{% trans "VAT ID" %}</dt>
<dd>{{ addr.vat_id }}</dd>
{% endif %}
@@ -111,8 +111,10 @@
<dt>{{ request.event.settings.invoice_address_custom_field }}</dt>
<dd>{{ addr.custom_field }}</dd>
{% endif %}
<dt>{% trans "Internal reference" %}</dt>
<dd>{{ addr.internal_reference }}</dd>
{% if addr.internal_reference %}
<dt>{% trans "Internal reference" %}</dt>
<dd>{{ addr.internal_reference }}</dd>
{% endif %}
</dl>
</div>
</div>

View File

@@ -321,7 +321,7 @@
<dt>{% trans "State" context "address" %}</dt>
<dd>{{ order.invoice_address.state_name }}</dd>
{% endif %}
{% if request.event.settings.invoice_address_vatid %}
{% if request.event.settings.invoice_address_vatid and order.invoice_address.vat_id %}
<dt>{% trans "VAT ID" %}</dt>
<dd>{{ order.invoice_address.vat_id }}</dd>
{% endif %}
@@ -329,8 +329,10 @@
<dt>{{ request.event.settings.invoice_address_custom_field }}</dt>
<dd>{{ order.invoice_address.custom_field }}</dd>
{% endif %}
<dt>{% trans "Internal Reference" %}</dt>
<dd>{{ order.invoice_address.internal_reference }}</dd>
{% if order.invoice_address.internal_reference %}
<dt>{% trans "Internal Reference" %}</dt>
<dd>{{ order.invoice_address.internal_reference }}</dd>
{% endif %}
{% endif %}
</dl>
</div>