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

View File

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