Pas plus d'une machine pour les non membres actifs lors du
renouvellement de l'adhesion (optionnel) darcs-hash:20050806164837-d1718-8090c931e65da52af9aaff9ba0ab742c12966927.gz
This commit is contained in:
parent
7a02db5395
commit
38891487b4
1 changed files with 23 additions and 3 deletions
|
@ -899,8 +899,28 @@ def set_admin(proprio) :
|
||||||
if '1\n' in result : proprio.carteEtudiant(ann_scol)
|
if '1\n' in result : proprio.carteEtudiant(ann_scol)
|
||||||
else : proprio.carteEtudiant(-ann_scol)
|
else : proprio.carteEtudiant(-ann_scol)
|
||||||
|
|
||||||
if '2\n' in result : proprio.paiement(ann_scol)
|
if '2\n' in result and ann_scol not in proprio.paiement():
|
||||||
else : proprio.paiement(-ann_scol)
|
# On est en train de renouveller l'adhésion
|
||||||
|
# Combien a-t-il de machines ?
|
||||||
|
if len(proprio.machines_fixes()) > 1 and not proprio.droits():
|
||||||
|
# Il a plus d'une machine fixe et n'est pas membre actif
|
||||||
|
arg = u'--title "Trop de machines fixes" '
|
||||||
|
arg+= u'--menu " Cet adhérent a trop de machines fixes.\n\n'
|
||||||
|
arg+= u'Seuls les membres actifs peuvent posséder plusieurs\n'
|
||||||
|
arg+= u'machines fixes. L\'adhérent actuel n\'est pas membre\n'
|
||||||
|
arg+= u'actif, il n\'est donc pas possible de lui laisser autant\n'
|
||||||
|
arg+= u'de machines fixes..." 0 0 0 '
|
||||||
|
arg+= u'"OK" "OK, on je vais lui virer des machines" '
|
||||||
|
arg+= u'"Si" "Allez, on est sympa, on veut bien quand même." '
|
||||||
|
annul, result = dialog(arg)
|
||||||
|
if not annul and result[0] == "Si":
|
||||||
|
proprio.paiement(ann_scol)
|
||||||
|
else:
|
||||||
|
set_admin(proprio)
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
proprio.paiement(ann_scol)
|
||||||
|
elif '2\n' not in result : proprio.paiement(-ann_scol)
|
||||||
|
|
||||||
if '3\n' in result : proprio.paiement(ann_scol+1)
|
if '3\n' in result : proprio.paiement(ann_scol+1)
|
||||||
else : proprio.paiement(-ann_scol-1)
|
else : proprio.paiement(-ann_scol-1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue