mirror of https://gitlab.crans.org/bde/nk20
When an user is registering to the WEI, it doesn't pay the membership + the credit amount. The credit amount is deducted instead
This commit is contained in:
parent
999cc0a6b2
commit
6567d2f8cc
|
@ -160,7 +160,8 @@
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
{% with pretty_fee=fee|pretty_money %}
|
{% with pretty_fee=fee|pretty_money %}
|
||||||
{% blocktrans trimmed with balance=registration.user.note.balance|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 %}
|
{% endblocktrans %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -855,7 +855,7 @@ class WEIValidateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Crea
|
||||||
form.add_error('bus', _("This user didn't give her/his caution check."))
|
form.add_error('bus', _("This user didn't give her/his caution check."))
|
||||||
return super().form_invalid(form)
|
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.
|
# Users must have money before registering to the WEI.
|
||||||
form.add_error('bus',
|
form.add_error('bus',
|
||||||
_("This user don't have enough money to join this club, and can't have a negative balance."))
|
_("This user don't have enough money to join this club, and can't have a negative balance."))
|
||||||
|
|
|
@ -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-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"
|
"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"
|
||||||
|
@ -1570,7 +1570,7 @@ msgstr ""
|
||||||
|
|
||||||
#: apps/registration/templates/registration/future_profile_detail.html:64
|
#: apps/registration/templates/registration/future_profile_detail.html:64
|
||||||
#: apps/wei/templates/wei/weimembership_form.html:140
|
#: 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"
|
msgid "Validate registration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2441,21 +2441,21 @@ msgstr ""
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"The note don't have enough money (%(balance)s, %(pretty_fee)s required). The "
|
"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 ""
|
msgstr ""
|
||||||
|
|
||||||
#: apps/wei/templates/wei/weimembership_form.html:169
|
#: apps/wei/templates/wei/weimembership_form.html:170
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"The note has enough money (%(pretty_fee)s required), the registration is "
|
"The note has enough money (%(pretty_fee)s required), the registration is "
|
||||||
"possible."
|
"possible."
|
||||||
msgstr ""
|
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."
|
msgid "The user didn't give her/his caution check."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: apps/wei/templates/wei/weimembership_form.html:186
|
#: apps/wei/templates/wei/weimembership_form.html:187
|
||||||
msgid ""
|
msgid ""
|
||||||
"This user is not a member of the Kfet club for the coming year. The "
|
"This user is not a member of the Kfet club for the coming year. The "
|
||||||
"membership will be processed automatically, the WEI registration includes "
|
"membership will be processed automatically, the WEI registration includes "
|
||||||
|
|
|
@ -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-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"
|
"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"
|
||||||
|
@ -1609,7 +1609,7 @@ msgstr "Valider le compte"
|
||||||
|
|
||||||
#: apps/registration/templates/registration/future_profile_detail.html:64
|
#: apps/registration/templates/registration/future_profile_detail.html:64
|
||||||
#: apps/wei/templates/wei/weimembership_form.html:140
|
#: 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"
|
msgid "Validate registration"
|
||||||
msgstr "Valider l'inscription"
|
msgstr "Valider l'inscription"
|
||||||
|
|
||||||
|
@ -2528,12 +2528,12 @@ msgstr ""
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"The note don't have enough money (%(balance)s, %(pretty_fee)s required). The "
|
"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 ""
|
msgstr ""
|
||||||
"La note n'a pas assez d'argent (%(balance)s, %(pretty_fee)s requis). "
|
"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
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"The note has enough money (%(pretty_fee)s required), the registration is "
|
"The note has enough money (%(pretty_fee)s required), the registration is "
|
||||||
|
@ -2541,18 +2541,19 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"La note a assez d'argent (%(pretty_fee) requis), l'inscription est possible."
|
"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."
|
msgid "The user didn't give her/his caution check."
|
||||||
msgstr "L'utilisateur n'a pas donné son chèque de caution."
|
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 ""
|
msgid ""
|
||||||
"This user is not a member of the Kfet club for the coming year. The "
|
"This user is not a member of the Kfet club for the coming year. The "
|
||||||
"membership will be processed automatically, the WEI registration includes "
|
"membership will be processed automatically, the WEI registration includes "
|
||||||
"the membership fee."
|
"the membership fee."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Vous devrez également vous rendre à la Kfet pour payer votre adhésion pour "
|
"Cet utilisateur n'est pas membre du club Kfet pour l'année à venir. "
|
||||||
"l'année à venir. L'inscription au WEI inclut l'adhésion au BDE."
|
"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
|
#: apps/wei/templates/wei/weimembership_list.html:24
|
||||||
msgid "View unvalidated registrations..."
|
msgid "View unvalidated registrations..."
|
||||||
|
|
Loading…
Reference in New Issue