Commit 2e7e78b8 authored by Skia's avatar Skia

Add last ops view to the bars

parent fd482195
Pipeline #257 failed with stage
in 14 seconds
......@@ -176,6 +176,9 @@ tbody>tr:hover {
background: darkgrey;
width: 100%;
}
.highlight {
background: orange;
}
.tool-bar {
overflow: auto;
padding: 4px;
......
......@@ -40,9 +40,6 @@
{% endif %}
</div>
{% if counter.type == 'BAR' %}
{% if barmen %}
<p><a href="{{ url('counter:cash_summary', counter_id=counter.id) }}">{% trans %}Make a cash register summary{% endtrans %}</a></p>
{% endif %}
<div>
<h3>{% trans %}Barman: {% endtrans %}</h3>
{% for b in barmen %}
......
{% extends "core/base.jinja" %}
{% from 'core/macros.jinja' import user_profile_link %}
{% block title %}
{% trans counter_name=counter %}{{ counter_name }} last operations{% endtrans %}
{% endblock %}
{% block content %}
<h3>{% trans counter_name=counter %}{{ counter_name }} last operations{% endtrans %}</h3>
<h4>{% trans %}Refillings{% endtrans %}</h4>
<table>
<thead>
<tr>
<td>{% trans %}Date{% endtrans %}</td>
<td>{% trans %}Barman{% endtrans %}</td>
<td>{% trans %}Customer{% endtrans %}</td>
<td>{% trans %}Amount{% endtrans %}</td>
<td>{% trans %}Payment method{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for i in last_refillings %}
<tr>
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
<td><a href="{{ i.operator.get_absolute_url() }}">{{ i.operator.get_display_name() }}</a></td>
<td><a href="{{ i.customer.user.get_absolute_url() }}">{{ i.customer.user.get_display_name() }}</a></td>
<td>{{ i.amount }}</td>
<td>{{ i.get_payment_method_display() }}</td>
<td><a href="{{ url('counter:refilling_delete', refilling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<h4>{% trans %}Sellings{% endtrans %}</h4>
<table>
<thead>
<tr>
<td>{% trans %}Date{% endtrans %}</td>
<td>{% trans %}Barman{% endtrans %}</td>
<td>{% trans %}Customer{% endtrans %}</td>
<td>{% trans %}Label{% endtrans %}</td>
<td>{% trans %}Quantity{% endtrans %}</td>
<td>{% trans %}Total{% endtrans %}</td>
<td>{% trans %}Payment method{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for i in last_sellings %}
<tr>
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
<td><a href="{{ i.seller.get_absolute_url() }}">{{ i.seller.get_display_name() }}</a></td>
<td><a href="{{ i.customer.user.get_absolute_url() }}">{{ i.customer.user.get_display_name() }}</a></td>
<td>{{ i.label }}</td>
<td>{{ i.quantity }}</td>
<td>{{ i.quantity * i.unit_price }}</td>
<td>{{ i.get_payment_method_display() }}</td>
<td><a href="{{ url('counter:selling_delete', selling_id=i.id) }}?next={{ url('counter:details',
counter_id=counter.id) }}">{% trans %}Delete{% endtrans %}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
......@@ -5,6 +5,7 @@ from counter.views import *
urlpatterns = [
url(r'^(?P<counter_id>[0-9]+)$', CounterMain.as_view(), name='details'),
url(r'^(?P<counter_id>[0-9]+)/click/(?P<user_id>[0-9]+)$', CounterClick.as_view(), name='click'),
url(r'^(?P<counter_id>[0-9]+)/last_ops$', CounterLastOperationsView.as_view(), name='last_ops'),
url(r'^(?P<counter_id>[0-9]+)/cash_summary$', CounterCashSummaryView.as_view(), name='cash_summary'),
url(r'^(?P<counter_id>[0-9]+)/activity$', CounterActivityView.as_view(), name='activity'),
url(r'^(?P<counter_id>[0-9]+)/stats$', CounterStatView.as_view(), name='stats'),
......
from django.shortcuts import render
from django.core.exceptions import PermissionDenied
from django.views.generic import ListView, DetailView, RedirectView
from django.views.generic.edit import UpdateView, CreateView, DeleteView, ProcessFormView, FormMixin
from django.forms.models import modelform_factory
from django.forms import CheckboxSelectMultiple
from django.core.urlresolvers import reverse_lazy
from django.core.urlresolvers import reverse_lazy, reverse
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseRedirect
from django.utils import timezone
......@@ -63,6 +64,29 @@ class RefillForm(forms.ModelForm):
model = Refilling
fields = ['amount', 'payment_method', 'bank']
class CounterTabsMixin(TabedViewMixin):
def get_tabs_title(self):
return self.object
def get_list_of_tabs(self):
tab_list = []
tab_list.append({
'url': reverse_lazy('counter:details', kwargs={'counter_id': self.object.id}),
'slug': 'counter',
'name': _("Counter"),
})
if self.object.type == "BAR":
tab_list.append({
'url': reverse_lazy('counter:cash_summary', kwargs={'counter_id': self.object.id}),
'slug': 'cash_summary',
'name': _("Cash summary"),
})
tab_list.append({
'url': reverse_lazy('counter:last_ops', kwargs={'counter_id': self.object.id}),
'slug': 'last_ops',
'name': _("Last operations"),
})
return tab_list
class CheckTokenMixin:
def post(self, request, *args, **kwargs):
if not ('counter_token' in self.request.session.keys() and self.request.session['counter_token'] == self.object.token):
......@@ -70,7 +94,7 @@ class CheckTokenMixin:
kwargs={'counter_id': self.object.id})+'?bad_location')
return super(CheckTokenMixin, self).post(request, *args, **kwargs)
class CounterMain(DetailView, CheckTokenMixin, ProcessFormView, FormMixin):
class CounterMain(CounterTabsMixin, DetailView, CheckTokenMixin, ProcessFormView, FormMixin):
"""
The public (barman) view
"""
......@@ -78,6 +102,7 @@ class CounterMain(DetailView, CheckTokenMixin, ProcessFormView, FormMixin):
template_name = 'counter/counter_main.jinja'
pk_url_kwarg = "counter_id"
form_class = GetUserForm # Form to enter a client code and get the corresponding user id
current_tab = "counter"
def post(self, request, *args, **kwargs):
self.object = self.get_object()
......@@ -127,7 +152,7 @@ class CounterMain(DetailView, CheckTokenMixin, ProcessFormView, FormMixin):
def get_success_url(self):
return reverse_lazy('counter:click', args=self.args, kwargs=self.kwargs)
class CounterClick(DetailView, CheckTokenMixin):
class CounterClick(CounterTabsMixin, DetailView, CheckTokenMixin):
"""
The click view
This is a detail view not to have to worry about loading the counter
......@@ -136,6 +161,7 @@ class CounterClick(DetailView, CheckTokenMixin):
model = Counter
template_name = 'counter/counter_click.jinja'
pk_url_kwarg = "counter_id"
current_tab = "counter"
def get(self, request, *args, **kwargs):
"""Simple get view"""
......@@ -412,7 +438,7 @@ class CounterLogout(RedirectView):
## Counter admin views
class CounterTabsMixin(TabedViewMixin):
class CounterAdminTabsMixin(TabedViewMixin):
tabs_title = _("Counter administration")
list_of_tabs = [
{
......@@ -442,7 +468,7 @@ class CounterTabsMixin(TabedViewMixin):
},
]
class CounterListView(CounterTabsMixin, CanViewMixin, ListView):
class CounterListView(CounterAdminTabsMixin, CanViewMixin, ListView):
"""
A list view for the admins
"""
......@@ -457,7 +483,7 @@ class CounterEditForm(forms.ModelForm):
sellers = make_ajax_field(Counter, 'sellers', 'users', help_text="")
products = make_ajax_field(Counter, 'products', 'products', help_text="")
class CounterEditView(CounterTabsMixin, CanEditMixin, UpdateView):
class CounterEditView(CounterAdminTabsMixin, CanEditMixin, UpdateView):
"""
Edit a counter's main informations (for the counter's manager)
"""
......@@ -470,7 +496,7 @@ class CounterEditView(CounterTabsMixin, CanEditMixin, UpdateView):
def get_success_url(self):
return reverse_lazy('counter:admin', kwargs={'counter_id': self.object.id})
class CounterEditPropView(CounterTabsMixin, CanEditPropMixin, UpdateView):
class CounterEditPropView(CounterAdminTabsMixin, CanEditPropMixin, UpdateView):
"""
Edit a counter's main informations (for the counter's admin)
"""
......@@ -480,7 +506,7 @@ class CounterEditPropView(CounterTabsMixin, CanEditPropMixin, UpdateView):
template_name = 'core/edit.jinja'
current_tab = "counters"
class CounterCreateView(CounterTabsMixin, CanEditMixin, CreateView):
class CounterCreateView(CounterAdminTabsMixin, CanEditMixin, CreateView):
"""
Create a counter (for the admins)
"""
......@@ -490,7 +516,7 @@ class CounterCreateView(CounterTabsMixin, CanEditMixin, CreateView):
template_name = 'core/create.jinja'
current_tab = "counters"
class CounterDeleteView(CounterTabsMixin, CanEditMixin, DeleteView):
class CounterDeleteView(CounterAdminTabsMixin, CanEditMixin, DeleteView):
"""
Delete a counter (for the admins)
"""
......@@ -502,7 +528,7 @@ class CounterDeleteView(CounterTabsMixin, CanEditMixin, DeleteView):
# Product management
class ProductTypeListView(CounterTabsMixin, CanEditPropMixin, ListView):
class ProductTypeListView(CounterAdminTabsMixin, CanEditPropMixin, ListView):
"""
A list view for the admins
"""
......@@ -510,7 +536,7 @@ class ProductTypeListView(CounterTabsMixin, CanEditPropMixin, ListView):
template_name = 'counter/producttype_list.jinja'
current_tab = "product_types"
class ProductTypeCreateView(CounterTabsMixin, CanCreateMixin, CreateView):
class ProductTypeCreateView(CounterAdminTabsMixin, CanCreateMixin, CreateView):
"""
A create view for the admins
"""
......@@ -519,7 +545,7 @@ class ProductTypeCreateView(CounterTabsMixin, CanCreateMixin, CreateView):
template_name = 'core/create.jinja'
current_tab = "products"
class ProductTypeEditView(CounterTabsMixin, CanEditPropMixin, UpdateView):
class ProductTypeEditView(CounterAdminTabsMixin, CanEditPropMixin, UpdateView):
"""
An edit view for the admins
"""
......@@ -529,7 +555,7 @@ class ProductTypeEditView(CounterTabsMixin, CanEditPropMixin, UpdateView):
pk_url_kwarg = "type_id"
current_tab = "products"
class ProductArchivedListView(CounterTabsMixin, CanEditPropMixin, ListView):
class ProductArchivedListView(CounterAdminTabsMixin, CanEditPropMixin, ListView):
"""
A list view for the admins
"""
......@@ -539,7 +565,7 @@ class ProductArchivedListView(CounterTabsMixin, CanEditPropMixin, ListView):
ordering = ['name']
current_tab = "archive"
class ProductListView(CounterTabsMixin, CanEditPropMixin, ListView):
class ProductListView(CounterAdminTabsMixin, CanEditPropMixin, ListView):
"""
A list view for the admins
"""
......@@ -577,7 +603,7 @@ class ProductEditForm(forms.ModelForm):
c.save()
return ret
class ProductCreateView(CounterTabsMixin, CanCreateMixin, CreateView):
class ProductCreateView(CounterAdminTabsMixin, CanCreateMixin, CreateView):
"""
A create view for the admins
"""
......@@ -586,7 +612,7 @@ class ProductCreateView(CounterTabsMixin, CanCreateMixin, CreateView):
template_name = 'core/create.jinja'
current_tab = "products"
class ProductEditView(CounterTabsMixin, CanEditPropMixin, UpdateView):
class ProductEditView(CounterAdminTabsMixin, CanEditPropMixin, UpdateView):
"""
An edit view for the admins
"""
......@@ -596,7 +622,7 @@ class ProductEditView(CounterTabsMixin, CanEditPropMixin, UpdateView):
template_name = 'core/edit.jinja'
current_tab = "products"
class RefillingDeleteView(CanEditPropMixin, DeleteView):
class RefillingDeleteView(DeleteView):
"""
Delete a refilling (for the admins)
"""
......@@ -604,10 +630,23 @@ class RefillingDeleteView(CanEditPropMixin, DeleteView):
pk_url_kwarg = "refilling_id"
template_name = 'core/delete_confirm.jinja'
def get_success_url(self):
return reverse_lazy('core:user_account', kwargs={'user_id': self.object.customer.user.id})
def dispatch(self, request, *args, **kwargs):
"""
We have here a very particular right handling, we can't inherit from CanEditPropMixin
"""
self.object = self.get_object()
if (timezone.now() - self.object.date <= timedelta(minutes=settings.SITH_LAST_OPERATIONS_LIMIT) and
'counter_token' in request.session.keys() and
request.session['counter_token'] and # check if not null for counters that have no token set
Counter.objects.filter(token=request.session['counter_token']).exists()):
self.success_url = reverse('counter:details', kwargs={'counter_id': self.object.counter.id})
return super(RefillingDeleteView, self).dispatch(request, *args, **kwargs)
elif self.object.is_owned_by(request.user):
self.success_url = reverse('core:user_account', kwargs={'user_id': self.object.customer.user.id})
return super(RefillingDeleteView, self).dispatch(request, *args, **kwargs)
raise PermissionDenied
class SellingDeleteView(CanEditPropMixin, DeleteView):
class SellingDeleteView(DeleteView):
"""
Delete a selling (for the admins)
"""
......@@ -615,8 +654,21 @@ class SellingDeleteView(CanEditPropMixin, DeleteView):
pk_url_kwarg = "selling_id"
template_name = 'core/delete_confirm.jinja'
def get_success_url(self):
return reverse_lazy('core:user_account', kwargs={'user_id': self.object.customer.user.id})
def dispatch(self, request, *args, **kwargs):
"""
We have here a very particular right handling, we can't inherit from CanEditPropMixin
"""
self.object = self.get_object()
if (timezone.now() - self.object.date <= timedelta(minutes=settings.SITH_LAST_OPERATIONS_LIMIT) and
'counter_token' in request.session.keys() and
request.session['counter_token'] and # check if not null for counters that have no token set
Counter.objects.filter(token=request.session['counter_token']).exists()):
self.success_url = reverse('counter:details', kwargs={'counter_id': self.object.counter.id})
return super(SellingDeleteView, self).dispatch(request, *args, **kwargs)
elif self.object.is_owned_by(request.user):
self.success_url = reverse('core:user_account', kwargs={'user_id': self.object.customer.user.id})
return super(SellingDeleteView, self).dispatch(request, *args, **kwargs)
raise PermissionDenied
# Cash register summaries
......@@ -676,27 +728,61 @@ class CashRegisterSummaryForm(forms.Form):
if summary.items.count() < 1:
summary.delete()
class CounterCashSummaryView(CanViewMixin, DetailView):
class CounterLastOperationsView(CounterTabsMixin, CanViewMixin, DetailView):
"""
Provide the last operations to allow barmen to delete them
"""
model = Counter
pk_url_kwarg = "counter_id"
template_name = 'counter/last_ops.jinja'
current_tab = "last_ops"
def dispatch(self, request, *args, **kwargs):
"""
We have here again a very particular right handling
"""
self.object = self.get_object()
if (self.object.get_barmen_list() and 'counter_token' in request.session.keys() and
request.session['counter_token'] and # check if not null for counters that have no token set
Counter.objects.filter(token=request.session['counter_token']).exists()):
return super(CounterLastOperationsView, self).dispatch(request, *args, **kwargs)
return HttpResponseRedirect(reverse('counter:details', kwargs={'counter_id': self.object.id})+'?bad_location')
def get_context_data(self, **kwargs):
"""Add form to the context """
kwargs = super(CounterLastOperationsView, self).get_context_data(**kwargs)
threshold = timezone.now() - timedelta(minutes=settings.SITH_LAST_OPERATIONS_LIMIT)
kwargs['last_refillings'] = self.object.refillings.filter(date__gte=threshold).all()
kwargs['last_sellings'] = self.object.sellings.filter(date__gte=threshold).all()
return kwargs
class CounterCashSummaryView(CounterTabsMixin, CanViewMixin, DetailView):
"""
Provide the cash summary form
"""
model = Counter
pk_url_kwarg = "counter_id"
template_name = 'counter/cash_register_summary.jinja'
current_tab = "cash_summary"
def dispatch(self, request, *args, **kwargs):
"""
We have here again a very particular right handling
"""
self.object = self.get_object()
if (self.object.get_barmen_list() and 'counter_token' in request.session.keys() and
request.session['counter_token'] and # check if not null for counters that have no token set
Counter.objects.filter(token=request.session['counter_token']).exists()):
return super(CounterCashSummaryView, self).dispatch(request, *args, **kwargs)
return HttpResponseRedirect(reverse('counter:details', kwargs={'counter_id': self.object.id})+'?bad_location')
def get(self, request, *args, **kwargs):
self.object = self.get_object()
if len(self.object.get_barmen_list()) < 1:
return HttpResponseRedirect(reverse_lazy('counter:details', args=self.args,
kwargs={'counter_id': self.object.id}))
self.form = CashRegisterSummaryForm()
return super(CounterCashSummaryView, self).get(request, *args, **kwargs)
def post(self, request, *args, **kwargs):
self.object = self.get_object()
if len(self.object.get_barmen_list()) < 1:
return HttpResponseRedirect(reverse_lazy('counter:details', args=self.args,
kwargs={'counter_id': self.object.id}))
self.form = CashRegisterSummaryForm(request.POST)
if self.form.is_valid():
self.form.save(self.object)
......@@ -760,7 +846,7 @@ class CounterStatView(DetailView, CanEditMixin):
raise PermissionDenied
class CashSummaryListView(CanEditPropMixin, CounterTabsMixin, ListView):
class CashSummaryListView(CanEditPropMixin, CounterAdminTabsMixin, ListView):
"""Display a list of cash summaries"""
model = CashRegisterSummary
template_name = 'counter/cash_summary_list.jinja'
......
......@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-26 11:22+0200\n"
"POT-Creation-Date: 2016-09-28 10:08+0200\n"
"PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Skia <skia@libskia.so>\n"
"Language-Team: AE info <ae.info@utbm.fr>\n"
......@@ -302,6 +302,8 @@ msgstr "Compte en banque : "
#: core/templates/core/group_list.jinja:13
#: core/templates/core/user_account_detail.jinja:67
#: core/templates/core/user_edit.jinja:18
#: counter/templates/counter/last_ops.jinja:29
#: counter/templates/counter/last_ops.jinja:59
#: launderette/templates/launderette/launderette_admin.jinja:16
#: launderette/views.py:146
msgid "Delete"
......@@ -388,6 +390,7 @@ msgstr "Fin"
#: accounting/templates/accounting/journal_details.jinja:28
#: core/templates/core/user_account_detail.jinja:20
#: core/templates/core/user_account_detail.jinja:81
#: counter/templates/counter/last_ops.jinja:17
msgid "Amount"
msgstr "Montant"
......@@ -454,6 +457,8 @@ msgstr "No"
#: core/templates/core/user_account_detail.jinja:46
#: core/templates/core/user_account_detail.jinja:79
#: counter/templates/counter/cash_summary_list.jinja:29
#: counter/templates/counter/last_ops.jinja:14
#: counter/templates/counter/last_ops.jinja:39
msgid "Date"
msgstr "Date"
......@@ -478,7 +483,7 @@ msgid "Done"
msgstr "Effectué"
#: accounting/templates/accounting/journal_details.jinja:34
#: counter/templates/counter/cash_summary_list.jinja:32 counter/views.py:646
#: counter/templates/counter/cash_summary_list.jinja:32 counter/views.py:697
msgid "Comment"
msgstr "Commentaire"
......@@ -630,6 +635,7 @@ msgstr "Au"
#: club/templates/club/club_sellings.jinja:5 club/views.py:57
#: counter/templates/counter/counter_main.jinja:19
#: counter/templates/counter/last_ops.jinja:35
msgid "Sellings"
msgstr "Ventes"
......@@ -655,29 +661,35 @@ msgstr "Total : "
#: club/templates/club/club_sellings.jinja:19 club/views.py:159
#: core/templates/core/user_account_detail.jinja:18
#: core/templates/core/user_account_detail.jinja:47
#: counter/templates/counter/cash_summary_list.jinja:28
#: counter/templates/counter/cash_summary_list.jinja:28 counter/views.py:74
msgid "Counter"
msgstr "Comptoir"
#: club/templates/club/club_sellings.jinja:20
#: core/templates/core/user_account_detail.jinja:19
#: core/templates/core/user_account_detail.jinja:48
#: counter/templates/counter/last_ops.jinja:15
#: counter/templates/counter/last_ops.jinja:40
msgid "Barman"
msgstr "Barman"
#: club/templates/club/club_sellings.jinja:21
#: counter/templates/counter/counter_click.jinja:29
#: counter/templates/counter/last_ops.jinja:16
#: counter/templates/counter/last_ops.jinja:41
msgid "Customer"
msgstr "Client"
#: club/templates/club/club_sellings.jinja:22
#: core/templates/core/user_account_detail.jinja:49
#: counter/templates/counter/last_ops.jinja:42
msgid "Label"
msgstr "Intitulé"
#: club/templates/club/club_sellings.jinja:23
#: core/templates/core/user_account_detail.jinja:50
#: core/templates/core/user_stats.jinja:28
#: counter/templates/counter/last_ops.jinja:43
msgid "Quantity"
msgstr "Quantité"
......@@ -685,6 +697,7 @@ msgstr "Quantité"
#: core/templates/core/user_account.jinja:9
#: core/templates/core/user_account_detail.jinja:51
#: counter/templates/counter/cash_summary_list.jinja:30
#: counter/templates/counter/last_ops.jinja:44
#: counter/templates/counter/stats.jinja:18
msgid "Total"
msgstr "Total"
......@@ -692,6 +705,8 @@ msgstr "Total"
#: club/templates/club/club_sellings.jinja:25
#: core/templates/core/user_account_detail.jinja:21
#: core/templates/core/user_account_detail.jinja:52
#: counter/templates/counter/last_ops.jinja:18
#: counter/templates/counter/last_ops.jinja:45
msgid "Payment method"
msgstr "Méthode de paiement"
......@@ -1342,7 +1357,7 @@ msgid "Please login to see this page."
msgstr "Merci de vous identifier pour voir cette page."
#: core/templates/core/login.jinja:28
#: counter/templates/counter/counter_main.jinja:54
#: counter/templates/counter/counter_main.jinja:55
msgid "login"
msgstr "login"
......@@ -1594,6 +1609,7 @@ msgstr "Compte utilisateur"
#: core/templates/core/user_account.jinja:38
#: core/templates/core/user_account_detail.jinja:13
#: counter/templates/counter/cash_summary_list.jinja:12
#: counter/templates/counter/last_ops.jinja:10
msgid "Refillings"
msgstr "Rechargements"
......@@ -1759,8 +1775,8 @@ msgstr "Fusionner deux utilisateurs"
msgid "Subscriptions"
msgstr "Cotisations"
#: core/templates/core/user_tools.jinja:23 counter/views.py:420
#: counter/views.py:559
#: core/templates/core/user_tools.jinja:23 counter/views.py:445
#: counter/views.py:584
msgid "Counters"
msgstr "Comptoirs"
......@@ -1781,7 +1797,7 @@ msgid "Product types management"
msgstr "Gestion des types de produit"
#: core/templates/core/user_tools.jinja:30
#: counter/templates/counter/cash_summary_list.jinja:18 counter/views.py:440
#: counter/templates/counter/cash_summary_list.jinja:18 counter/views.py:465
msgid "Cash register summaries"
msgstr "Relevés de caisse"
......@@ -1854,7 +1870,7 @@ msgstr "Parrain"
msgid "Godchild"
msgstr "Fillot"
#: core/views/forms.py:204 counter/views.py:37
#: core/views/forms.py:204 counter/views.py:38
msgid "Select user"
msgstr "Choisir un utilisateur"
......@@ -2036,7 +2052,7 @@ msgid "Barman list"
msgstr "Barmans"
#: counter/templates/counter/cash_register_summary.jinja:8
#: counter/templates/counter/counter_main.jinja:44
#: counter/templates/counter/counter_main.jinja:45
msgid "Make a cash register summary"
msgstr "Faire un relevé de caisse"
......@@ -2049,7 +2065,7 @@ msgstr "Liste des relevés de caisse"
msgid "Theoric sums"
msgstr "Sommes théoriques"
#: counter/templates/counter/cash_summary_list.jinja:31 counter/views.py:647
#: counter/templates/counter/cash_summary_list.jinja:31 counter/views.py:698
msgid "Emptied"
msgstr "Coffre vidé"
......@@ -2151,10 +2167,20 @@ msgstr "valider"
msgid "Please, login"
msgstr "Merci de vous identifier"
#: counter/templates/counter/counter_main.jinja:47
#: counter/templates/counter/counter_main.jinja:44
msgid "Display last operations"
msgstr "Dernières opérations"
#: counter/templates/counter/counter_main.jinja:48
msgid "Barman: "
msgstr "Barman : "
#: counter/templates/counter/last_ops.jinja:5
#: counter/templates/counter/last_ops.jinja:9
#, python-format
msgid "%(counter_name)s last operations"
msgstr "Dernières opérations sur %(counter_name)s"
#: counter/templates/counter/product_list.jinja:4
#: counter/templates/counter/product_list.jinja:12
msgid "Product list"
......@@ -2200,105 +2226,113 @@ msgstr "Promo"
msgid "Percentage"
msgstr "Pourcentage"
#: counter/views.py:53
#: counter/views.py:54
msgid "User not found"
msgstr "Utilisateur non trouvé"
#: counter/views.py:101
#: counter/views.py:79
msgid "Cash summary"
msgstr "Relevé de caisse"
#: counter/views.py:84
msgid "Last operations"
msgstr "Dernières opérations"
#: counter/views.py:125
msgid "Bad credentials"
msgstr "Mauvais identifiants"
#: counter/views.py:103
#: counter/views.py:127
msgid "User is not barman"
msgstr "L'utilisateur n'est pas barman."
#: counter/views.py:107
#: counter/views.py:131
msgid "Bad location, someone is already logged in somewhere else"
msgstr "Mauvais comptoir, quelqu'un est déjà connecté ailleurs"
#: counter/views.py:290
#: counter/views.py:315
msgid "END"
msgstr "FIN"
#: counter/views.py:292
#: counter/views.py:317
msgid "CAN"
msgstr "ANN"
#: counter/views.py:322
#: counter/views.py:347
msgid "You have not enough money to buy all the basket"
msgstr "Vous n'avez pas assez d'argent pour acheter le panier"