From 6cf253365b6fd5191288df7ba53613d4209cb168 Mon Sep 17 00:00:00 2001 From: Skia Date: Tue, 13 Sep 2016 02:04:49 +0200 Subject: [PATCH] Add cash register summary view --- core/templates/core/user_tools.jinja | 1 + counter/models.py | 8 ++ .../templates/counter/cash_summary_list.jinja | 58 +++++++++ counter/urls.py | 1 + counter/views.py | 29 ++++- locale/fr/LC_MESSAGES/django.mo | Bin 34080 -> 34434 bytes locale/fr/LC_MESSAGES/django.po | 120 +++++++++++------- sith/settings.py | 2 +- 8 files changed, 171 insertions(+), 48 deletions(-) create mode 100644 counter/templates/counter/cash_summary_list.jinja diff --git a/core/templates/core/user_tools.jinja b/core/templates/core/user_tools.jinja index 1806d63d..bec08530 100644 --- a/core/templates/core/user_tools.jinja +++ b/core/templates/core/user_tools.jinja @@ -26,6 +26,7 @@
  • {% trans %}General counters management{% endtrans %}
  • {% trans %}Products management{% endtrans %}
  • {% trans %}Product types management{% endtrans %}
  • +
  • {% trans %}Cash register summaries{% endtrans %}
  • {% endif %} {% for b in settings.SITH_COUNTER_BARS %} {% if user.is_in_group(b[1]+" admin") %} diff --git a/counter/models.py b/counter/models.py index 9b1aebc1..b553bac9 100644 --- a/counter/models.py +++ b/counter/models.py @@ -346,6 +346,14 @@ class CashRegisterSummary(models.Model): def __str__(self): return "At %s by %s - Total: %s €" % (self.counter, self.user, self.get_total()) + def is_owned_by(self, user): + """ + Method to see if that object can be edited by the given user + """ + if user.is_in_group(settings.SITH_GROUPS['counter-admin']['name']): + return True + return False + def get_total(self): t = 0 for it in self.items.all(): diff --git a/counter/templates/counter/cash_summary_list.jinja b/counter/templates/counter/cash_summary_list.jinja new file mode 100644 index 00000000..02661710 --- /dev/null +++ b/counter/templates/counter/cash_summary_list.jinja @@ -0,0 +1,58 @@ +{% extends "core/base.jinja" %} +{% from 'core/macros.jinja' import user_profile_link %} + +{% block title %} +{% trans %}Cash register summary list{% endtrans %} +{% endblock %} + +{% block content %} +{% if cashsummary_list %} +

    {% trans %}Cash register summary list{% endtrans %}

    +
    {% trans %}Theoric sums{% endtrans %}
    +
    {% trans %}Refillings{% endtrans %}
    +

    +{% for b,s in refilling_sums.items() %} + {{ b }}: {{ s }} €
    +{% endfor %} +

    +
    {% trans %}Cash register summaries{% endtrans %}
    +

    +{% for b,s in summaries_sums.items() %} + {{ b }}: {{ s }} €
    +{% endfor %} +

    + + + + + + + + + + + + + {% for c in cashsummary_list.order_by('-date') %} + + + + + + {% if c.emptied %} + + {% else %} + + {% endif %} + + + {% endfor %} + +
    {% trans %}User{% endtrans %}{% trans %}Counter{% endtrans %}{% trans %}Date{% endtrans %}{% trans %}Total{% endtrans %}{% trans %}Emptied{% endtrans %}{% trans %}Comment{% endtrans %}
    {{ user_profile_link(c.user) }}{{ c.counter }}{{ c.date|localtime|date(DATETIME_FORMAT) }} - {{ c.date|localtime|time(DATETIME_FORMAT) }}{{ c.get_total() }} €{% trans %}yes{% endtrans %}{{ c.comment }}
    +{% else %} +{% trans %}There is no cash register summary in this website.{% endtrans %} +{% endif %} +{% endblock %} + + + diff --git a/counter/urls.py b/counter/urls.py index b5f547ad..2516a0de 100644 --- a/counter/urls.py +++ b/counter/urls.py @@ -14,6 +14,7 @@ urlpatterns = [ url(r'^admin$', CounterListView.as_view(), name='admin_list'), url(r'^admin/new$', CounterCreateView.as_view(), name='new'), url(r'^admin/delete/(?P[0-9]+)$', CounterDeleteView.as_view(), name='delete'), + url(r'^admin/cash_summary/list$', CashSummaryListView.as_view(), name='cash_summary_list'), url(r'^admin/product/list$', ProductListView.as_view(), name='product_list'), url(r'^admin/product/list_archived$', ProductArchivedListView.as_view(), name='product_list_archived'), url(r'^admin/product/create$', ProductCreateView.as_view(), name='new_product'), diff --git a/counter/views.py b/counter/views.py index 96020217..cc0e36aa 100644 --- a/counter/views.py +++ b/counter/views.py @@ -12,7 +12,8 @@ from django.conf import settings from django.db import DataError, transaction import re -from datetime import date, timedelta +import pytz +from datetime import date, timedelta, datetime from ajax_select.fields import AutoCompleteSelectField, AutoCompleteSelectMultipleField from ajax_select import make_ajax_form, make_ajax_field @@ -407,6 +408,11 @@ class CounterTabsMixin(TabedViewMixin): 'slug': 'product_types', 'name': _("Product types"), }, + { + 'url': reverse_lazy('counter:cash_summary_list'), + 'slug': 'cash_summary', + 'name': _("Cash register summaries"), + }, ] class CounterListView(CounterTabsMixin, CanViewMixin, ListView): @@ -687,3 +693,24 @@ class CounterActivityView(DetailView): pk_url_kwarg = "counter_id" template_name = 'counter/activity.jinja' +class CashSummaryListView(CanEditPropMixin, CounterTabsMixin, ListView): + """Display a list of cash summaries""" + model = CashRegisterSummary + template_name = 'counter/cash_summary_list.jinja' + context_object_name = "cashsummary_list" + current_tab = "cash_summary" + + def get_context_data(self, **kwargs): + """ Add sums to the context """ + kwargs = super(CashSummaryListView, self).get_context_data(**kwargs) + kwargs['summaries_sums'] = {} + kwargs['refilling_sums'] = {} + for c in Counter.objects.filter(type="BAR").all(): + last_summary = CashRegisterSummary.objects.filter(counter=c, emptied=True).order_by('-date').first() + if last_summary: + last_date = last_summary.date + else: + last_date = datetime(year=1994, month=5, day=17, tzinfo=pytz.UTC) # My birth date should be old enough + kwargs['summaries_sums'][c.name] = sum([s.get_total() for s in CashRegisterSummary.objects.filter(counter=c, date__gt=last_date).all()]) + kwargs['refilling_sums'][c.name] = sum([s.amount for s in Refilling.objects.filter(counter=c, date__gt=last_date).all()]) + return kwargs diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index 63940e59a8961133180049dd145aba759bfc9be4..ad19e64d45c3517cb718ac337b237786655135e4 100644 GIT binary patch delta 12621 zcmZwM2Y8Nm-~aJ5O9&A%h?NAfMG!N#PuiW)7|Ql-?WQry*A zRkccOI#5Mhv{ldhbDiJx?(rP=c|6~~e(U`0>y-QdUp>or@?2lf*f zLmkJ*4`Ws8I5FiNN6EsN4`0AY?1_0X-CT$fE_DL3Oh}=A^ut*#*^ZfYpyMU&7LqPr*{S8RPIgmc%R--ST*BLc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Jem`QQZ07op%%W}(>$_0sB3hR>{CIO#Zw77@Qt*8cys_q+B#^ZJdOQ!R6s^ir!F zKqIFpZ%ckRF^_aO9?5(VD^O>=<%e?5pS-Sv9=@M%Q?Bb0zTqXk{Xa@UF&DN9SqbOb!-dh07;pKOILOjNsn^7w>5Bzy5O+z}AYBI+Q1=$`0hbU4>5_d?L;7r7AL=f&~=^ohw{eQh-gOW zDnnUIFX{Y6`bW~8F$^bb|A&#$^%e0qai7RX<5jT(_v#X(i6WHg`kwS<;tN8TekuR= zdSsdHxRu~fEazA1zD`sn3R*iuNdKwx*PeKVsAxA{C#`EZQHe^KR~qT_mXD__=ly7QC`T>dVart*j2_{&V4tU48P8tABa14L*%u=)Urmtp)B=34gPHDZj{f` z16;j`IfQ=oO|<(rFoJxBI@*(22qc^{x7Z5xHpCL zJgbvLI+*g8$sZ)XBt{Z7h{Z%Vq8xQ}Z6m4>?-M&IzlH}g-~UAvunEb1umrgV|B-;x=(x!5xAN7A2E=82civ8U;CeV z4d!M!;xGjliH@W*uY#8TnF9W4<+LE5o5)J1U98do@+HX^Bwq;EU=(G#ijvP`=@I0= zAw3d{WbVHzy+r)Ljhs}TO?sFLx!O>cIn1J@Um>I3mRe_UHQ`Ts0};o)TI8RQ z&Q5wD>Z(LKo0oJBQI?y0cYKprMtLxPh~+5P6;E8$i5un1G9;WtbfIETOegA*PQ\n" "Language-Team: AE info \n" @@ -164,6 +164,7 @@ msgstr "type de cible" #: accounting/models.py:190 club/templates/club/club_members.jinja:8 #: club/templates/club/club_old_members.jinja:8 +#: counter/templates/counter/cash_summary_list.jinja:27 #: launderette/templates/launderette/launderette_admin.jinja:44 msgid "User" msgstr "Utilisateur" @@ -270,7 +271,7 @@ msgstr "Liste des types comptable" #: accounting/templates/accounting/journal_details.jinja:9 #: accounting/templates/accounting/operation_edit.jinja:9 #: accounting/templates/accounting/simplifiedaccountingtype_list.jinja:9 -#: core/templates/core/user_tools.jinja:39 +#: core/templates/core/user_tools.jinja:40 msgid "Accounting" msgstr "Comptabilité" @@ -289,7 +290,7 @@ msgstr "Il n'y a pas de types comptable dans ce site web." #: accounting/templates/accounting/bank_account_details.jinja:4 #: accounting/templates/accounting/bank_account_details.jinja:13 -#: core/templates/core/user_tools.jinja:46 +#: core/templates/core/user_tools.jinja:47 msgid "Bank account: " msgstr "Compte en banque : " @@ -325,7 +326,7 @@ msgstr "Nouveau compte club" #: accounting/templates/accounting/club_account_details.jinja:53 #: accounting/templates/accounting/journal_details.jinja:66 club/views.py:52 #: core/templates/core/file.jinja:38 core/templates/core/page.jinja:31 -#: core/templates/core/user_tools.jinja:33 core/views/user.py:145 +#: core/templates/core/user_tools.jinja:34 core/views/user.py:145 #: counter/templates/counter/counter_list.jinja:17 #: counter/templates/counter/counter_list.jinja:31 #: counter/templates/counter/counter_list.jinja:45 @@ -448,6 +449,7 @@ msgstr "No" #: core/templates/core/user_account_detail.jinja:17 #: core/templates/core/user_account_detail.jinja:46 #: core/templates/core/user_account_detail.jinja:79 +#: counter/templates/counter/cash_summary_list.jinja:29 msgid "Date" msgstr "Date" @@ -472,7 +474,7 @@ msgid "Done" msgstr "Effectué" #: accounting/templates/accounting/journal_details.jinja:34 -#: counter/views.py:614 +#: counter/templates/counter/cash_summary_list.jinja:32 counter/views.py:615 msgid "Comment" msgstr "Commentaire" @@ -647,6 +649,7 @@ 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 msgid "Counter" msgstr "Comptoir" @@ -674,6 +677,7 @@ msgstr "Quantité" #: club/templates/club/club_sellings.jinja:24 #: core/templates/core/user_account.jinja:9 #: core/templates/core/user_account_detail.jinja:51 +#: counter/templates/counter/cash_summary_list.jinja:30 msgid "Total" msgstr "Total" @@ -684,7 +688,7 @@ msgid "Payment method" msgstr "Méthode de paiement" #: club/templates/club/club_tools.jinja:4 -#: core/templates/core/user_tools.jinja:58 +#: core/templates/core/user_tools.jinja:59 msgid "Club tools" msgstr "Outils club" @@ -1580,6 +1584,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 msgid "Refillings" msgstr "Rechargements" @@ -1719,8 +1724,8 @@ msgstr "Groupes" msgid "Subscriptions" msgstr "Cotisations" -#: core/templates/core/user_tools.jinja:22 counter/views.py:393 -#: counter/views.py:527 +#: core/templates/core/user_tools.jinja:22 counter/views.py:394 +#: counter/views.py:528 msgid "Counters" msgstr "Comptoirs" @@ -1740,11 +1745,16 @@ msgstr "Gestion des produits" msgid "Product types management" msgstr "Gestion des types de produit" -#: core/templates/core/user_tools.jinja:42 +#: core/templates/core/user_tools.jinja:29 +#: counter/templates/counter/cash_summary_list.jinja:18 +msgid "Cash register summaries" +msgstr "Relevés de caisse" + +#: core/templates/core/user_tools.jinja:43 msgid "General accounting" msgstr "Comptabilité générale" -#: core/templates/core/user_tools.jinja:51 +#: core/templates/core/user_tools.jinja:52 msgid "Club account: " msgstr "Compte club : " @@ -1912,7 +1922,7 @@ msgstr "rechargement" msgid "unit price" msgstr "prix unitaire" -#: counter/models.py:253 counter/models.py:363 eboutic/models.py:104 +#: counter/models.py:253 counter/models.py:371 eboutic/models.py:104 msgid "quantity" msgstr "quantité" @@ -1945,24 +1955,25 @@ msgstr "coffre vidée" msgid "cash register summary" msgstr "relevé de caisse" -#: counter/models.py:361 +#: counter/models.py:369 msgid "cash summary" msgstr "relevé" -#: counter/models.py:362 +#: counter/models.py:370 msgid "value" msgstr "valeur" -#: counter/models.py:364 +#: counter/models.py:372 msgid "check" msgstr "chèque" -#: counter/models.py:367 +#: counter/models.py:375 msgid "cash register summary item" msgstr "élément de relevé de caisse" #: counter/templates/counter/activity.jinja:5 #: counter/templates/counter/activity.jinja:9 +#, python-format msgid "%(counter_name)s activity" msgstr "Activité sur %(counter_name)s" @@ -1975,6 +1986,27 @@ msgstr "Barmans" msgid "Make a cash register summary" msgstr "Faire un relevé de caisse" +#: counter/templates/counter/cash_summary_list.jinja:5 +#: counter/templates/counter/cash_summary_list.jinja:10 +msgid "Cash register summary list" +msgstr "Liste des relevés de caisse" + +#: counter/templates/counter/cash_summary_list.jinja:11 +msgid "Theoric sums" +msgstr "Sommes théoriques" + +#: counter/templates/counter/cash_summary_list.jinja:31 counter/views.py:616 +msgid "Emptied" +msgstr "Coffre vidé" + +#: counter/templates/counter/cash_summary_list.jinja:43 +msgid "yes" +msgstr "oui" + +#: counter/templates/counter/cash_summary_list.jinja:53 +msgid "There is no cash register summary in this website." +msgstr "Il n'y a pas de relevé de caisse dans ce site web." + #: counter/templates/counter/counter_click.jinja:34 #: launderette/templates/launderette/launderette_admin.jinja:8 msgid "Selling" @@ -2095,112 +2127,108 @@ msgstr "Nouveau type de produit" msgid "There is no product types in this website." msgstr "Il n'y a pas de types de produit dans ce site web." -#: counter/views.py:35 +#: counter/views.py:36 msgid "Select user" msgstr "Choisir un utilisateur" -#: counter/views.py:51 +#: counter/views.py:52 msgid "User not found" msgstr "Utilisateur non trouvé" -#: counter/views.py:84 +#: counter/views.py:85 msgid "Bad credentials" msgstr "Mauvais identifiants" -#: counter/views.py:86 +#: counter/views.py:87 msgid "User is not barman" msgstr "L'utilisateur n'est pas barman." -#: counter/views.py:266 +#: counter/views.py:267 msgid "END" msgstr "FIN" -#: counter/views.py:268 +#: counter/views.py:269 msgid "CAN" msgstr "ANN" -#: counter/views.py:298 +#: counter/views.py:299 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:388 +#: counter/views.py:389 msgid "Counter administration" msgstr "Administration des comptoirs" -#: counter/views.py:398 +#: counter/views.py:399 msgid "Products" msgstr "Produits" -#: counter/views.py:403 +#: counter/views.py:404 msgid "Archived products" msgstr "Produits archivés" -#: counter/views.py:408 +#: counter/views.py:409 msgid "Product types" msgstr "Types de produit" -#: counter/views.py:524 +#: counter/views.py:525 msgid "Parent product" msgstr "Produit parent" -#: counter/views.py:525 +#: counter/views.py:526 msgid "Buying groups" msgstr "Groupes d'achat" -#: counter/views.py:594 +#: counter/views.py:595 msgid "10 cents" msgstr "10 centimes" -#: counter/views.py:595 +#: counter/views.py:596 msgid "20 cents" msgstr "20 centimes" -#: counter/views.py:596 +#: counter/views.py:597 msgid "50 cents" msgstr "50 centimes" -#: counter/views.py:597 +#: counter/views.py:598 msgid "1 euro" msgstr "1 €" -#: counter/views.py:598 +#: counter/views.py:599 msgid "2 euros" msgstr "2 €" -#: counter/views.py:599 +#: counter/views.py:600 msgid "5 euros" msgstr "5 €" -#: counter/views.py:600 +#: counter/views.py:601 msgid "10 euros" msgstr "10 €" -#: counter/views.py:601 +#: counter/views.py:602 msgid "20 euros" msgstr "20 €" -#: counter/views.py:602 +#: counter/views.py:603 msgid "50 euros" msgstr "50 €" -#: counter/views.py:603 +#: counter/views.py:604 msgid "100 euros" msgstr "100 €" -#: counter/views.py:604 counter/views.py:606 counter/views.py:608 -#: counter/views.py:610 counter/views.py:612 +#: counter/views.py:605 counter/views.py:607 counter/views.py:609 +#: counter/views.py:611 counter/views.py:613 msgid "Check amount" msgstr "Montant du chèque" -#: counter/views.py:605 counter/views.py:607 counter/views.py:609 -#: counter/views.py:611 counter/views.py:613 +#: counter/views.py:606 counter/views.py:608 counter/views.py:610 +#: counter/views.py:612 counter/views.py:614 msgid "Check quantity" msgstr "Nombre de chèque" -#: counter/views.py:615 -msgid "Emptied" -msgstr "Coffre vidé" - #: eboutic/models.py:49 msgid "validated" msgstr "validé" diff --git a/sith/settings.py b/sith/settings.py index 9d88ed4b..7c99d27e 100644 --- a/sith/settings.py +++ b/sith/settings.py @@ -122,7 +122,7 @@ TEMPLATES = [ "enabled": False, }, "autoescape": True, - "auto_reload": DEBUG, + "auto_reload": True, "translation_engine": "django.utils.translation", } },