Adhésions glissantes : une nouvelle fournée de bugs.

This commit is contained in:
Pierre-Elliott Bécue 2014-08-25 20:40:17 +02:00
parent cc9d19f5c4
commit 3f5ce9ec95
3 changed files with 9 additions and 3 deletions

View file

@ -305,6 +305,7 @@ def dialogStyle(texte, what):
dialog_styles = { dialog_styles = {
'rouge': 1, 'rouge': 1,
'orange': 1,
'vert': 2, 'vert': 2,
'jaune': 3, 'jaune': 3,
'bleu': 4, 'bleu': 4,

View file

@ -1424,6 +1424,8 @@ def set_connexion(proprio):
stat = set_adhesion(proprio) stat = set_adhesion(proprio)
if stat == 1: if stat == 1:
return 1 return 1
if in_facture is not None:
adhEnd = max(adhEnd, fromGeneralizedTimeFormat(in_facture._data.get('finAdhesion', ["19700101000000Z"])[0]))
end = proprio.connexion() end = proprio.connexion()
args = u'--title "Connexion de %s" ' % proprio.Nom() args = u'--title "Connexion de %s" ' % proprio.Nom()

View file

@ -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 MachineCrans, MachineWifi, BorneWifi
from ldap_crans import Adherent from ldap_crans import Adherent
from affich_tools import * from affich_tools import *
from config import rid from config import rid, periode_transitoire, debut_periode_transitoire, fin_periode_transitoire
import user_tests import user_tests
import subprocess, commands import subprocess, commands
import ridtools import ridtools
@ -588,13 +588,16 @@ def adher_details(adher) :
if adher.adhesion() > time(): if adher.adhesion() > time():
f += coul(u"Adhésion jusqu'au %s" % strftime("%d/%m/%Y %H:%M:%S", localtime(adher.adhesion())), "vert") f += coul(u"Adhésion jusqu'au %s" % strftime("%d/%m/%Y %H:%M:%S", localtime(adher.adhesion())), "vert")
f += u"\n" 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 += coul(u"Paiement pour %s/%s ok (connexion incluse)" % (ann_scol, ann_scol+1), "vert")
f += u"\n" 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 # Paiement
if adher.connexion() > time(): 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(): 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 += 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' f += u'\n'