mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Allow to create invoices before bank transfer runs (#1734)
Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
@@ -98,6 +98,12 @@ class BankTransfer(BasePaymentProvider):
|
||||
}},
|
||||
required=False
|
||||
)),
|
||||
('invoice_immediately',
|
||||
forms.BooleanField(
|
||||
label=_('Create an invoice for orders using bank transfer immediately if the event is otherwise '
|
||||
'configured to create invoices after payment is completed.'),
|
||||
required=False,
|
||||
)),
|
||||
('public_name', I18nFormField(
|
||||
label=_('Payment method name'),
|
||||
widget=I18nTextInput,
|
||||
@@ -119,6 +125,10 @@ class BankTransfer(BasePaymentProvider):
|
||||
return _('In test mode, you can just manually mark this order as paid in the backend after it has been '
|
||||
'created.')
|
||||
|
||||
@property
|
||||
def requires_invoice_immediately(self):
|
||||
return self.settings.get('invoice_immediately', False, as_type=bool)
|
||||
|
||||
@property
|
||||
def settings_form_fields(self):
|
||||
d = OrderedDict(list(super().settings_form_fields.items()) + list(BankTransfer.form_fields().items()))
|
||||
|
||||
Reference in New Issue
Block a user