mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Add last ops view to the bars
This commit is contained in:
parent
fd482195f8
commit
2e7e78b8ce
@ -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 %}
|
||||
|
67
counter/templates/counter/last_ops.jinja
Normal file
67
counter/templates/counter/last_ops.jinja
Normal file
@ -0,0 +1,67 @@
|
||||
{% 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'),
|
||||
|
146
counter/views.py
146
counter/views.py
@ -1,9 +1,10 @@
|
||||
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'
|
||||
|
Binary file not shown.
@ -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"
|
||||
|
||||
#: counter/views.py:415
|
||||
#: counter/views.py:440
|
||||
msgid "Counter administration"
|
||||
msgstr "Administration des comptoirs"
|
||||
|
||||
#: counter/views.py:425
|
||||
#: counter/views.py:450
|
||||
msgid "Products"
|
||||
msgstr "Produits"
|
||||
|
||||
#: counter/views.py:430
|
||||
#: counter/views.py:455
|
||||
msgid "Archived products"
|
||||
msgstr "Produits archivés"
|
||||
|
||||
#: counter/views.py:435
|
||||
#: counter/views.py:460
|
||||
msgid "Product types"
|
||||
msgstr "Types de produit"
|
||||
|
||||
#: counter/views.py:556
|
||||
#: counter/views.py:581
|
||||
msgid "Parent product"
|
||||
msgstr "Produit parent"
|
||||
|
||||
#: counter/views.py:557
|
||||
#: counter/views.py:582
|
||||
msgid "Buying groups"
|
||||
msgstr "Groupes d'achat"
|
||||
|
||||
#: counter/views.py:626
|
||||
#: counter/views.py:677
|
||||
msgid "10 cents"
|
||||
msgstr "10 centimes"
|
||||
|
||||
#: counter/views.py:627
|
||||
#: counter/views.py:678
|
||||
msgid "20 cents"
|
||||
msgstr "20 centimes"
|
||||
|
||||
#: counter/views.py:628
|
||||
#: counter/views.py:679
|
||||
msgid "50 cents"
|
||||
msgstr "50 centimes"
|
||||
|
||||
#: counter/views.py:629
|
||||
#: counter/views.py:680
|
||||
msgid "1 euro"
|
||||
msgstr "1 €"
|
||||
|
||||
#: counter/views.py:630
|
||||
#: counter/views.py:681
|
||||
msgid "2 euros"
|
||||
msgstr "2 €"
|
||||
|
||||
#: counter/views.py:631
|
||||
#: counter/views.py:682
|
||||
msgid "5 euros"
|
||||
msgstr "5 €"
|
||||
|
||||
#: counter/views.py:632
|
||||
#: counter/views.py:683
|
||||
msgid "10 euros"
|
||||
msgstr "10 €"
|
||||
|
||||
#: counter/views.py:633
|
||||
#: counter/views.py:684
|
||||
msgid "20 euros"
|
||||
msgstr "20 €"
|
||||
|
||||
#: counter/views.py:634
|
||||
#: counter/views.py:685
|
||||
msgid "50 euros"
|
||||
msgstr "50 €"
|
||||
|
||||
#: counter/views.py:635
|
||||
#: counter/views.py:686
|
||||
msgid "100 euros"
|
||||
msgstr "100 €"
|
||||
|
||||
#: counter/views.py:636 counter/views.py:638 counter/views.py:640
|
||||
#: counter/views.py:642 counter/views.py:644
|
||||
#: counter/views.py:687 counter/views.py:689 counter/views.py:691
|
||||
#: counter/views.py:693 counter/views.py:695
|
||||
msgid "Check amount"
|
||||
msgstr "Montant du chèque"
|
||||
|
||||
#: counter/views.py:637 counter/views.py:639 counter/views.py:641
|
||||
#: counter/views.py:643 counter/views.py:645
|
||||
#: counter/views.py:688 counter/views.py:690 counter/views.py:692
|
||||
#: counter/views.py:694 counter/views.py:696
|
||||
msgid "Check quantity"
|
||||
msgstr "Nombre de chèque"
|
||||
|
||||
@ -2434,12 +2468,12 @@ msgid "Washing and drying"
|
||||
msgstr "Lavage et séchage"
|
||||
|
||||
#: launderette/templates/launderette/launderette_book.jinja:27
|
||||
#: sith/settings.py:412
|
||||
#: sith/settings.py:415
|
||||
msgid "Washing"
|
||||
msgstr "Lavage"
|
||||
|
||||
#: launderette/templates/launderette/launderette_book.jinja:31
|
||||
#: sith/settings.py:412
|
||||
#: sith/settings.py:415
|
||||
msgid "Drying"
|
||||
msgstr "Séchage"
|
||||
|
||||
@ -2658,4 +2692,3 @@ msgstr "Un utilisateur avec cette adresse email existe déjà"
|
||||
msgid "You must either choose an existing user or create a new one properly"
|
||||
msgstr ""
|
||||
"Vous devez soit choisir un utilisateur existant, ou en créer un proprement."
|
||||
|
||||
|
@ -398,6 +398,9 @@ SITH_MAXIMUM_FREE_ROLE=1
|
||||
# Minutes to timeout the logged barmen
|
||||
SITH_BARMAN_TIMEOUT=20
|
||||
|
||||
# Minutes to delete the last operations
|
||||
SITH_LAST_OPERATIONS_LIMIT=5
|
||||
|
||||
# ET variables
|
||||
SITH_EBOUTIC_ET_URL = "https://preprod-tpeweb.e-transactions.fr/cgi/MYchoix_pagepaiement.cgi"
|
||||
SITH_EBOUTIC_PBX_SITE = "4000666"
|
||||
|
Loading…
Reference in New Issue
Block a user