From 8dfc77a92753cbc4b1dbd47c29d1cacfd9d90a8c Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 17 Mar 2023 15:25:51 +0100 Subject: [PATCH] Manual payment: Support for "invoice immediately" --- src/pretix/base/payment.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pretix/base/payment.py b/src/pretix/base/payment.py index 91ca237b42..39f2753eea 100644 --- a/src/pretix/base/payment.py +++ b/src/pretix/base/payment.py @@ -1125,6 +1125,12 @@ class ManualPayment(BasePaymentProvider): widget=I18nTextarea, validators=[PlaceholderValidator(['{order}', '{amount}', '{currency}', '{amount_with_currency}'])], )), + ('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, + )), ] + list(super().settings_form_fields.items()) ) d.move_to_end('_enabled', last=False) @@ -1164,6 +1170,10 @@ class ManualPayment(BasePaymentProvider): format_map(self.settings.get('pending_description', as_type=LazyI18nString), self.format_map(payment.order, payment)) ) + @property + def requires_invoice_immediately(self): + return self.settings.get('invoice_immediately', False, as_type=bool) + class OffsettingProvider(BasePaymentProvider): is_enabled = True