Add support for subscription typed products in eboutic

This commit is contained in:
Skia 2016-08-29 03:02:13 +02:00
parent dfb13c37f2
commit 325da79e45
9 changed files with 175 additions and 133 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
db.sqlite3 db.sqlite3
*.log
*.pyc *.pyc
*__pycache__* *__pycache__*
.DS_Store .DS_Store

View File

@ -55,6 +55,7 @@ class Command(BaseCommand):
unix_name=settings.SITH_LAUNDERETTE_MANAGER['unix_name'], unix_name=settings.SITH_LAUNDERETTE_MANAGER['unix_name'],
address=settings.SITH_LAUNDERETTE_MANAGER['address']) address=settings.SITH_LAUNDERETTE_MANAGER['address'])
launderette_club.save() launderette_club.save()
self.reset_index("club")
for b in settings.SITH_COUNTER_BARS: for b in settings.SITH_COUNTER_BARS:
g = Group(name=b[1]+" admin") g = Group(name=b[1]+" admin")
g.save() g.save()
@ -271,10 +272,10 @@ Cette page vise à documenter la syntaxe *Markdown* utilisée sur le site.
credit.save() credit.save()
debit = AccountingType(code=607, label="Had to pay a beer", movement_type='debit') debit = AccountingType(code=607, label="Had to pay a beer", movement_type='debit')
debit.save() debit.save()
Operation(journal=gj, date=date.today(), amount=666.42, label="Satanic answer", Operation(journal=gj, date=date.today(), amount=666.42,
remark="An answer to life...", mode="CASH", done=True, accounting_type=credit, target_type="USER", remark="An answer to life...", mode="CASH", done=True, accounting_type=credit, target_type="USER",
target_id=skia.id).save() target_id=skia.id).save()
Operation(journal=gj, date=date.today(), amount=42, label="Answer", Operation(journal=gj, date=date.today(), amount=42,
remark="An answer to life...", mode="CASH", done=False, accounting_type=debit, target_type="CLUB", remark="An answer to life...", mode="CASH", done=False, accounting_type=debit, target_type="CLUB",
target_id=bar_club.id).save() target_id=bar_club.id).save()
woenzco = Company(name="Woenzel & co") woenzco = Company(name="Woenzel & co")

View File

@ -41,13 +41,13 @@
</div> </div>
</div> </div>
{% if user.membership.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %} {% if user.membership.filter(end_date=None).exists() or user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user == profile %}
{# if the user is member of a club, he can view the subscription state #} {# if the user is member of a club, he can view the subscription state #}
<p> <p>
{% if get_subscriber(profile).is_subscribed() %} {% if get_subscriber(profile).is_subscribed() %}
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}User is subscriber until {{ subscription_end }}{% endtrans %} {% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}
{% else %} {% else %}
{% trans %}User is not subscribed. {% endtrans %} {% trans %}Not subscribed{% endtrans %}
<a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">{% trans %}New subscription{% endtrans %}</a> <a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">{% trans %}New subscription{% endtrans %}</a>
{% endif %} {% endif %}
</p> </p>

View File

@ -212,9 +212,12 @@ class CounterClick(DetailView):
total = self.sum_basket(request) total = self.sum_basket(request)
product = self.get_product(pid) product = self.get_product(pid)
can_buy = False can_buy = False
for g in product.buying_groups.all(): if not product.buying_groups.exists():
if self.customer.user.is_in_group(g.name): can_buy = True
can_buy = True else:
for g in product.buying_groups.all():
if self.customer.user.is_in_group(g.name):
can_buy = True
if not can_buy: if not can_buy:
request.session['not_allowed'] = True request.session['not_allowed'] = True
return False return False

View File

@ -5,6 +5,7 @@ from django.conf import settings
from accounting.models import CurrencyField from accounting.models import CurrencyField
from counter.models import Counter, Product, Customer, Selling, Refilling from counter.models import Counter, Product, Customer, Selling, Refilling
from core.models import User from core.models import User
from subscription.models import Subscription, Subscriber
class Basket(models.Model): class Basket(models.Model):
""" """
@ -92,6 +93,36 @@ class Invoice(models.Model):
date=self.date, date=self.date,
) )
new.save() new.save()
if i.product_id == settings.SITH_PRODUCT_SUBSCRIPTION_ONE_SEMESTER:
s = Subscriber.objects.filter(id=self.user.id).first()
sub = Subscription(
member=s,
subscription_type='un-semestre',
payment_method="EBOUTIC",
location="EBOUTIC",
)
sub.subscription_start = Subscription.compute_start()
sub.subscription_start = Subscription.compute_start(
duration=settings.SITH_SUBSCRIPTIONS[sub.subscription_type]['duration'])
sub.subscription_end = Subscription.compute_end(
duration=settings.SITH_SUBSCRIPTIONS[sub.subscription_type]['duration'],
start=sub.subscription_start)
sub.save()
elif i.product_id == settings.SITH_PRODUCT_SUBSCRIPTION_TWO_SEMESTERS:
s = Subscriber.objects.filter(id=self.user.id).first()
sub = Subscription(
member=s,
subscription_type='deux-semestres',
payment_method="EBOUTIC",
location="EBOUTIC",
)
sub.subscription_start = Subscription.compute_start()
sub.subscription_start = Subscription.compute_start(
duration=settings.SITH_SUBSCRIPTIONS[sub.subscription_type]['duration'])
sub.subscription_end = Subscription.compute_end(
duration=settings.SITH_SUBSCRIPTIONS[sub.subscription_type]['duration'],
start=sub.subscription_start)
sub.save()
self.validated = True self.validated = True
self.save() self.save()

View File

@ -55,6 +55,8 @@ class EbouticMain(TemplateView):
""" Add a product to the basket """ """ Add a product to the basket """
try: try:
p = Product.objects.filter(id=int(request.POST['product_id'])).first() p = Product.objects.filter(id=int(request.POST['product_id'])).first()
if not p.buying_groups.exists():
self.basket.add_product(p)
for g in p.buying_groups.all(): for g in p.buying_groups.all():
if request.user.is_in_group(g.name): if request.user.is_in_group(g.name):
self.basket.add_product(p) self.basket.add_product(p)

Binary file not shown.

View File

@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-26 20:28+0200\n" "POT-Creation-Date: 2016-08-29 02:59+0200\n"
"PO-Revision-Date: 2016-07-18\n" "PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Skia <skia@libskia.so>\n" "Last-Translator: Skia <skia@libskia.so>\n"
"Language-Team: AE info <ae.info@utbm.fr>\n" "Language-Team: AE info <ae.info@utbm.fr>\n"
@ -123,9 +123,9 @@ msgstr "numéro"
msgid "journal" msgid "journal"
msgstr "classeur" msgstr "classeur"
#: accounting/models.py:179 core/models.py:437 core/models.py:713 #: accounting/models.py:179 core/models.py:458 core/models.py:734
#: counter/models.py:200 counter/models.py:246 counter/models.py:296 #: counter/models.py:200 counter/models.py:246 counter/models.py:296
#: eboutic/models.py:14 eboutic/models.py:47 #: eboutic/models.py:15 eboutic/models.py:48
msgid "date" msgid "date"
msgstr "date" msgstr "date"
@ -134,7 +134,7 @@ msgid "comment"
msgstr "commentaire" msgstr "commentaire"
#: accounting/models.py:181 counter/models.py:201 counter/models.py:247 #: accounting/models.py:181 counter/models.py:201 counter/models.py:247
#: subscription/models.py:34 #: subscription/models.py:52
msgid "payment method" msgid "payment method"
msgstr "méthode de paiement" msgstr "méthode de paiement"
@ -142,7 +142,7 @@ msgstr "méthode de paiement"
msgid "cheque number" msgid "cheque number"
msgstr "numéro de chèque" msgstr "numéro de chèque"
#: accounting/models.py:183 eboutic/models.py:115 #: accounting/models.py:183 eboutic/models.py:146
msgid "invoice" msgid "invoice"
msgstr "facture" msgstr "facture"
@ -179,7 +179,7 @@ msgstr "Compte"
msgid "Company" msgid "Company"
msgstr "Entreprise" msgstr "Entreprise"
#: accounting/models.py:190 sith/settings.py:290 sith/settings_sample.py:272 #: accounting/models.py:190 sith/settings.py:291 sith/settings_sample.py:273
msgid "Other" msgid "Other"
msgstr "Autre" msgstr "Autre"
@ -468,7 +468,7 @@ msgid "Done"
msgstr "Effectué" msgstr "Effectué"
#: accounting/templates/accounting/journal_details.jinja:34 #: accounting/templates/accounting/journal_details.jinja:34
#: counter/views.py:558 #: counter/views.py:561
msgid "Comment" msgid "Comment"
msgstr "Commentaire" msgstr "Commentaire"
@ -488,8 +488,7 @@ msgstr "Éditer l'opération"
#: core/templates/core/create.jinja:12 core/templates/core/edit.jinja:12 #: core/templates/core/create.jinja:12 core/templates/core/edit.jinja:12
#: core/templates/core/file_edit.jinja:8 core/templates/core/page_prop.jinja:8 #: core/templates/core/file_edit.jinja:8 core/templates/core/page_prop.jinja:8
#: core/templates/core/pagerev_edit.jinja:24 #: core/templates/core/pagerev_edit.jinja:24
#: counter/templates/counter/counter_edit.jinja:12 #: counter/templates/counter/cash_register_summary.jinja:22
#: counter/templates/counter/counter_edit.jinja:14
#: subscription/templates/subscription/subscription.jinja:22 #: subscription/templates/subscription/subscription.jinja:22
msgid "Save" msgid "Save"
msgstr "Sauver" msgstr "Sauver"
@ -540,7 +539,7 @@ msgid "A club with that unix_name already exists"
msgstr "Un club avec ce nom UNIX existe déjà." msgstr "Un club avec ce nom UNIX existe déjà."
#: club/models.py:145 counter/models.py:280 counter/models.py:294 #: club/models.py:145 counter/models.py:280 counter/models.py:294
#: eboutic/models.py:13 eboutic/models.py:46 launderette/models.py:89 #: eboutic/models.py:14 eboutic/models.py:47 launderette/models.py:89
#: launderette/models.py:126 #: launderette/models.py:126
msgid "user" msgid "user"
msgstr "nom d'utilisateur" msgstr "nom d'utilisateur"
@ -902,120 +901,120 @@ msgstr "adresse des parents"
msgid "is subscriber viewable" msgid "is subscriber viewable"
msgstr "profil visible par les cotisants" msgstr "profil visible par les cotisants"
#: core/models.py:257 #: core/models.py:274
msgid "A user with that username already exists" msgid "A user with that username already exists"
msgstr "Un utilisateur de ce nom d'utilisateur existe déjà" msgstr "Un utilisateur de ce nom d'utilisateur existe déjà"
#: core/models.py:376 core/templates/core/macros.jinja:17 #: core/models.py:393 core/templates/core/macros.jinja:17
#: core/templates/core/user_detail.jinja:14 #: core/templates/core/user_detail.jinja:14
#: core/templates/core/user_detail.jinja:16 #: core/templates/core/user_detail.jinja:16
#: core/templates/core/user_edit.jinja:16 #: core/templates/core/user_edit.jinja:16
msgid "Profile" msgid "Profile"
msgstr "Profil" msgstr "Profil"
#: core/models.py:414 #: core/models.py:435
msgid "Visitor" msgid "Visitor"
msgstr "Visiteur" msgstr "Visiteur"
#: core/models.py:419 #: core/models.py:440
msgid "define if we show a users stats" msgid "define if we show a users stats"
msgstr "Definit si l'on montre les statistiques de l'utilisateur" msgstr "Definit si l'on montre les statistiques de l'utilisateur"
#: core/models.py:421 #: core/models.py:442
msgid "Show your account statistics to others" msgid "Show your account statistics to others"
msgstr "Montrez vos statistiques de compte aux autres" msgstr "Montrez vos statistiques de compte aux autres"
#: core/models.py:428 #: core/models.py:449
msgid "file name" msgid "file name"
msgstr "nom du fichier" msgstr "nom du fichier"
#: core/models.py:429 core/models.py:562 #: core/models.py:450 core/models.py:583
msgid "parent" msgid "parent"
msgstr "parent" msgstr "parent"
#: core/models.py:430 core/models.py:440 #: core/models.py:451 core/models.py:461
msgid "file" msgid "file"
msgstr "fichier" msgstr "fichier"
#: core/models.py:431 #: core/models.py:452
msgid "owner" msgid "owner"
msgstr "propriétaire" msgstr "propriétaire"
#: core/models.py:432 core/models.py:568 #: core/models.py:453 core/models.py:589
msgid "edit group" msgid "edit group"
msgstr "groupe d'édition" msgstr "groupe d'édition"
#: core/models.py:433 core/models.py:569 #: core/models.py:454 core/models.py:590
msgid "view group" msgid "view group"
msgstr "groupe de vue" msgstr "groupe de vue"
#: core/models.py:434 #: core/models.py:455
msgid "is folder" msgid "is folder"
msgstr "est un dossier" msgstr "est un dossier"
#: core/models.py:435 #: core/models.py:456
msgid "mime type" msgid "mime type"
msgstr "type mime" msgstr "type mime"
#: core/models.py:436 #: core/models.py:457
msgid "size" msgid "size"
msgstr "taille" msgstr "taille"
#: core/models.py:466 #: core/models.py:487
msgid "Character '/' not authorized in name" msgid "Character '/' not authorized in name"
msgstr "Le caractère '/' n'est pas autorisé dans les noms de fichier" msgstr "Le caractère '/' n'est pas autorisé dans les noms de fichier"
#: core/models.py:469 core/models.py:474 #: core/models.py:490 core/models.py:495
msgid "Loop in folder tree" msgid "Loop in folder tree"
msgstr "Boucle dans l'arborescence des dossiers" msgstr "Boucle dans l'arborescence des dossiers"
#: core/models.py:478 #: core/models.py:499
msgid "You can not make a file be a children of a non folder file" msgid "You can not make a file be a children of a non folder file"
msgstr "" msgstr ""
"Vous ne pouvez pas mettre un fichier enfant de quelque chose qui n'est pas " "Vous ne pouvez pas mettre un fichier enfant de quelque chose qui n'est pas "
"un dossier" "un dossier"
#: core/models.py:482 #: core/models.py:503
msgid "Duplicate file" msgid "Duplicate file"
msgstr "Un fichier de ce nom existe déjà" msgstr "Un fichier de ce nom existe déjà"
#: core/models.py:492 #: core/models.py:513
msgid "You must provide a file" msgid "You must provide a file"
msgstr "Vous devez fournir un fichier" msgstr "Vous devez fournir un fichier"
#: core/models.py:517 #: core/models.py:538
msgid "Folder: " msgid "Folder: "
msgstr "Dossier : " msgstr "Dossier : "
#: core/models.py:519 #: core/models.py:540
msgid "File: " msgid "File: "
msgstr "Fichier : " msgstr "Fichier : "
#: core/models.py:561 core/models.py:565 #: core/models.py:582 core/models.py:586
msgid "page name" msgid "page name"
msgstr "nom de la page" msgstr "nom de la page"
#: core/models.py:566 #: core/models.py:587
msgid "owner group" msgid "owner group"
msgstr "groupe propriétaire" msgstr "groupe propriétaire"
#: core/models.py:597 #: core/models.py:618
msgid "Duplicate page" msgid "Duplicate page"
msgstr "Une page de ce nom existe déjà" msgstr "Une page de ce nom existe déjà"
#: core/models.py:603 #: core/models.py:624
msgid "Loop in page tree" msgid "Loop in page tree"
msgstr "Boucle dans l'arborescence des pages" msgstr "Boucle dans l'arborescence des pages"
#: core/models.py:710 #: core/models.py:731
msgid "revision" msgid "revision"
msgstr "révision" msgstr "révision"
#: core/models.py:711 #: core/models.py:732
msgid "page title" msgid "page title"
msgstr "titre de la page" msgstr "titre de la page"
#: core/models.py:712 #: core/models.py:733
msgid "page content" msgid "page content"
msgstr "contenu de la page" msgstr "contenu de la page"
@ -1111,8 +1110,7 @@ msgstr "Annuler"
#: core/templates/core/edit.jinja:4 core/templates/core/edit.jinja.py:8 #: core/templates/core/edit.jinja:4 core/templates/core/edit.jinja.py:8
#: core/templates/core/file_edit.jinja:4 #: core/templates/core/file_edit.jinja:4
#: counter/templates/counter/counter_edit.jinja:4 #: counter/templates/counter/cash_register_summary.jinja:4
#: counter/templates/counter/counter_edit.jinja:8
#, python-format #, python-format
msgid "Edit %(obj)s" msgid "Edit %(obj)s"
msgstr "Éditer %(obj)s" msgstr "Éditer %(obj)s"
@ -1460,13 +1458,12 @@ msgid "Option: "
msgstr "Filière : " msgstr "Filière : "
#: core/templates/core/user_detail.jinja:48 #: core/templates/core/user_detail.jinja:48
#, python-format msgid "Subscribed until %(subscription_end)s"
msgid "User is subscriber until %(subscription_end)s" msgstr "Cotisant jusqu'au %(subscription_end)s"
msgstr "L'utilisateur est cotisant jusqu'au %(subscription_end)s"
#: core/templates/core/user_detail.jinja:50 #: core/templates/core/user_detail.jinja:50
msgid "User is not subscribed. " msgid "Not subscribed"
msgstr "L'utilisateur n'est pas cotisant." msgstr "Non cotisant"
#: core/templates/core/user_detail.jinja:51 #: core/templates/core/user_detail.jinja:51
#: subscription/templates/subscription/subscription.jinja:4 #: subscription/templates/subscription/subscription.jinja:4
@ -1557,7 +1554,7 @@ msgstr "Gestion de Sith"
msgid "Subscriptions" msgid "Subscriptions"
msgstr "Cotisations" msgstr "Cotisations"
#: core/templates/core/user_tools.jinja:22 counter/views.py:473 #: core/templates/core/user_tools.jinja:22 counter/views.py:476
msgid "Counters" msgid "Counters"
msgstr "Comptoirs" msgstr "Comptoirs"
@ -1707,7 +1704,8 @@ msgstr "Bureau"
#: eboutic/templates/eboutic/eboutic_main.jinja:24 #: eboutic/templates/eboutic/eboutic_main.jinja:24
#: eboutic/templates/eboutic/eboutic_makecommand.jinja:8 #: eboutic/templates/eboutic/eboutic_makecommand.jinja:8
#: eboutic/templates/eboutic/eboutic_payment_result.jinja:4 #: eboutic/templates/eboutic/eboutic_payment_result.jinja:4
#: sith/settings.py:289 sith/settings_sample.py:271 #: sith/settings.py:290 sith/settings.py:298 sith/settings_sample.py:272
#: sith/settings_sample.py:280
msgid "Eboutic" msgid "Eboutic"
msgstr "Eboutic" msgstr "Eboutic"
@ -1732,11 +1730,11 @@ msgstr "est validé"
msgid "refilling" msgid "refilling"
msgstr "rechargement" msgstr "rechargement"
#: counter/models.py:242 eboutic/models.py:102 #: counter/models.py:242 eboutic/models.py:133
msgid "unit price" msgid "unit price"
msgstr "prix unitaire" msgstr "prix unitaire"
#: counter/models.py:243 counter/models.py:320 eboutic/models.py:103 #: counter/models.py:243 counter/models.py:320 eboutic/models.py:134
msgid "quantity" msgid "quantity"
msgstr "quantité" msgstr "quantité"
@ -1744,9 +1742,9 @@ msgstr "quantité"
msgid "Sith account" msgid "Sith account"
msgstr "Compte utilisateur" msgstr "Compte utilisateur"
#: counter/models.py:248 sith/settings.py:282 sith/settings.py:287 #: counter/models.py:248 sith/settings.py:283 sith/settings.py:288
#: sith/settings.py:308 sith/settings_sample.py:264 #: sith/settings.py:310 sith/settings_sample.py:265
#: sith/settings_sample.py:269 sith/settings_sample.py:290 #: sith/settings_sample.py:270 sith/settings_sample.py:292
msgid "Credit card" msgid "Credit card"
msgstr "Carte banquaire" msgstr "Carte banquaire"
@ -1786,6 +1784,11 @@ msgstr "chèque"
msgid "cash register summary item" msgid "cash register summary item"
msgstr "élément de relevé de caisse" msgstr "élément de relevé de caisse"
#: counter/templates/counter/cash_register_summary.jinja:8
#: counter/templates/counter/counter_main.jinja:43
msgid "Make a cash register summary"
msgstr "Faire un relevé de caisse"
#: counter/templates/counter/counter_click.jinja:29 #: counter/templates/counter/counter_click.jinja:29
msgid "Customer" msgid "Customer"
msgstr "Client" msgstr "Client"
@ -1882,10 +1885,6 @@ msgstr "valider"
msgid "Please, login" msgid "Please, login"
msgstr "Merci de vous identifier" msgstr "Merci de vous identifier"
#: counter/templates/counter/counter_main.jinja:43
msgid "Make a cash register summary"
msgstr "Faire un relevé de caisse"
#: counter/templates/counter/counter_main.jinja:46 #: counter/templates/counter/counter_main.jinja:46
msgid "Barman: " msgid "Barman: "
msgstr "Barman : " msgstr "Barman : "
@ -1932,101 +1931,101 @@ msgstr "Mauvais identifiants"
msgid "User is not subscriber" msgid "User is not subscriber"
msgstr "L'utilisateur n'est pas cotisant." msgstr "L'utilisateur n'est pas cotisant."
#: counter/views.py:258 #: counter/views.py:261
msgid "END" msgid "END"
msgstr "FIN" msgstr "FIN"
#: counter/views.py:260 #: counter/views.py:263
msgid "CAN" msgid "CAN"
msgstr "ANN" msgstr "ANN"
#: counter/views.py:290 #: counter/views.py:293
msgid "You have not enough money to buy all the basket" msgid "You have not enough money to buy all the basket"
msgstr "Vous n'avez pas assez d'argent pour acheter le panier" msgstr "Vous n'avez pas assez d'argent pour acheter le panier"
#: counter/views.py:470 #: counter/views.py:473
msgid "Parent product" msgid "Parent product"
msgstr "Produit parent" msgstr "Produit parent"
#: counter/views.py:471 #: counter/views.py:474
msgid "Buying groups" msgid "Buying groups"
msgstr "Groupes d'achat" msgstr "Groupes d'achat"
#: counter/views.py:538 #: counter/views.py:541
msgid "10 cents" msgid "10 cents"
msgstr "10 centimes" msgstr "10 centimes"
#: counter/views.py:539 #: counter/views.py:542
msgid "20 cents" msgid "20 cents"
msgstr "20 centimes" msgstr "20 centimes"
#: counter/views.py:540 #: counter/views.py:543
msgid "50 cents" msgid "50 cents"
msgstr "50 centimes" msgstr "50 centimes"
#: counter/views.py:541 #: counter/views.py:544
msgid "1 euro" msgid "1 euro"
msgstr "1 €" msgstr "1 €"
#: counter/views.py:542 #: counter/views.py:545
msgid "2 euros" msgid "2 euros"
msgstr "2 €" msgstr "2 €"
#: counter/views.py:543 #: counter/views.py:546
msgid "5 euros" msgid "5 euros"
msgstr "5 €" msgstr "5 €"
#: counter/views.py:544 #: counter/views.py:547
msgid "10 euros" msgid "10 euros"
msgstr "10 €" msgstr "10 €"
#: counter/views.py:545 #: counter/views.py:548
msgid "20 euros" msgid "20 euros"
msgstr "20 €" msgstr "20 €"
#: counter/views.py:546 #: counter/views.py:549
msgid "50 euros" msgid "50 euros"
msgstr "50 €" msgstr "50 €"
#: counter/views.py:547 #: counter/views.py:550
msgid "100 euros" msgid "100 euros"
msgstr "100 €" msgstr "100 €"
#: counter/views.py:548 counter/views.py:550 counter/views.py:552 #: counter/views.py:551 counter/views.py:553 counter/views.py:555
#: counter/views.py:554 counter/views.py:556 #: counter/views.py:557 counter/views.py:559
msgid "Check amount" msgid "Check amount"
msgstr "Montant du chèque" msgstr "Montant du chèque"
#: counter/views.py:549 counter/views.py:551 counter/views.py:553 #: counter/views.py:552 counter/views.py:554 counter/views.py:556
#: counter/views.py:555 counter/views.py:557 #: counter/views.py:558 counter/views.py:560
msgid "Check quantity" msgid "Check quantity"
msgstr "Nombre de chèque" msgstr "Nombre de chèque"
#: counter/views.py:559 #: counter/views.py:562
msgid "Emptied" msgid "Emptied"
msgstr "Coffre vidé" msgstr "Coffre vidé"
#: eboutic/models.py:48 #: eboutic/models.py:49
msgid "validated" msgid "validated"
msgstr "validé" msgstr "validé"
#: eboutic/models.py:61 #: eboutic/models.py:62
msgid "Invoice already validated" msgid "Invoice already validated"
msgstr "Facture déjà validée" msgstr "Facture déjà validée"
#: eboutic/models.py:99 #: eboutic/models.py:130
msgid "product id" msgid "product id"
msgstr "ID du produit" msgstr "ID du produit"
#: eboutic/models.py:100 #: eboutic/models.py:131
msgid "product name" msgid "product name"
msgstr "nom du produit" msgstr "nom du produit"
#: eboutic/models.py:101 #: eboutic/models.py:132
msgid "product type id" msgid "product type id"
msgstr "id du type du produit" msgstr "id du type du produit"
#: eboutic/models.py:112 #: eboutic/models.py:143
msgid "basket" msgid "basket"
msgstr "panier" msgstr "panier"
@ -2065,7 +2064,7 @@ msgstr "Le paiement a été effectué"
msgid "Return to eboutic" msgid "Return to eboutic"
msgstr "Retourner à l'eboutic" msgstr "Retourner à l'eboutic"
#: eboutic/views.py:138 #: eboutic/views.py:140
msgid "You do not have enough money to buy the basket" msgid "You do not have enough money to buy the basket"
msgstr "Vous n'avez pas assez d'argent pour acheter le panier" msgstr "Vous n'avez pas assez d'argent pour acheter le panier"
@ -2154,12 +2153,12 @@ msgid "Washing and drying"
msgstr "Lavage et séchage" msgstr "Lavage et séchage"
#: launderette/templates/launderette/launderette_book.jinja:26 #: launderette/templates/launderette/launderette_book.jinja:26
#: sith/settings.py:418 sith/settings_sample.py:400 #: sith/settings.py:424 sith/settings_sample.py:406
msgid "Washing" msgid "Washing"
msgstr "Lavage" msgstr "Lavage"
#: launderette/templates/launderette/launderette_book.jinja:30 #: launderette/templates/launderette/launderette_book.jinja:30
#: sith/settings.py:418 sith/settings_sample.py:400 #: sith/settings.py:424 sith/settings_sample.py:406
msgid "Drying" msgid "Drying"
msgstr "Séchage" msgstr "Séchage"
@ -2214,148 +2213,148 @@ msgstr "L'utilisateur n'a pas réservé de créneau"
msgid "Token not found" msgid "Token not found"
msgstr "Jeton non trouvé" msgstr "Jeton non trouvé"
#: sith/settings.py:173 sith/settings_sample.py:160 #: sith/settings.py:174 sith/settings_sample.py:161
msgid "English" msgid "English"
msgstr "Anglais" msgstr "Anglais"
#: sith/settings.py:174 sith/settings_sample.py:161 #: sith/settings.py:175 sith/settings_sample.py:162
msgid "French" msgid "French"
msgstr "Français" msgstr "Français"
#: sith/settings.py:279 sith/settings.py:286 sith/settings.py:306 #: sith/settings.py:280 sith/settings.py:287 sith/settings.py:308
#: sith/settings_sample.py:261 sith/settings_sample.py:268 #: sith/settings_sample.py:262 sith/settings_sample.py:269
#: sith/settings_sample.py:288 #: sith/settings_sample.py:290
msgid "Check" msgid "Check"
msgstr "Chèque" msgstr "Chèque"
#: sith/settings.py:280 sith/settings.py:288 sith/settings.py:307 #: sith/settings.py:281 sith/settings.py:289 sith/settings.py:309
#: sith/settings_sample.py:262 sith/settings_sample.py:270 #: sith/settings_sample.py:263 sith/settings_sample.py:271
#: sith/settings_sample.py:289 #: sith/settings_sample.py:291
msgid "Cash" msgid "Cash"
msgstr "Espèces" msgstr "Espèces"
#: sith/settings.py:281 sith/settings_sample.py:263 #: sith/settings.py:282 sith/settings_sample.py:264
msgid "Transfert" msgid "Transfert"
msgstr "Virement" msgstr "Virement"
#: sith/settings.py:294 sith/settings_sample.py:276 #: sith/settings.py:295 sith/settings_sample.py:277
msgid "Belfort" msgid "Belfort"
msgstr "Belfort" msgstr "Belfort"
#: sith/settings.py:295 sith/settings_sample.py:277 #: sith/settings.py:296 sith/settings_sample.py:278
msgid "Sevenans" msgid "Sevenans"
msgstr "Sevenans" msgstr "Sevenans"
#: sith/settings.py:296 sith/settings_sample.py:278 #: sith/settings.py:297 sith/settings_sample.py:279
msgid "Montbéliard" msgid "Montbéliard"
msgstr "Montbéliard" msgstr "Montbéliard"
#: sith/settings.py:331 sith/settings_sample.py:313 #: sith/settings.py:337 sith/settings_sample.py:319
msgid "One semester" msgid "One semester"
msgstr "Un semestre" msgstr "Un semestre"
#: sith/settings.py:336 sith/settings_sample.py:318 #: sith/settings.py:342 sith/settings_sample.py:324
msgid "Two semesters" msgid "Two semesters"
msgstr "Deux semestres" msgstr "Deux semestres"
#: sith/settings.py:341 sith/settings_sample.py:323 #: sith/settings.py:347 sith/settings_sample.py:329
msgid "Common core cursus" msgid "Common core cursus"
msgstr "Cursus tronc commun" msgstr "Cursus tronc commun"
#: sith/settings.py:346 sith/settings.py:351 sith/settings_sample.py:328 #: sith/settings.py:352 sith/settings.py:357 sith/settings_sample.py:334
#: sith/settings_sample.py:333 #: sith/settings_sample.py:339
msgid "Branch cursus" msgid "Branch cursus"
msgstr "Cursus branche" msgstr "Cursus branche"
#: sith/settings.py:356 sith/settings_sample.py:338 #: sith/settings.py:362 sith/settings_sample.py:344
msgid "Honorary member" msgid "Honorary member"
msgstr "Membre honoraire" msgstr "Membre honoraire"
#: sith/settings.py:361 sith/settings_sample.py:343 #: sith/settings.py:367 sith/settings_sample.py:349
msgid "Assidu member" msgid "Assidu member"
msgstr "Membre d'Assidu" msgstr "Membre d'Assidu"
#: sith/settings.py:366 sith/settings_sample.py:348 #: sith/settings.py:372 sith/settings_sample.py:354
msgid "Amicale/DOCEO member" msgid "Amicale/DOCEO member"
msgstr "Membre de l'Amicale/DOCEO" msgstr "Membre de l'Amicale/DOCEO"
#: sith/settings.py:371 sith/settings_sample.py:353 #: sith/settings.py:377 sith/settings_sample.py:359
msgid "UT network member" msgid "UT network member"
msgstr "Cotisant du réseau UT" msgstr "Cotisant du réseau UT"
#: sith/settings.py:376 sith/settings_sample.py:358 #: sith/settings.py:382 sith/settings_sample.py:364
msgid "CROUS member" msgid "CROUS member"
msgstr "Membres du CROUS" msgstr "Membres du CROUS"
#: sith/settings.py:381 sith/settings_sample.py:363 #: sith/settings.py:387 sith/settings_sample.py:369
msgid "Sbarro/ESTA member" msgid "Sbarro/ESTA member"
msgstr "Membre de Sbarro ou de l'ESTA" msgstr "Membre de Sbarro ou de l'ESTA"
#: sith/settings.py:389 sith/settings_sample.py:371 #: sith/settings.py:395 sith/settings_sample.py:377
msgid "President" msgid "President"
msgstr "Président" msgstr "Président"
#: sith/settings.py:390 sith/settings_sample.py:372 #: sith/settings.py:396 sith/settings_sample.py:378
msgid "Vice-President" msgid "Vice-President"
msgstr "Vice-Président" msgstr "Vice-Président"
#: sith/settings.py:391 sith/settings_sample.py:373 #: sith/settings.py:397 sith/settings_sample.py:379
msgid "Treasurer" msgid "Treasurer"
msgstr "Trésorier" msgstr "Trésorier"
#: sith/settings.py:392 sith/settings_sample.py:374 #: sith/settings.py:398 sith/settings_sample.py:380
msgid "Communication supervisor" msgid "Communication supervisor"
msgstr "Responsable com" msgstr "Responsable com"
#: sith/settings.py:393 sith/settings_sample.py:375 #: sith/settings.py:399 sith/settings_sample.py:381
msgid "Secretary" msgid "Secretary"
msgstr "Secrétaire" msgstr "Secrétaire"
#: sith/settings.py:394 sith/settings_sample.py:376 #: sith/settings.py:400 sith/settings_sample.py:382
msgid "IT supervisor" msgid "IT supervisor"
msgstr "Responsable info" msgstr "Responsable info"
#: sith/settings.py:395 sith/settings_sample.py:377 #: sith/settings.py:401 sith/settings_sample.py:383
msgid "Board member" msgid "Board member"
msgstr "Membre du bureau" msgstr "Membre du bureau"
#: sith/settings.py:396 sith/settings_sample.py:378 #: sith/settings.py:402 sith/settings_sample.py:384
msgid "Active member" msgid "Active member"
msgstr "Membre actif" msgstr "Membre actif"
#: sith/settings.py:397 sith/settings_sample.py:379 #: sith/settings.py:403 sith/settings_sample.py:385
msgid "Curious" msgid "Curious"
msgstr "Curieux" msgstr "Curieux"
#: subscription/models.py:13 #: subscription/models.py:16
msgid "Bad subscription type" msgid "Bad subscription type"
msgstr "Mauvais type de cotisation" msgstr "Mauvais type de cotisation"
#: subscription/models.py:17 #: subscription/models.py:20
msgid "Bad payment method" msgid "Bad payment method"
msgstr "Mauvais type de paiement" msgstr "Mauvais type de paiement"
#: subscription/models.py:29 #: subscription/models.py:47
msgid "subscription type" msgid "subscription type"
msgstr "type d'inscription" msgstr "type d'inscription"
#: subscription/models.py:32 #: subscription/models.py:50
msgid "subscription start" msgid "subscription start"
msgstr "début de la cotisation" msgstr "début de la cotisation"
#: subscription/models.py:33 #: subscription/models.py:51
msgid "subscription end" msgid "subscription end"
msgstr "fin de la cotisation" msgstr "fin de la cotisation"
#: subscription/models.py:36 #: subscription/models.py:54
msgid "location" msgid "location"
msgstr "lieu" msgstr "lieu"
#: subscription/models.py:46 #: subscription/models.py:63
msgid "You can not subscribe many time for the same period" msgid "You can not subscribe many time for the same period"
msgstr "Vous ne pouvez pas cotiser plusieurs fois pour la même période" msgstr "Vous ne pouvez pas cotiser plusieurs fois pour la même période"
#: subscription/models.py:50 #: subscription/models.py:67
msgid "You are trying to create a subscription without member" msgid "You are trying to create a subscription without member"
msgstr "Vous essayez de créer une cotisation sans membre" msgstr "Vous essayez de créer une cotisation sans membre"

View File

@ -277,6 +277,7 @@ SITH_SUBSCRIPTION_LOCATIONS = [
('BELFORT', _('Belfort')), ('BELFORT', _('Belfort')),
('SEVENANS', _('Sevenans')), ('SEVENANS', _('Sevenans')),
('MONTBELIARD', _('Montbéliard')), ('MONTBELIARD', _('Montbéliard')),
('EBOUTIC', _('Eboutic')),
] ]
SITH_COUNTER_BARS = [ SITH_COUNTER_BARS = [
@ -307,6 +308,10 @@ SITH_COUNTER_BANK = [
# Defines which product type is the refilling type, and thus increases the account amount # Defines which product type is the refilling type, and thus increases the account amount
SITH_COUNTER_PRODUCTTYPE_REFILLING = 11 SITH_COUNTER_PRODUCTTYPE_REFILLING = 11
# Defines which product is the one year subscription and which one is the six month subscription
SITH_PRODUCT_SUBSCRIPTION_ONE_SEMESTER = 93
SITH_PRODUCT_SUBSCRIPTION_TWO_SEMESTERS = 94
# Subscription durations are in semestres # Subscription durations are in semestres
# Be careful, modifying this parameter will need a migration to be applied # Be careful, modifying this parameter will need a migration to be applied
SITH_SUBSCRIPTIONS = { SITH_SUBSCRIPTIONS = {