mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Added invoice addresses
This commit is contained in:
@@ -130,6 +130,19 @@ class EventSettingsForm(SettingsForm):
|
||||
help_text=_("Require customers to fill in the names of all attendees."),
|
||||
required=False
|
||||
)
|
||||
invoice_address_asked = forms.BooleanField(
|
||||
label=_("Ask for invoice address"),
|
||||
required=False
|
||||
)
|
||||
invoice_address_required = forms.BooleanField(
|
||||
label=_("Require invoice address"),
|
||||
required=False
|
||||
)
|
||||
invoice_address_vatid = forms.BooleanField(
|
||||
label=_("Ask for VAT ID"),
|
||||
help_text=_("Does only work if an invoice address is asked for. VAT ID is not required."),
|
||||
required=False
|
||||
)
|
||||
max_items_per_order = forms.IntegerField(
|
||||
min_value=1,
|
||||
label=_("Maximum number of items per order")
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
{% bootstrap_field sform.max_items_per_order layout="horizontal" %}
|
||||
{% bootstrap_field sform.attendee_names_asked layout="horizontal" %}
|
||||
{% bootstrap_field sform.attendee_names_required layout="horizontal" %}
|
||||
{% bootstrap_field sform.invoice_address_asked layout="horizontal" %}
|
||||
{% bootstrap_field sform.invoice_address_required layout="horizontal" %}
|
||||
{% bootstrap_field sform.invoice_address_vatid layout="horizontal" %}
|
||||
</fieldset>
|
||||
<div class="form-group submit-group">
|
||||
<button type="submit" class="btn btn-primary btn-save">
|
||||
|
||||
@@ -176,4 +176,33 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if request.event.settings.invoice_address_asked %}
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
{% trans "Invoice information" %}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{% trans "Company" %}</dt>
|
||||
<dd>{{ order.invoice_address.company }}</dd>
|
||||
<dt>{% trans "Name" %}</dt>
|
||||
<dd>{{ order.invoice_address.name }}</dd>
|
||||
<dt>{% trans "Address" %}</dt>
|
||||
<dd>{{ order.invoice_address.street|linebreaksbr }}</dd>
|
||||
<dt>{% trans "ZIP code and city" %}</dt>
|
||||
<dd>{{ order.invoice_address.zipcode }} {{ addr.city }}</dd>
|
||||
<dt>{% trans "Country" %}</dt>
|
||||
<dd>{{ order.invoice_address.country }}</dd>
|
||||
<dt>{% trans "Phone" %}</dt>
|
||||
<dd>{{ order.invoice_address.phone }}</dd>
|
||||
{% if request.event.settings.invoice_address_vatid %}
|
||||
<dt>{% trans "VAT ID" %}</dt>
|
||||
<dd>{{ order.invoice_address.vat_id }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user