RecurrentTransaction amount history

This commit is contained in:
Yohann D'ANELLO 2020-04-27 03:21:13 +02:00
parent c5f3f9b760
commit 2bc2048076
5 changed files with 220 additions and 144 deletions

View File

@ -4,7 +4,7 @@
from django import forms from django import forms
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from note_kfet.inputs import Autocomplete from note_kfet.inputs import Autocomplete, AmountInput
from .models import TransactionTemplate, NoteClub from .models import TransactionTemplate, NoteClub
@ -24,11 +24,6 @@ class TransactionTemplateForm(forms.ModelForm):
model = TransactionTemplate model = TransactionTemplate
fields = '__all__' fields = '__all__'
# Le champ de destination est remplacé par un champ d'auto-complétion.
# Quand des lettres sont tapées, une requête est envoyée sur l'API d'auto-complétion
# et récupère les aliases valides
# Pour force le type d'une note, il faut rajouter le paramètre :
# forward=(forward.Const('TYPE', 'note_type') où TYPE est dans {user, club, special}
widgets = { widgets = {
'destination': 'destination':
Autocomplete( Autocomplete(
@ -41,4 +36,5 @@ class TransactionTemplateForm(forms.ModelForm):
'placeholder': 'Note ...', 'placeholder': 'Note ...',
}, },
), ),
'amount': AmountInput(),
} }

View File

@ -1,5 +1,6 @@
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay # Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
import json
from django.conf import settings from django.conf import settings
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.mixins import LoginRequiredMixin
@ -80,6 +81,33 @@ class TransactionTemplateUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, Up
form_class = TransactionTemplateForm form_class = TransactionTemplateForm
success_url = reverse_lazy('note:template_list') success_url = reverse_lazy('note:template_list')
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
if "logs" in settings.INSTALLED_APPS:
from logs.models import Changelog
update_logs = Changelog.objects.filter(
model=ContentType.objects.get_for_model(TransactionTemplate),
instance_pk=self.object.pk,
action="edit",
)
price_history = []
for log in update_logs.all():
old_dict = json.loads(log.previous)
new_dict = json.loads(log.data)
old_price = old_dict["amount"]
new_price = new_dict["amount"]
if old_price != new_price:
price_history.append(dict(price=old_price, time=log.timestamp))
price_history.append(dict(price=self.object.amount, time=None))
price_history.reverse()
context["price_history"] = price_history
return context
class ConsoView(ProtectQuerysetMixin, LoginRequiredMixin, SingleTableView): class ConsoView(ProtectQuerysetMixin, LoginRequiredMixin, SingleTableView):
""" """

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-09 21:59+0200\n" "POT-Creation-Date: 2020-04-27 03:19+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -19,27 +19,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps/activity/apps.py:10 apps/activity/models.py:102 #: apps/activity/apps.py:10 apps/activity/models.py:102
#: apps/activity/models.py:111 #: apps/activity/models.py:117
msgid "activity" msgid "activity"
msgstr "" msgstr ""
#: apps/activity/forms.py:45 apps/activity/models.py:208 #: apps/activity/forms.py:45 apps/activity/models.py:213
msgid "You can't invite someone once the activity is started." msgid "You can't invite someone once the activity is started."
msgstr "" msgstr ""
#: apps/activity/forms.py:48 apps/activity/models.py:211 #: apps/activity/forms.py:48 apps/activity/models.py:216
msgid "This activity is not validated yet." msgid "This activity is not validated yet."
msgstr "" msgstr ""
#: apps/activity/forms.py:58 apps/activity/models.py:219 #: apps/activity/forms.py:58 apps/activity/models.py:224
msgid "This person has been already invited 5 times this year." msgid "This person has been already invited 5 times this year."
msgstr "" msgstr ""
#: apps/activity/forms.py:62 apps/activity/models.py:223 #: apps/activity/forms.py:62 apps/activity/models.py:228
msgid "This person is already invited." msgid "This person is already invited."
msgstr "" msgstr ""
#: apps/activity/forms.py:66 apps/activity/models.py:227 #: apps/activity/forms.py:66 apps/activity/models.py:232
msgid "You can't invite more than 3 people to this activity." msgid "You can't invite more than 3 people to this activity."
msgstr "" msgstr ""
@ -113,57 +113,57 @@ msgstr ""
msgid "activities" msgid "activities"
msgstr "" msgstr ""
#: apps/activity/models.py:116 #: apps/activity/models.py:122
msgid "entry time" msgid "entry time"
msgstr "" msgstr ""
#: apps/activity/models.py:122 apps/note/apps.py:14 #: apps/activity/models.py:128 apps/note/apps.py:14
#: apps/note/models/notes.py:58 #: apps/note/models/notes.py:58
msgid "note" msgid "note"
msgstr "" msgstr ""
#: apps/activity/models.py:133 templates/activity/activity_entry.html:38 #: apps/activity/models.py:139 templates/activity/activity_entry.html:38
msgid "entry" msgid "entry"
msgstr "" msgstr ""
#: apps/activity/models.py:134 templates/activity/activity_entry.html:38 #: apps/activity/models.py:140 templates/activity/activity_entry.html:38
msgid "entries" msgid "entries"
msgstr "" msgstr ""
#: apps/activity/models.py:141 #: apps/activity/models.py:146
msgid "Already entered on " msgid "Already entered on "
msgstr "" msgstr ""
#: apps/activity/models.py:141 apps/activity/tables.py:54 #: apps/activity/models.py:146 apps/activity/tables.py:54
msgid "{:%Y-%m-%d %H:%M:%S}" msgid "{:%Y-%m-%d %H:%M:%S}"
msgstr "" msgstr ""
#: apps/activity/models.py:149 #: apps/activity/models.py:154
msgid "The balance is negative." msgid "The balance is negative."
msgstr "" msgstr ""
#: apps/activity/models.py:179 #: apps/activity/models.py:184
msgid "last name" msgid "last name"
msgstr "" msgstr ""
#: apps/activity/models.py:184 templates/member/profile_info.html:14 #: apps/activity/models.py:189 templates/member/profile_info.html:14
#: templates/registration/future_profile_detail.html:16 #: templates/registration/future_profile_detail.html:16
msgid "first name" msgid "first name"
msgstr "" msgstr ""
#: apps/activity/models.py:191 #: apps/activity/models.py:196
msgid "inviter" msgid "inviter"
msgstr "" msgstr ""
#: apps/activity/models.py:232 #: apps/activity/models.py:237
msgid "guest" msgid "guest"
msgstr "" msgstr ""
#: apps/activity/models.py:233 #: apps/activity/models.py:238
msgid "guests" msgid "guests"
msgstr "" msgstr ""
#: apps/activity/models.py:245 #: apps/activity/models.py:250
msgid "Invitation" msgid "Invitation"
msgstr "" msgstr ""
@ -186,7 +186,7 @@ msgstr ""
#: apps/activity/tables.py:79 apps/member/forms.py:80 #: apps/activity/tables.py:79 apps/member/forms.py:80
#: apps/registration/forms.py:60 apps/treasury/forms.py:123 #: apps/registration/forms.py:60 apps/treasury/forms.py:123
#: templates/note/transaction_form.html:97 #: templates/note/transaction_form.html:126
msgid "First name" msgid "First name"
msgstr "" msgstr ""
@ -198,11 +198,11 @@ msgstr ""
msgid "Balance" msgid "Balance"
msgstr "" msgstr ""
#: apps/activity/views.py:45 templates/base.html:106 #: apps/activity/views.py:46 templates/base.html:121
msgid "Activities" msgid "Activities"
msgstr "" msgstr ""
#: apps/activity/views.py:154 #: apps/activity/views.py:160
msgid "Entry for activity \"{}\"" msgid "Entry for activity \"{}\""
msgstr "" msgstr ""
@ -296,7 +296,7 @@ msgid "Credit amount"
msgstr "" msgstr ""
#: apps/member/forms.py:85 apps/registration/forms.py:65 #: apps/member/forms.py:85 apps/registration/forms.py:65
#: apps/treasury/forms.py:125 templates/note/transaction_form.html:103 #: apps/treasury/forms.py:125 templates/note/transaction_form.html:132
msgid "Bank" msgid "Bank"
msgstr "" msgstr ""
@ -666,9 +666,9 @@ msgid "transactions"
msgstr "" msgstr ""
#: apps/note/models/transactions.py:207 #: apps/note/models/transactions.py:207
#: templates/activity/activity_entry.html:13 templates/base.html:84 #: templates/activity/activity_entry.html:13 templates/base.html:99
#: templates/note/transaction_form.html:19 #: templates/note/transaction_form.html:19
#: templates/note/transaction_form.html:145 #: templates/note/transaction_form.html:140
msgid "Transfer" msgid "Transfer"
msgstr "" msgstr ""
@ -719,15 +719,15 @@ msgid "Delete"
msgstr "" msgstr ""
#: apps/note/tables.py:146 templates/member/club_info.html:55 #: apps/note/tables.py:146 templates/member/club_info.html:55
#: templates/note/conso_form.html:121 #: templates/note/conso_form.html:128
msgid "Edit" msgid "Edit"
msgstr "" msgstr ""
#: apps/note/views.py:40 #: apps/note/views.py:41
msgid "Transfer money" msgid "Transfer money"
msgstr "" msgstr ""
#: apps/note/views.py:109 templates/base.html:79 #: apps/note/views.py:137 templates/base.html:94
msgid "Consumptions" msgid "Consumptions"
msgstr "" msgstr ""
@ -810,7 +810,7 @@ msgid ""
"The entered amount is not enough for the memberships, should be at least {}" "The entered amount is not enough for the memberships, should be at least {}"
msgstr "" msgstr ""
#: apps/treasury/apps.py:12 templates/base.html:111 #: apps/treasury/apps.py:12 templates/base.html:126
msgid "Treasury" msgid "Treasury"
msgstr "" msgstr ""
@ -836,7 +836,7 @@ msgid "You can't change the type of the remittance."
msgstr "" msgstr ""
#: apps/treasury/forms.py:127 apps/treasury/tables.py:47 #: apps/treasury/forms.py:127 apps/treasury/tables.py:47
#: templates/note/transaction_form.html:133 #: templates/note/transaction_form.html:95
#: templates/treasury/remittance_form.html:18 #: templates/treasury/remittance_form.html:18
msgid "Amount" msgid "Amount"
msgstr "" msgstr ""
@ -857,7 +857,7 @@ msgstr ""
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: apps/treasury/models.py:46 templates/note/transaction_form.html:91 #: apps/treasury/models.py:46 templates/note/transaction_form.html:120
msgid "Name" msgid "Name"
msgstr "" msgstr ""
@ -1052,19 +1052,19 @@ msgstr ""
msgid "The ENS Paris-Saclay BDE note." msgid "The ENS Paris-Saclay BDE note."
msgstr "" msgstr ""
#: templates/base.html:89 #: templates/base.html:104
msgid "Users" msgid "Users"
msgstr "" msgstr ""
#: templates/base.html:94 #: templates/base.html:109
msgid "Clubs" msgid "Clubs"
msgstr "" msgstr ""
#: templates/base.html:100 #: templates/base.html:115
msgid "Registrations" msgid "Registrations"
msgstr "" msgstr ""
#: templates/base.html:150 #: templates/base.html:165
msgid "" msgid ""
"Your e-mail address is not validated. Please check your mail inbox and click " "Your e-mail address is not validated. Please check your mail inbox and click "
"on the validation link." "on the validation link."
@ -1227,36 +1227,41 @@ msgstr ""
msgid "Save Changes" msgid "Save Changes"
msgstr "" msgstr ""
#: templates/member/user_list.html:14 #: templates/member/user_list.html:15
#: templates/registration/future_user_list.html:17 #: templates/registration/future_user_list.html:17
msgid "There is no pending user with this pattern." msgid "There is no pending user with this pattern."
msgstr "" msgstr ""
#: templates/note/conso_form.html:28 templates/note/transaction_form.html:55 #: templates/note/conso_form.html:28
msgid "Select emitters" msgid "Consum"
msgstr "" msgstr ""
#: templates/note/conso_form.html:45 #: templates/note/conso_form.html:39 templates/note/transaction_form.html:61
#: templates/note/transaction_form.html:76
msgid "Name or alias..."
msgstr ""
#: templates/note/conso_form.html:48
msgid "Select consumptions" msgid "Select consumptions"
msgstr "" msgstr ""
#: templates/note/conso_form.html:51 #: templates/note/conso_form.html:57
msgid "Consume!" msgid "Consume!"
msgstr "" msgstr ""
#: templates/note/conso_form.html:64 #: templates/note/conso_form.html:71
msgid "Most used buttons" msgid "Most used buttons"
msgstr "" msgstr ""
#: templates/note/conso_form.html:126 #: templates/note/conso_form.html:134
msgid "Single consumptions" msgid "Single consumptions"
msgstr "" msgstr ""
#: templates/note/conso_form.html:130 #: templates/note/conso_form.html:139
msgid "Double consumptions" msgid "Double consumptions"
msgstr "" msgstr ""
#: templates/note/conso_form.html:141 templates/note/transaction_form.html:152 #: templates/note/conso_form.html:150 templates/note/transaction_form.html:151
msgid "Recent transactions history" msgid "Recent transactions history"
msgstr "" msgstr ""
@ -1264,36 +1269,42 @@ msgstr ""
msgid "Gift" msgid "Gift"
msgstr "" msgstr ""
#: templates/note/transaction_form.html:73 #: templates/note/transaction_form.html:55
msgid "External payment" msgid "Select emitters"
msgstr "" msgstr ""
#: templates/note/transaction_form.html:81 #: templates/note/transaction_form.html:70
msgid "Transfer type"
msgstr ""
#: templates/note/transaction_form.html:116
#: templates/note/transaction_form.html:169
#: templates/note/transaction_form.html:176
msgid "Select receivers" msgid "Select receivers"
msgstr "" msgstr ""
#: templates/note/transaction_form.html:138 #: templates/note/transaction_form.html:87
msgid "Action"
msgstr ""
#: templates/note/transaction_form.html:102
msgid "Reason" msgid "Reason"
msgstr "" msgstr ""
#: templates/note/transaction_form.html:183 #: templates/note/transaction_form.html:110
msgid "Credit note" msgid "Transfer type"
msgstr "" msgstr ""
#: templates/note/transaction_form.html:190 #: templates/note/transactiontemplate_form.html:10
msgid "Debit note"
msgstr ""
#: templates/note/transactiontemplate_form.html:6
msgid "Buttons list" msgid "Buttons list"
msgstr "" msgstr ""
#: templates/note/transactiontemplate_form.html:21
msgid "Price history"
msgstr ""
#: templates/note/transactiontemplate_form.html:24
msgid "Obsolete since"
msgstr ""
#: templates/note/transactiontemplate_form.html:24
msgid "Current price"
msgstr ""
#: templates/note/transactiontemplate_list.html:9 #: templates/note/transactiontemplate_list.html:9
msgid "search button" msgid "search button"
msgstr "" msgstr ""

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-09 21:59+0200\n" "POT-Creation-Date: 2020-04-27 03:19+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -14,28 +14,28 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: apps/activity/apps.py:10 apps/activity/models.py:102 #: apps/activity/apps.py:10 apps/activity/models.py:102
#: apps/activity/models.py:111 #: apps/activity/models.py:117
msgid "activity" msgid "activity"
msgstr "activité" msgstr "activité"
#: apps/activity/forms.py:45 apps/activity/models.py:208 #: apps/activity/forms.py:45 apps/activity/models.py:213
msgid "You can't invite someone once the activity is started." msgid "You can't invite someone once the activity is started."
msgstr "" msgstr ""
"Vous ne pouvez pas inviter quelqu'un une fois que l'activité a démarré." "Vous ne pouvez pas inviter quelqu'un une fois que l'activité a démarré."
#: apps/activity/forms.py:48 apps/activity/models.py:211 #: apps/activity/forms.py:48 apps/activity/models.py:216
msgid "This activity is not validated yet." msgid "This activity is not validated yet."
msgstr "Cette activité n'est pas encore validée." msgstr "Cette activité n'est pas encore validée."
#: apps/activity/forms.py:58 apps/activity/models.py:219 #: apps/activity/forms.py:58 apps/activity/models.py:224
msgid "This person has been already invited 5 times this year." msgid "This person has been already invited 5 times this year."
msgstr "Cette personne a déjà été invitée 5 fois cette année." msgstr "Cette personne a déjà été invitée 5 fois cette année."
#: apps/activity/forms.py:62 apps/activity/models.py:223 #: apps/activity/forms.py:62 apps/activity/models.py:228
msgid "This person is already invited." msgid "This person is already invited."
msgstr "Cette personne est déjà invitée." msgstr "Cette personne est déjà invitée."
#: apps/activity/forms.py:66 apps/activity/models.py:227 #: apps/activity/forms.py:66 apps/activity/models.py:232
msgid "You can't invite more than 3 people to this activity." msgid "You can't invite more than 3 people to this activity."
msgstr "Vous ne pouvez pas inviter plus de 3 personnes à cette activité." msgstr "Vous ne pouvez pas inviter plus de 3 personnes à cette activité."
@ -109,57 +109,57 @@ msgstr "ouvrir"
msgid "activities" msgid "activities"
msgstr "activités" msgstr "activités"
#: apps/activity/models.py:116 #: apps/activity/models.py:122
msgid "entry time" msgid "entry time"
msgstr "heure d'entrée" msgstr "heure d'entrée"
#: apps/activity/models.py:122 apps/note/apps.py:14 #: apps/activity/models.py:128 apps/note/apps.py:14
#: apps/note/models/notes.py:58 #: apps/note/models/notes.py:58
msgid "note" msgid "note"
msgstr "note" msgstr "note"
#: apps/activity/models.py:133 templates/activity/activity_entry.html:38 #: apps/activity/models.py:139 templates/activity/activity_entry.html:38
msgid "entry" msgid "entry"
msgstr "entrée" msgstr "entrée"
#: apps/activity/models.py:134 templates/activity/activity_entry.html:38 #: apps/activity/models.py:140 templates/activity/activity_entry.html:38
msgid "entries" msgid "entries"
msgstr "entrées" msgstr "entrées"
#: apps/activity/models.py:141 #: apps/activity/models.py:146
msgid "Already entered on " msgid "Already entered on "
msgstr "Déjà rentré le " msgstr "Déjà rentré le "
#: apps/activity/models.py:141 apps/activity/tables.py:54 #: apps/activity/models.py:146 apps/activity/tables.py:54
msgid "{:%Y-%m-%d %H:%M:%S}" msgid "{:%Y-%m-%d %H:%M:%S}"
msgstr "{:%d/%m/%Y %H:%M:%S}" msgstr "{:%d/%m/%Y %H:%M:%S}"
#: apps/activity/models.py:149 #: apps/activity/models.py:154
msgid "The balance is negative." msgid "The balance is negative."
msgstr "La note est en négatif." msgstr "La note est en négatif."
#: apps/activity/models.py:179 #: apps/activity/models.py:184
msgid "last name" msgid "last name"
msgstr "nom de famille" msgstr "nom de famille"
#: apps/activity/models.py:184 templates/member/profile_info.html:14 #: apps/activity/models.py:189 templates/member/profile_info.html:14
#: templates/registration/future_profile_detail.html:16 #: templates/registration/future_profile_detail.html:16
msgid "first name" msgid "first name"
msgstr "prénom" msgstr "prénom"
#: apps/activity/models.py:191 #: apps/activity/models.py:196
msgid "inviter" msgid "inviter"
msgstr "hôte" msgstr "hôte"
#: apps/activity/models.py:232 #: apps/activity/models.py:237
msgid "guest" msgid "guest"
msgstr "invité" msgstr "invité"
#: apps/activity/models.py:233 #: apps/activity/models.py:238
msgid "guests" msgid "guests"
msgstr "invités" msgstr "invités"
#: apps/activity/models.py:245 #: apps/activity/models.py:250
msgid "Invitation" msgid "Invitation"
msgstr "Invitation" msgstr "Invitation"
@ -182,7 +182,7 @@ msgstr "Nom de famille"
#: apps/activity/tables.py:79 apps/member/forms.py:80 #: apps/activity/tables.py:79 apps/member/forms.py:80
#: apps/registration/forms.py:60 apps/treasury/forms.py:123 #: apps/registration/forms.py:60 apps/treasury/forms.py:123
#: templates/note/transaction_form.html:97 #: templates/note/transaction_form.html:126
msgid "First name" msgid "First name"
msgstr "Prénom" msgstr "Prénom"
@ -194,11 +194,11 @@ msgstr "Note"
msgid "Balance" msgid "Balance"
msgstr "Solde du compte" msgstr "Solde du compte"
#: apps/activity/views.py:45 templates/base.html:106 #: apps/activity/views.py:46 templates/base.html:121
msgid "Activities" msgid "Activities"
msgstr "Activités" msgstr "Activités"
#: apps/activity/views.py:154 #: apps/activity/views.py:160
msgid "Entry for activity \"{}\"" msgid "Entry for activity \"{}\""
msgstr "Entrées pour l'activité « {} »" msgstr "Entrées pour l'activité « {} »"
@ -292,7 +292,7 @@ msgid "Credit amount"
msgstr "Montant à créditer" msgstr "Montant à créditer"
#: apps/member/forms.py:85 apps/registration/forms.py:65 #: apps/member/forms.py:85 apps/registration/forms.py:65
#: apps/treasury/forms.py:125 templates/note/transaction_form.html:103 #: apps/treasury/forms.py:125 templates/note/transaction_form.html:132
msgid "Bank" msgid "Bank"
msgstr "Banque" msgstr "Banque"
@ -669,9 +669,9 @@ msgid "transactions"
msgstr "transactions" msgstr "transactions"
#: apps/note/models/transactions.py:207 #: apps/note/models/transactions.py:207
#: templates/activity/activity_entry.html:13 templates/base.html:84 #: templates/activity/activity_entry.html:13 templates/base.html:99
#: templates/note/transaction_form.html:19 #: templates/note/transaction_form.html:19
#: templates/note/transaction_form.html:145 #: templates/note/transaction_form.html:140
msgid "Transfer" msgid "Transfer"
msgstr "Virement" msgstr "Virement"
@ -722,15 +722,15 @@ msgid "Delete"
msgstr "Supprimer" msgstr "Supprimer"
#: apps/note/tables.py:146 templates/member/club_info.html:55 #: apps/note/tables.py:146 templates/member/club_info.html:55
#: templates/note/conso_form.html:121 #: templates/note/conso_form.html:128
msgid "Edit" msgid "Edit"
msgstr "Éditer" msgstr "Éditer"
#: apps/note/views.py:40 #: apps/note/views.py:41
msgid "Transfer money" msgid "Transfer money"
msgstr "Transférer de l'argent" msgstr "Transférer de l'argent"
#: apps/note/views.py:109 templates/base.html:79 #: apps/note/views.py:137 templates/base.html:94
msgid "Consumptions" msgid "Consumptions"
msgstr "Consommations" msgstr "Consommations"
@ -815,7 +815,7 @@ msgstr ""
"Le montant crédité est trop faible pour adhérer, il doit être au minimum de " "Le montant crédité est trop faible pour adhérer, il doit être au minimum de "
"{}" "{}"
#: apps/treasury/apps.py:12 templates/base.html:111 #: apps/treasury/apps.py:12 templates/base.html:126
msgid "Treasury" msgid "Treasury"
msgstr "Trésorerie" msgstr "Trésorerie"
@ -841,7 +841,7 @@ msgid "You can't change the type of the remittance."
msgstr "Vous ne pouvez pas changer le type de la remise." msgstr "Vous ne pouvez pas changer le type de la remise."
#: apps/treasury/forms.py:127 apps/treasury/tables.py:47 #: apps/treasury/forms.py:127 apps/treasury/tables.py:47
#: templates/note/transaction_form.html:133 #: templates/note/transaction_form.html:95
#: templates/treasury/remittance_form.html:18 #: templates/treasury/remittance_form.html:18
msgid "Amount" msgid "Amount"
msgstr "Montant" msgstr "Montant"
@ -862,7 +862,7 @@ msgstr "Objet"
msgid "Description" msgid "Description"
msgstr "Description" msgstr "Description"
#: apps/treasury/models.py:46 templates/note/transaction_form.html:91 #: apps/treasury/models.py:46 templates/note/transaction_form.html:120
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
@ -1057,19 +1057,19 @@ msgstr "Toutes les activités"
msgid "The ENS Paris-Saclay BDE note." msgid "The ENS Paris-Saclay BDE note."
msgstr "La note du BDE de l'ENS Paris-Saclay." msgstr "La note du BDE de l'ENS Paris-Saclay."
#: templates/base.html:89 #: templates/base.html:104
msgid "Users" msgid "Users"
msgstr "Utilisateurs" msgstr "Utilisateurs"
#: templates/base.html:94 #: templates/base.html:109
msgid "Clubs" msgid "Clubs"
msgstr "Clubs" msgstr "Clubs"
#: templates/base.html:100 #: templates/base.html:115
msgid "Registrations" msgid "Registrations"
msgstr "Inscriptions" msgstr "Inscriptions"
#: templates/base.html:150 #: templates/base.html:165
msgid "" msgid ""
"Your e-mail address is not validated. Please check your mail inbox and click " "Your e-mail address is not validated. Please check your mail inbox and click "
"on the validation link." "on the validation link."
@ -1234,36 +1234,43 @@ msgstr "Voir mes adhésions"
msgid "Save Changes" msgid "Save Changes"
msgstr "Sauvegarder les changements" msgstr "Sauvegarder les changements"
#: templates/member/user_list.html:14 #: templates/member/user_list.html:15
#: templates/registration/future_user_list.html:17 #: templates/registration/future_user_list.html:17
msgid "There is no pending user with this pattern." msgid "There is no pending user with this pattern."
msgstr "Il n'y a pas d'inscription en attente avec cette entrée." msgstr "Il n'y a pas d'inscription en attente avec cette entrée."
#: templates/note/conso_form.html:28 templates/note/transaction_form.html:55 #: templates/note/conso_form.html:28
msgid "Select emitters" #, fuzzy
msgstr "Sélection des émetteurs" #| msgid "Consume!"
msgid "Consum"
msgstr "Consommer !"
#: templates/note/conso_form.html:45 #: templates/note/conso_form.html:39 templates/note/transaction_form.html:61
#: templates/note/transaction_form.html:76
msgid "Name or alias..."
msgstr ""
#: templates/note/conso_form.html:48
msgid "Select consumptions" msgid "Select consumptions"
msgstr "Sélection des consommations" msgstr "Sélection des consommations"
#: templates/note/conso_form.html:51 #: templates/note/conso_form.html:57
msgid "Consume!" msgid "Consume!"
msgstr "Consommer !" msgstr "Consommer !"
#: templates/note/conso_form.html:64 #: templates/note/conso_form.html:71
msgid "Most used buttons" msgid "Most used buttons"
msgstr "Boutons les plus utilisés" msgstr "Boutons les plus utilisés"
#: templates/note/conso_form.html:126 #: templates/note/conso_form.html:134
msgid "Single consumptions" msgid "Single consumptions"
msgstr "Consommations simples" msgstr "Consommations simples"
#: templates/note/conso_form.html:130 #: templates/note/conso_form.html:139
msgid "Double consumptions" msgid "Double consumptions"
msgstr "Consommations doubles" msgstr "Consommations doubles"
#: templates/note/conso_form.html:141 templates/note/transaction_form.html:152 #: templates/note/conso_form.html:150 templates/note/transaction_form.html:151
msgid "Recent transactions history" msgid "Recent transactions history"
msgstr "Historique des transactions récentes" msgstr "Historique des transactions récentes"
@ -1271,36 +1278,44 @@ msgstr "Historique des transactions récentes"
msgid "Gift" msgid "Gift"
msgstr "Don" msgstr "Don"
#: templates/note/transaction_form.html:73 #: templates/note/transaction_form.html:55
msgid "External payment" msgid "Select emitters"
msgstr "Paiement externe" msgstr "Sélection des émetteurs"
#: templates/note/transaction_form.html:81 #: templates/note/transaction_form.html:70
msgid "Transfer type"
msgstr "Type de transfert"
#: templates/note/transaction_form.html:116
#: templates/note/transaction_form.html:169
#: templates/note/transaction_form.html:176
msgid "Select receivers" msgid "Select receivers"
msgstr "Sélection des destinataires" msgstr "Sélection des destinataires"
#: templates/note/transaction_form.html:138 #: templates/note/transaction_form.html:87
#, fuzzy
#| msgid "action"
msgid "Action"
msgstr "Action"
#: templates/note/transaction_form.html:102
msgid "Reason" msgid "Reason"
msgstr "Raison" msgstr "Raison"
#: templates/note/transaction_form.html:183 #: templates/note/transaction_form.html:110
msgid "Credit note" msgid "Transfer type"
msgstr "Note à recharger" msgstr "Type de transfert"
#: templates/note/transaction_form.html:190 #: templates/note/transactiontemplate_form.html:10
msgid "Debit note"
msgstr "Note à débiter"
#: templates/note/transactiontemplate_form.html:6
msgid "Buttons list" msgid "Buttons list"
msgstr "Liste des boutons" msgstr "Liste des boutons"
#: templates/note/transactiontemplate_form.html:21
msgid "Price history"
msgstr "Historique des prix"
#: templates/note/transactiontemplate_form.html:24
msgid "Obsolete since"
msgstr "Obsolète depuis"
#: templates/note/transactiontemplate_form.html:24
msgid "Current price"
msgstr "Prix actuel"
#: templates/note/transactiontemplate_list.html:9 #: templates/note/transactiontemplate_list.html:9
msgid "search button" msgid "search button"
msgstr "Chercher un bouton" msgstr "Chercher un bouton"
@ -1334,15 +1349,16 @@ msgstr "Vous pouvez désormais <a href=\"%(login_url)s\">vous connecter</a>."
msgid "" msgid ""
"You must pay now your membership in the Kfet to complete your registration." "You must pay now your membership in the Kfet to complete your registration."
msgstr "" msgstr ""
"Vous devez désormais payer votre adhésion à la Kfet pour compléter votre inscription." "Vous devez désormais payer votre adhésion à la Kfet pour compléter votre "
"inscription."
#: templates/registration/email_validation_complete.html:13 #: templates/registration/email_validation_complete.html:13
msgid "" msgid ""
"The link was invalid. The token may have expired. Please send us an email to " "The link was invalid. The token may have expired. Please send us an email to "
"activate your account." "activate your account."
msgstr "" msgstr ""
"Le lien est invalide. Le jeton a sans doute expiré. Merci de nous contacter pour " "Le lien est invalide. Le jeton a sans doute expiré. Merci de nous contacter "
"activer votre compte." "pour activer votre compte."
#: templates/registration/future_profile_detail.html:56 #: templates/registration/future_profile_detail.html:56
msgid "Delete registration" msgid "Delete registration"
@ -1414,8 +1430,8 @@ msgid ""
"After that, you'll have to wait that someone validates your account before " "After that, you'll have to wait that someone validates your account before "
"you can log in. You will need to pay your membership in the Kfet." "you can log in. You will need to pay your membership in the Kfet."
msgstr "" msgstr ""
"Après cela, vous devrez attendre que quelqu'un valide votre compte avant " "Après cela, vous devrez attendre que quelqu'un valide votre compte avant de "
"de pouvoir vous connecter. Vous devrez payer votre adhésion à la Kfet." "pouvoir vous connecter. Vous devrez payer votre adhésion à la Kfet."
#: templates/registration/mails/email_validation_email.html:13 #: templates/registration/mails/email_validation_email.html:13
msgid "Thanks" msgid "Thanks"
@ -1552,5 +1568,14 @@ msgstr "Il n'y a pas de transaction associée à une remise ouverte."
msgid "Closed remittances" msgid "Closed remittances"
msgstr "Remises fermées" msgstr "Remises fermées"
#~ msgid "External payment"
#~ msgstr "Paiement externe"
#~ msgid "Credit note"
#~ msgstr "Note à recharger"
#~ msgid "Debit note"
#~ msgstr "Note à débiter"
#~ msgid "This membership is already renewed" #~ msgid "This membership is already renewed"
#~ msgstr "Cette adhésion est déjà renouvelée" #~ msgstr "Cette adhésion est déjà renouvelée"

View File

@ -1,12 +1,28 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% load pretty_money %}
{% block content %} {% block content %}
<p><a class="btn btn-default" href="{% url 'note:template_list' %}">{% trans "Buttons list" %}</a></p> <p>
<form method="post"> <a class="btn btn-default" href="{% url 'note:template_list' %}">{% trans "Buttons list" %}</a>
{% csrf_token %} </p>
{{form|crispy}} <form method="post">
<button class="btn btn-primary" type="submit">Submit</button> {% csrf_token %}
</form> {{form|crispy}}
<button class="btn btn-primary" type="submit">Submit</button>
</form>
{% if price_history %}
<hr>
<h4>{% trans "Price history" %}</h4>
<ul>
{% for price in price_history %}
<li>{{ price.price|pretty_money }} {% if price.time %}({% trans "Obsolete since" %} {{ price.time }}){% else %}({% trans "Current price" %}){% endif %}</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %} {% endblock %}