Adhésions glissantes : une nouvelle fournée de bugs.
This commit is contained in:
parent
cc9d19f5c4
commit
3f5ce9ec95
3 changed files with 9 additions and 3 deletions
|
@ -59,7 +59,7 @@ from ldap_crans import is_actif, crans_ldap, ann_scol, AssociationCrans, hostnam
|
|||
from ldap_crans import MachineCrans, MachineWifi, BorneWifi
|
||||
from ldap_crans import Adherent
|
||||
from affich_tools import *
|
||||
from config import rid
|
||||
from config import rid, periode_transitoire, debut_periode_transitoire, fin_periode_transitoire
|
||||
import user_tests
|
||||
import subprocess, commands
|
||||
import ridtools
|
||||
|
@ -588,13 +588,16 @@ def adher_details(adher) :
|
|||
if adher.adhesion() > time():
|
||||
f += coul(u"Adhésion jusqu'au %s" % strftime("%d/%m/%Y %H:%M:%S", localtime(adher.adhesion())), "vert")
|
||||
f += u"\n"
|
||||
elif adher.paiement():
|
||||
elif ann_scol in adher.paiement():
|
||||
f += coul(u"Paiement pour %s/%s ok (connexion incluse)" % (ann_scol, ann_scol+1), "vert")
|
||||
f += u"\n"
|
||||
elif periode_transitoire and ((ann_scol - 1) in adher.paiement() or debut_periode_transitoire <= min(adher.adhesion(), adher.connexion()) <= fin_periode_transitoire):
|
||||
f += coul(u"Fin d'adhésion, mais en sursis jusqu'au %s" % (strftime("%d/%m/%Y %H:%M:%S", localtime(fin_periode_transitoire)),), "rouge")
|
||||
f += u"\n"
|
||||
|
||||
# Paiement
|
||||
if adher.connexion() > time():
|
||||
f += coul(u"Connexion jusqu'au %s" % strftime("%d/%m/%Y %H:%M:%S", localtime(adher.connexion())), "vert")
|
||||
f += coul(u"Connexion jusqu'au %s" % strftime("%d/%m/%Y %H:%M:%S", localtime(min(adher.connexion(), adher.adhesion()))), "vert")
|
||||
if adher.adhesion() < adher.connexion():
|
||||
f += coul(u"(Théoriquement %s, sous réserve de réadhésion)" % (strftime("%d/%m/%Y %H:%M:%S", localtime(adher.connexion())),), "rouge")
|
||||
f += u'\n'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue