mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fix #192 -- Disable bank import after last date of payments
This commit is contained in:
@@ -2,36 +2,45 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
{% block inner %}
|
{% block inner %}
|
||||||
<div class="panel panel-default">
|
{% if no_more_payments %}
|
||||||
<div class="panel-heading">
|
<div class="alert alert-danger">
|
||||||
<h3 class="panel-title">{% trans "Upload a new file" %}</h3>
|
{% 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 %}
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
{% else %}
|
||||||
<p>{% blocktrans trimmed %}
|
<div class="panel panel-default">
|
||||||
This page allows you to upload bank statement files to process incoming payments.
|
<div class="panel-heading">
|
||||||
{% endblocktrans %}</p>
|
<h3 class="panel-title">{% trans "Upload a new file" %}</h3>
|
||||||
<p>{% blocktrans trimmed %}
|
</div>
|
||||||
Currently, this feature supports <code>.csv</code> files and files in the MT940 format.
|
<div class="panel-body">
|
||||||
{% endblocktrans %}</p>
|
<p>{% blocktrans trimmed %}
|
||||||
{% if job_running %}
|
This page allows you to upload bank statement files to process incoming payments.
|
||||||
<div class="alert alert-info" data-job-waiting data-job-waiting-url="{% url "plugins:banktransfer:import.job" event=request.event.slug organizer=request.event.organizer.slug job=job_running.pk %}?ajax=1">
|
{% endblocktrans %}</p>
|
||||||
<span class="fa fa-cog fa-spin"></span>
|
<p>{% blocktrans trimmed %}
|
||||||
{% trans "An import is currently being processed, please try again in a few minutes." %}
|
Currently, this feature supports <code>.csv</code> files and files in the MT940 format.
|
||||||
</div>
|
{% endblocktrans %}</p>
|
||||||
{% else %}
|
{% if job_running %}
|
||||||
<form action="" method="post" enctype="multipart/form-data" class="form-inline">
|
<div class="alert alert-info" data-job-waiting data-job-waiting-url="{% url "plugins:banktransfer:import.job" event=request.event.slug organizer=request.event.organizer.slug job=job_running.pk %}?ajax=1">
|
||||||
{% csrf_token %}
|
<span class="fa fa-cog fa-spin"></span>
|
||||||
<div class="form-group">
|
{% trans "An import is currently being processed, please try again in a few minutes." %}
|
||||||
<label for="file">{% trans "Import file" %}: </label> <input id="file" type="file" name="file"/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
{% else %}
|
||||||
<button class="btn btn-primary pull-right" type="submit">
|
<form action="" method="post" enctype="multipart/form-data" class="form-inline">
|
||||||
<span class="icon icon-upload"></span> {% trans "Start upload" %}
|
{% csrf_token %}
|
||||||
</button>
|
<div class="form-group">
|
||||||
</form>
|
<label for="file">{% trans "Import file" %}: </label> <input id="file" type="file" name="file"/>
|
||||||
{% endif %}
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<button class="btn btn-primary pull-right" type="submit">
|
||||||
|
<span class="icon icon-upload"></span> {% trans "Start upload" %}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% if transactions_unhandled|length > 0 or request.GET.search %}
|
{% if transactions_unhandled|length > 0 or request.GET.search %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
|||||||
@@ -354,4 +354,8 @@ class ImportView(EventPermissionRequiredMixin, ListView):
|
|||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
ctx = super().get_context_data()
|
ctx = super().get_context_data()
|
||||||
ctx['job_running'] = self.job_running
|
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
|
return ctx
|
||||||
|
|||||||
Reference in New Issue
Block a user