Whos aussi doit oublier les histoires de paiement et compagnie.
This commit is contained in:
parent
14a1905de3
commit
67bf2363cf
1 changed files with 13 additions and 34 deletions
|
@ -180,17 +180,11 @@ def adhers_brief(adhers) :
|
|||
ook = u'\x1b[1;32mO\x1b[1;0m'
|
||||
nok = u'\x1b[1;31mn\x1b[1;0m'
|
||||
# Paiement
|
||||
if a.adhesion() > time() or a.paiement():
|
||||
if a.adhesion() > time():
|
||||
if 'p' in a.controle(): paid = ook
|
||||
else: paid = ok
|
||||
else: paid = nok
|
||||
|
||||
# Carte d'étudiant
|
||||
if a.carteEtudiant():
|
||||
if 'c' in a.controle(): carte = ook
|
||||
else: carte = ok
|
||||
else : carte = nok
|
||||
|
||||
machines = ''
|
||||
# Récupération des machines
|
||||
if len(adhers) <= limit_aff_machines:
|
||||
|
@ -205,26 +199,26 @@ def adhers_brief(adhers) :
|
|||
machines = None
|
||||
# Données
|
||||
if len(adhers) <= limit_aff_machines:
|
||||
data.append([a.id(), a.Nom(), a.chbre(), paid, carte, machines])
|
||||
data.append([a.id(), a.Nom(), a.chbre(), paid, machines])
|
||||
else:
|
||||
data.append([a.id(), a.Nom(), a.chbre(), paid, carte])
|
||||
data.append([a.id(), a.Nom(), a.chbre(), paid])
|
||||
|
||||
if len(adhers) <= limit_aff_machines:
|
||||
return u"Machines en rouge = machines avec limitation de services\n" + \
|
||||
u"P : paiement année en cours, le fond vert indique le précâblage (G bleu = inscription gratuite)\n" + \
|
||||
u"C : carte d'étudiant année en cours\n" + \
|
||||
tableau(data,
|
||||
titre = [u'aid', u'Prénom Nom', u'Chbre', u'P', u'C', u'Machines'],
|
||||
largeur = [5, 30, 5, 1, 1, '*'],
|
||||
alignement = ['d', 'c', 'g', 'c', 'c', 'c'])
|
||||
titre = [u'aid', u'Prénom Nom', u'Chbre', u'P', u'Machines'],
|
||||
largeur = [5, 30, 5, 1, '*'],
|
||||
alignement = ['d', 'c', 'g', 'c', 'c'])
|
||||
else:
|
||||
return u"Machines en rouge = machines avec limitation de services\n" + \
|
||||
u"P : paiement année en cours, le fond vert indique le précâblage (G bleu = inscription gratuite)\n" + \
|
||||
u"C : carte d'étudiant année en cours\n" + \
|
||||
tableau(data,
|
||||
titre = [u'aid', u'Prénom Nom', u'Chbre', u'P', u'C'],
|
||||
largeur = [5, '*', 5, 1, 1],
|
||||
alignement = ['d', 'c', 'g', 'c', 'c'])
|
||||
titre = [u'aid', u'Prénom Nom', u'Chbre', u'P'],
|
||||
largeur = [5, '*', 5, 1],
|
||||
alignement = ['d', 'c', 'g', 'c'])
|
||||
|
||||
def machines_brief(machines) :
|
||||
"""
|
||||
|
@ -581,10 +575,7 @@ def adher_details(adher) :
|
|||
f += strftime('%d/%m/%Y %H:%M:%S', localtime(adher.dateInscription()))
|
||||
f += coul(u'\nÉtat administratif : ','gras')
|
||||
jour = True
|
||||
if not adher.carteEtudiant() :
|
||||
f += coul(u"manque carte d'étudiant",'violet')
|
||||
jour = False
|
||||
if config.ann_scol not in adher.paiement() and (adher.adhesion() <= time()):
|
||||
if adher.adhesion() <= time():
|
||||
if not jour: f += ' et '
|
||||
f += coul(u"non adhérent actuellement",'violet')
|
||||
jour = False
|
||||
|
@ -654,10 +645,7 @@ 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 config.ann_scol in adher.paiement():
|
||||
f += coul(u"Paiement pour %s/%s ok (connexion incluse)" % (config.ann_scol, config.ann_scol+1), "vert")
|
||||
f += u"\n"
|
||||
elif config.periode_transitoire and ((config.ann_scol - 1) in adher.paiement() or config.debut_periode_transitoire <= min(adher.adhesion(), adher.connexion()) <= config.fin_periode_transitoire):
|
||||
elif config.periode_transitoire and (config.debut_periode_transitoire <= min(adher.adhesion(), adher.connexion()) <= config.fin_periode_transitoire):
|
||||
f += coul(u"Fin d'adhésion, mais en sursis jusqu'au %s" % (strftime("%d/%m/%Y %H:%M:%S", localtime(config.fin_periode_transitoire)),), "rouge")
|
||||
f += u"\n"
|
||||
|
||||
|
@ -668,12 +656,6 @@ def adher_details(adher) :
|
|||
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'
|
||||
|
||||
# Carte d'étudiant fournie
|
||||
if adher.carteEtudiant():
|
||||
f += coul(u"Carte d'étudiant fournie.",'gras')
|
||||
if 'c' in adher.controle(): f += coul(u' (Contrôle OK)', 'vert')
|
||||
f += u'\n'
|
||||
|
||||
f += _blacklist(adher)
|
||||
f += _info(adher)
|
||||
f += _hist(adher)
|
||||
|
@ -928,7 +910,7 @@ def club_details(club) :
|
|||
# État administratif
|
||||
f += coul(u'État administratif : ','gras')
|
||||
jour = True
|
||||
if club.adhesion() < time() and config.ann_scol not in club.paiement():
|
||||
if club.adhesion() < time():
|
||||
jour = False
|
||||
f += coul(u"Non adhérent." ,'violet')
|
||||
|
||||
|
@ -950,9 +932,6 @@ def club_details(club) :
|
|||
if club.adhesion() > time():
|
||||
f += coul(u"Adhésion jusque %s (connexion incluse)." % (strftime("%d/%m/%Y %H:%M:%S", localtime(club.adhesion())),), "vert")
|
||||
f += '\n'
|
||||
elif config.ann_scol in club.paiement():
|
||||
f += coul(u"Adhésion pour l'année en cours", "vert")
|
||||
f += '\n'
|
||||
|
||||
login = club.compte()
|
||||
if login :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue