mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Improve invoice call template
This commit is contained in:
@ -5,7 +5,8 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{% trans %}Invoices call{% endtrans %}</h3>
|
||||
<h3>{% trans date=start_date|date("F Y") %}Invoices call for {{ date }}{% endtrans %}</h3>
|
||||
<p>{% trans %}Choose another month: {% endtrans %}</p>
|
||||
<form method="get" action="">
|
||||
<select name="month">
|
||||
{% for m in months %}
|
||||
|
@ -929,6 +929,7 @@ class InvoiceCallView(CounterAdminTabsMixin, TemplateView):
|
||||
start_date = datetime(year=timezone.now().year, month=(timezone.now().month+10)%12+1, day=1)
|
||||
end_date = (start_date + timedelta(days=32)).replace(day=1, hour=0, minute=0, microsecond=0)
|
||||
from django.db.models import Sum, Case, When, F, DecimalField
|
||||
kwargs['start_date'] = start_date
|
||||
kwargs['sums'] = Selling.objects.values('club__name').annotate(selling_sum=Sum(
|
||||
Case(When(date__gte=start_date,
|
||||
date__lt=end_date,
|
||||
|
Reference in New Issue
Block a user