diff --git a/src/pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/import_form.html b/src/pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/import_form.html index bb60fa00b7..4bd4ec9c5b 100644 --- a/src/pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/import_form.html +++ b/src/pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/import_form.html @@ -2,36 +2,45 @@ {% load i18n %} {% load bootstrap3 %} {% block inner %} -
-
-

{% trans "Upload a new file" %}

+ {% if no_more_payments %} +
+ {% blocktrans trimmed with date=request.event.settings.payment_term_last|date:"SHORT_DATE_FORMAT" %} + In the payment settings of your event, you set the {{ date }} as the last date of any payments. + Therefore, you won't be able to mark any order as paid here. + {% endblocktrans %}
-
-

{% blocktrans trimmed %} - This page allows you to upload bank statement files to process incoming payments. - {% endblocktrans %}

-

{% blocktrans trimmed %} - Currently, this feature supports .csv files and files in the MT940 format. - {% endblocktrans %}

- {% if job_running %} -
- - {% trans "An import is currently being processed, please try again in a few minutes." %} -
- {% else %} -
- {% csrf_token %} -
- + {% else %} +
+
+

{% trans "Upload a new file" %}

+
+
+

{% blocktrans trimmed %} + This page allows you to upload bank statement files to process incoming payments. + {% endblocktrans %}

+

{% blocktrans trimmed %} + Currently, this feature supports .csv files and files in the MT940 format. + {% endblocktrans %}

+ {% if job_running %} +
+ + {% trans "An import is currently being processed, please try again in a few minutes." %}
-
- - - {% endif %} + {% else %} +
+ {% csrf_token %} +
+ +
+
+ +
+ {% endif %} +
-
+ {% endif %} {% if transactions_unhandled|length > 0 or request.GET.search %}
diff --git a/src/pretix/plugins/banktransfer/views.py b/src/pretix/plugins/banktransfer/views.py index 84d5d28c51..0df20ab40a 100644 --- a/src/pretix/plugins/banktransfer/views.py +++ b/src/pretix/plugins/banktransfer/views.py @@ -354,4 +354,8 @@ class ImportView(EventPermissionRequiredMixin, ListView): def get_context_data(self, **kwargs): ctx = super().get_context_data() ctx['job_running'] = self.job_running + ctx['no_more_payments'] = False + if self.request.event.settings.get('payment_term_last'): + if now() > self.request.event.payment_term_last: + ctx['no_more_payments'] = True return ctx