Commit 6fcefe22 authored by Hamza Dely's avatar Hamza Dely
Browse files

Merge branch 'sattelist' into 'master'

Filtre les emeteurs de consos et exclu les comptes supprimés

See merge request dely/note-kfet!1
parents 909434ea 85c4d5bb
......@@ -13,7 +13,7 @@ class BoutonConsoForm(forms.Form):
"""
Un formulaire pour noter de nouvelles consos
"""
emetteurs = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id'), required=True)
emetteurs = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id').exclude(adherent__supprime=True), required=True)
boutons = forms.ModelMultipleChoiceField(queryset=Bouton.objects.order_by('id'), required=True)
quantite = forms.IntegerField(initial=1, required=True)
......@@ -40,7 +40,7 @@ class CreditConsoForm(forms.Form):
"""
Un formulaire pour créditer des adhérents
"""
destinataires = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id'))
destinataires = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id').exclude(adherent__supprime=True))
montant = forms.DecimalField(max_digits=14, decimal_places=2, required=True)
moyen = forms.ModelChoiceField(queryset=Paiement.objects.exclude(moyen="note"))
......@@ -64,7 +64,7 @@ class RetraitConsoForm(forms.Form):
"""
Un formulaire pour retirer de l'argent à un adhérent
"""
emetteurs = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id'))
emetteurs = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id').exclude(adherent__supprime=True))
montant = forms.DecimalField(max_digits=14, decimal_places=2, required=True)
moyen = forms.ModelChoiceField(queryset=Paiement.objects.exclude(moyen="note"))
......@@ -88,8 +88,8 @@ class TransfertConsoForm(forms.Form):
"""
Un formulaire pour effectuer des transferts entre les adhérents
"""
emetteurs = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id'), required=True)
destinataires = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id'), required=True)
emetteurs = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id').exclude(adherent__supprime=True), required=True)
destinataires = forms.ModelMultipleChoiceField(queryset=Note.objects.order_by('adherent_id').exclude(adherent__supprime=True), required=True)
montant = forms.DecimalField(max_digits=14, decimal_places=2, required=True)
description = forms.CharField(max_length=255)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment