mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Order change manager: Allow to disable invoice issuing
This commit is contained in:
@@ -168,6 +168,15 @@ class OtherOperationsForm(forms.Form):
|
||||
'Use with care and only if you need to. Note that rounding differences might occur in this procedure.'
|
||||
)
|
||||
)
|
||||
reissue_invoice = forms.BooleanField(
|
||||
label=_('Issue a new invoice if required'),
|
||||
required=False,
|
||||
initial=True,
|
||||
help_text=_(
|
||||
'If an invoice exists for this order and this operation would change its contents, the old invoice will '
|
||||
'be cancelled and a new invoice will be issued.'
|
||||
)
|
||||
)
|
||||
notify = forms.BooleanField(
|
||||
label=_('Notify user'),
|
||||
required=False,
|
||||
|
||||
@@ -215,6 +215,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% bootstrap_field other_form.recalculate_taxes layout="control" %}
|
||||
{% bootstrap_field other_form.reissue_invoice layout="control" %}
|
||||
{% bootstrap_field other_form.notify layout="control" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1297,7 +1297,8 @@ class OrderChange(OrderView):
|
||||
ocm = OrderChangeManager(
|
||||
self.order,
|
||||
user=self.request.user,
|
||||
notify=notify
|
||||
notify=notify,
|
||||
reissue_invoice=self.other_form.cleaned_data['reissue_invoice'] if self.other_form.is_valid() else True
|
||||
)
|
||||
form_valid = self._process_add(ocm) and self._process_change(ocm) and self._process_other(ocm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user