diff --git a/apps/wei/templates/wei/weimembership_form.html b/apps/wei/templates/wei/weimembership_form.html index b19353c1..1fc4e43c 100644 --- a/apps/wei/templates/wei/weimembership_form.html +++ b/apps/wei/templates/wei/weimembership_form.html @@ -160,7 +160,8 @@
{% with pretty_fee=fee|pretty_money %} {% blocktrans trimmed with balance=registration.user.note.balance|pretty_money %} - The note don't have enough money ({{ balance }}, {{ pretty_fee }} required). The registration may fail. + The note don't have enough money ({{ balance }}, {{ pretty_fee }} required). + The registration may fail if you don't credit the note now. {% endblocktrans %} {% endwith %}
diff --git a/apps/wei/views.py b/apps/wei/views.py index b9edcbe9..b8dd8fa2 100644 --- a/apps/wei/views.py +++ b/apps/wei/views.py @@ -855,7 +855,7 @@ class WEIValidateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Crea form.add_error('bus', _("This user didn't give her/his caution check.")) return super().form_invalid(form) - if not registration.soge_credit and user.note.balance < fee + credit_amount: + if not registration.soge_credit and user.note.balance + credit_amount < fee: # Users must have money before registering to the WEI. form.add_error('bus', _("This user don't have enough money to join this club, and can't have a negative balance.")) diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 6de28c01..257522b0 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-10 18:08+0200\n" +"POT-Creation-Date: 2020-08-10 19:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1570,7 +1570,7 @@ msgstr "" #: apps/registration/templates/registration/future_profile_detail.html:64 #: apps/wei/templates/wei/weimembership_form.html:140 -#: apps/wei/templates/wei/weimembership_form.html:198 +#: apps/wei/templates/wei/weimembership_form.html:199 msgid "Validate registration" msgstr "" @@ -2441,21 +2441,21 @@ msgstr "" #, python-format msgid "" "The note don't have enough money (%(balance)s, %(pretty_fee)s required). The " -"registration may fail." +"registration may fail if you don't credit the note now." msgstr "" -#: apps/wei/templates/wei/weimembership_form.html:169 +#: apps/wei/templates/wei/weimembership_form.html:170 #, python-format msgid "" "The note has enough money (%(pretty_fee)s required), the registration is " "possible." msgstr "" -#: apps/wei/templates/wei/weimembership_form.html:178 +#: apps/wei/templates/wei/weimembership_form.html:179 msgid "The user didn't give her/his caution check." msgstr "" -#: apps/wei/templates/wei/weimembership_form.html:186 +#: apps/wei/templates/wei/weimembership_form.html:187 msgid "" "This user is not a member of the Kfet club for the coming year. The " "membership will be processed automatically, the WEI registration includes " diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index bd310301..0d94e2c3 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-10 18:08+0200\n" +"POT-Creation-Date: 2020-08-10 19:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1609,7 +1609,7 @@ msgstr "Valider le compte" #: apps/registration/templates/registration/future_profile_detail.html:64 #: apps/wei/templates/wei/weimembership_form.html:140 -#: apps/wei/templates/wei/weimembership_form.html:198 +#: apps/wei/templates/wei/weimembership_form.html:199 msgid "Validate registration" msgstr "Valider l'inscription" @@ -2528,12 +2528,12 @@ msgstr "" #, python-format msgid "" "The note don't have enough money (%(balance)s, %(pretty_fee)s required). The " -"registration may fail." +"registration may fail if you don't credit the note now." msgstr "" "La note n'a pas assez d'argent (%(balance)s, %(pretty_fee)s requis). " -"L'inscription va échouer." +"L'inscription peut échouer si vous ne rechargez pas la note dès maintenant." -#: apps/wei/templates/wei/weimembership_form.html:169 +#: apps/wei/templates/wei/weimembership_form.html:170 #, python-format msgid "" "The note has enough money (%(pretty_fee)s required), the registration is " @@ -2541,18 +2541,19 @@ msgid "" msgstr "" "La note a assez d'argent (%(pretty_fee) requis), l'inscription est possible." -#: apps/wei/templates/wei/weimembership_form.html:178 +#: apps/wei/templates/wei/weimembership_form.html:179 msgid "The user didn't give her/his caution check." msgstr "L'utilisateur n'a pas donné son chèque de caution." -#: apps/wei/templates/wei/weimembership_form.html:186 +#: apps/wei/templates/wei/weimembership_form.html:187 msgid "" "This user is not a member of the Kfet club for the coming year. The " "membership will be processed automatically, the WEI registration includes " "the membership fee." msgstr "" -"Vous devrez également vous rendre à la Kfet pour payer votre adhésion pour " -"l'année à venir. L'inscription au WEI inclut l'adhésion au BDE." +"Cet utilisateur n'est pas membre du club Kfet pour l'année à venir. " +"L'adhésion va être faite automatiquement, l'inscription au WEI inclut le " +"coût d'adhésion." #: apps/wei/templates/wei/weimembership_list.html:24 msgid "View unvalidated registrations..."