mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Merge branch 'Fix_cotis_err_500' into 'master'
Fix: Use string and not variables in %-notation fornat See merge request federez/re2o!125
This commit is contained in:
commit
badad16376
3 changed files with 15 additions and 15 deletions
|
@ -355,7 +355,7 @@ class RechargeForm(FormRevMixin, Form):
|
||||||
raise forms.ValidationError(
|
raise forms.ValidationError(
|
||||||
_("Requested amount is too small. Minimum amount possible : \
|
_("Requested amount is too small. Minimum amount possible : \
|
||||||
%(min_online_amount)s €.") % {
|
%(min_online_amount)s €.") % {
|
||||||
min_online_amount: OptionalUser.get_cached_value(
|
'min_online_amount': OptionalUser.get_cached_value(
|
||||||
'min_online_payment'
|
'min_online_payment'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ class RechargeForm(FormRevMixin, Form):
|
||||||
raise forms.ValidationError(
|
raise forms.ValidationError(
|
||||||
_("Requested amount is too high. Your balance can't exceed \
|
_("Requested amount is too high. Your balance can't exceed \
|
||||||
%(max_online_balance)s €.") % {
|
%(max_online_balance)s €.") % {
|
||||||
max_online_balance: OptionalUser.get_cached_value(
|
'max_online_balance': OptionalUser.get_cached_value(
|
||||||
'max_solde'
|
'max_solde'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ def accept_payment(request, factureid):
|
||||||
messages.success(
|
messages.success(
|
||||||
request,
|
request,
|
||||||
_("The payment of %(amount)s € has been accepted.") % {
|
_("The payment of %(amount)s € has been accepted.") % {
|
||||||
amount: facture.prix()
|
'amount': facture.prix()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return redirect(reverse('users:profil', kwargs={'userid':request.user.id}))
|
return redirect(reverse('users:profil', kwargs={'userid':request.user.id}))
|
||||||
|
|
|
@ -161,8 +161,8 @@ def new_facture(request, user, userid):
|
||||||
request,
|
request,
|
||||||
_("The cotisation of %(member_name)s has been \
|
_("The cotisation of %(member_name)s has been \
|
||||||
extended to %(end_date)s.") % {
|
extended to %(end_date)s.") % {
|
||||||
member_name: user.pseudo,
|
'member_name': user.pseudo,
|
||||||
end_date: user.end_adhesion()
|
'end_date': user.end_adhesion()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
# Else, only tell the invoice was created
|
# Else, only tell the invoice was created
|
||||||
|
@ -508,7 +508,7 @@ def del_paiement(request, instances):
|
||||||
request,
|
request,
|
||||||
_("The payment method %(method_name)s has been \
|
_("The payment method %(method_name)s has been \
|
||||||
successfully deleted.") % {
|
successfully deleted.") % {
|
||||||
method_name: payment_del
|
'method_name': payment_del
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
|
@ -516,7 +516,7 @@ def del_paiement(request, instances):
|
||||||
request,
|
request,
|
||||||
_("The payment method %(method_name)s can't be deleted \
|
_("The payment method %(method_name)s can't be deleted \
|
||||||
because there are invoices using it.") % {
|
because there are invoices using it.") % {
|
||||||
method_name: payment_del
|
'method_name': payment_del
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return redirect(reverse('cotisations:index-paiement'))
|
return redirect(reverse('cotisations:index-paiement'))
|
||||||
|
@ -586,7 +586,7 @@ def del_banque(request, instances):
|
||||||
request,
|
request,
|
||||||
_("The bank %(bank_name)s has been successfully \
|
_("The bank %(bank_name)s has been successfully \
|
||||||
deleted.") % {
|
deleted.") % {
|
||||||
bank_name: bank_del
|
'bank_name': bank_del
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
except ProtectedError:
|
except ProtectedError:
|
||||||
|
@ -594,7 +594,7 @@ def del_banque(request, instances):
|
||||||
request,
|
request,
|
||||||
_("The bank %(bank_name)s can't be deleted \
|
_("The bank %(bank_name)s can't be deleted \
|
||||||
because there are invoices using it.") % {
|
because there are invoices using it.") % {
|
||||||
bank_name: bank_del
|
'bank_name': bank_del
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return redirect(reverse('cotisations:index-banque'))
|
return redirect(reverse('cotisations:index-banque'))
|
||||||
|
@ -719,7 +719,7 @@ def new_facture_solde(request, userid):
|
||||||
user = request.user
|
user = request.user
|
||||||
invoice = Facture(user=user)
|
invoice = Facture(user=user)
|
||||||
payment, _created = Paiement.objects.get_or_create(moyen='Solde')
|
payment, _created = Paiement.objects.get_or_create(moyen='Solde')
|
||||||
facture.paiement = payment
|
invoice.paiement = payment
|
||||||
# The template needs the list of articles (for the JS part)
|
# The template needs the list of articles (for the JS part)
|
||||||
article_list = Article.objects.filter(
|
article_list = Article.objects.filter(
|
||||||
Q(type_user='All') | Q(type_user=request.user.class_name)
|
Q(type_user='All') | Q(type_user=request.user.class_name)
|
||||||
|
@ -779,8 +779,8 @@ def new_facture_solde(request, userid):
|
||||||
request,
|
request,
|
||||||
_("The cotisation of %(member_name)s has been successfully \
|
_("The cotisation of %(member_name)s has been successfully \
|
||||||
extended to %(end_date)s.") % {
|
extended to %(end_date)s.") % {
|
||||||
member_name: user.pseudo,
|
'member_name': user.pseudo,
|
||||||
end_date: user.end_adhesion()
|
'end_date': user.end_adhesion()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
# Else, only tell the invoice was created
|
# Else, only tell the invoice was created
|
||||||
|
@ -827,9 +827,9 @@ def recharge(request):
|
||||||
if refill_form.is_valid():
|
if refill_form.is_valid():
|
||||||
invoice = Facture(user=request.user)
|
invoice = Facture(user=request.user)
|
||||||
payment, _created = Paiement.objects.get_or_create(moyen='Rechargement en ligne')
|
payment, _created = Paiement.objects.get_or_create(moyen='Rechargement en ligne')
|
||||||
facture.paiement = payment
|
invoice.paiement = payment
|
||||||
facture.valid = False
|
invoice.valid = False
|
||||||
facture.save()
|
invoice.save()
|
||||||
purchase = Vente.objects.create(
|
purchase = Vente.objects.create(
|
||||||
facture=invoice,
|
facture=invoice,
|
||||||
name='solde',
|
name='solde',
|
||||||
|
|
Loading…
Reference in a new issue