diff --git a/gestion/affichage.py b/gestion/affichage.py index 0cdbfdc6..7e905f6c 100755 --- a/gestion/affichage.py +++ b/gestion/affichage.py @@ -305,6 +305,7 @@ def dialogStyle(texte, what): dialog_styles = { 'rouge': 1, + 'orange': 1, 'vert': 2, 'jaune': 3, 'bleu': 4, diff --git a/gestion/gest_crans.py b/gestion/gest_crans.py index 68c291ce..16befc9e 100755 --- a/gestion/gest_crans.py +++ b/gestion/gest_crans.py @@ -1424,6 +1424,8 @@ def set_connexion(proprio): stat = set_adhesion(proprio) if stat == 1: return 1 + if in_facture is not None: + adhEnd = max(adhEnd, fromGeneralizedTimeFormat(in_facture._data.get('finAdhesion', ["19700101000000Z"])[0])) end = proprio.connexion() args = u'--title "Connexion de %s" ' % proprio.Nom() diff --git a/gestion/whos.py b/gestion/whos.py index 6de6f2c8..874e6c13 100755 --- a/gestion/whos.py +++ b/gestion/whos.py @@ -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'