From 2e702b87de42e2b6c03f0d69546afc230145bbde Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 9 Jan 2023 11:24:30 +0100 Subject: [PATCH] Do not show empty invoice address fields on confirmation --- .../templates/pretixpresale/event/checkout_confirm.html | 8 +++++--- .../presale/templates/pretixpresale/event/order.html | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html b/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html index 57c890d7d..ce8290984 100644 --- a/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html +++ b/src/pretix/presale/templates/pretixpresale/event/checkout_confirm.html @@ -99,7 +99,7 @@
{% trans "State" context "address" %}
{{ addr.state_name }}
{% endif %} - {% if request.event.settings.invoice_address_vatid %} + {% if request.event.settings.invoice_address_vatid and addr.vat_id %}
{% trans "VAT ID" %}
{{ addr.vat_id }}
{% endif %} @@ -111,8 +111,10 @@
{{ request.event.settings.invoice_address_custom_field }}
{{ addr.custom_field }}
{% endif %} -
{% trans "Internal reference" %}
-
{{ addr.internal_reference }}
+ {% if addr.internal_reference %} +
{% trans "Internal reference" %}
+
{{ addr.internal_reference }}
+ {% endif %} diff --git a/src/pretix/presale/templates/pretixpresale/event/order.html b/src/pretix/presale/templates/pretixpresale/event/order.html index f8cb03388..63f8fa6ca 100644 --- a/src/pretix/presale/templates/pretixpresale/event/order.html +++ b/src/pretix/presale/templates/pretixpresale/event/order.html @@ -321,7 +321,7 @@
{% trans "State" context "address" %}
{{ order.invoice_address.state_name }}
{% endif %} - {% if request.event.settings.invoice_address_vatid %} + {% if request.event.settings.invoice_address_vatid and order.invoice_address.vat_id %}
{% trans "VAT ID" %}
{{ order.invoice_address.vat_id }}
{% endif %} @@ -329,8 +329,10 @@
{{ request.event.settings.invoice_address_custom_field }}
{{ order.invoice_address.custom_field }}
{% endif %} -
{% trans "Internal Reference" %}
-
{{ order.invoice_address.internal_reference }}
+ {% if order.invoice_address.internal_reference %} +
{% trans "Internal Reference" %}
+
{{ order.invoice_address.internal_reference }}
+ {% endif %} {% endif %}