mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Add new settings invoice_regenerate_allowed (#2071)
This commit is contained in:
@@ -236,14 +236,16 @@
|
||||
{% if i.is_cancellation %}{% trans "Cancellation" context "invoice" %}{% else %}{% trans "Invoice" %}{% endif %}
|
||||
{{ i.number }}</a> ({{ i.date|date:"SHORT_DATE_FORMAT" }})
|
||||
{% if not i.canceled %}
|
||||
<form class="form-inline helper-display-inline" method="post"
|
||||
action="{% url "control:event.order.regeninvoice" event=request.event.slug organizer=request.event.organizer.slug code=order.code id=i.pk %}">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-default btn-xs" data-toggle="tooltip"
|
||||
title="{% trans 'Rebuild the invoice with updated data but the same invoice number.' %}">
|
||||
{% trans "Regenerate" %}
|
||||
</button>
|
||||
</form>
|
||||
{% if request.event.settings.invoice_regenerate_allowed %}
|
||||
<form class="form-inline helper-display-inline" method="post"
|
||||
action="{% url "control:event.order.regeninvoice" event=request.event.slug organizer=request.event.organizer.slug code=order.code id=i.pk %}">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-default btn-xs" data-toggle="tooltip"
|
||||
title="{% trans 'Rebuild the invoice with updated data but the same invoice number.' %}">
|
||||
{% trans "Regenerate" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if not i.is_cancellation %}
|
||||
<form class="form-inline helper-display-inline" method="post"
|
||||
action="{% url "control:event.order.reissueinvoice" event=request.event.slug organizer=request.event.organizer.slug code=order.code id=i.pk %}">
|
||||
|
||||
@@ -81,6 +81,10 @@
|
||||
{% bootstrap_field sform.giftcard_expiry_years layout="control" %}
|
||||
{% bootstrap_field sform.giftcard_length layout="control" %}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{% trans "Invoices" %}</legend>
|
||||
{% bootstrap_field sform.invoice_regenerate_allowed layout="control" %}
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-lg-2">
|
||||
|
||||
Reference in New Issue
Block a user