Bricoles.
darcs-hash:20051124214646-41617-7fead2a03df1f352f04dc9b270ee94b9a387449b.gz
This commit is contained in:
parent
3389461b0b
commit
9358e597eb
1 changed files with 10 additions and 4 deletions
|
@ -84,6 +84,8 @@ def _controle_interactif_adherents(liste, quoi):
|
|||
if quoi not in 'pc': raise ValueError
|
||||
explicite = {'p': u'du paiement', 'c': u"de la carte d'étudiant"}[quoi]
|
||||
restant = len(liste)
|
||||
if restant == 0:
|
||||
return 0, 0
|
||||
|
||||
print coul(u'\nContrôle %s des adhérents' % explicite, 'cyan')
|
||||
print u"Pour chaque entrée, il faut taper 'o' ou 'n' (défaut=n)."
|
||||
|
@ -117,6 +119,8 @@ def _controle_interactif_clubs(liste):
|
|||
Retourne (nb_OK, nb_pas_OK).
|
||||
"""
|
||||
restant = len(liste)
|
||||
if restant == 0:
|
||||
return 0, 0
|
||||
|
||||
print coul(u'\nContrôle de la charte des clubs', 'cyan')
|
||||
print u"Pour chaque entrée, il faut taper 'o' ou 'n'."
|
||||
|
@ -217,8 +221,10 @@ def qui(historique, quoi):
|
|||
regexp = re.compile(r'^([^,]*), ([^ :]*)')
|
||||
cableur = ('_inconnu_', '_inconnu_')
|
||||
|
||||
champ = re.compile(quoi)
|
||||
|
||||
for ligne in historique:
|
||||
if quoi in ligne or 'inscription' in ligne:
|
||||
if champ.search(ligne) or 'inscription' in ligne:
|
||||
matched = regexp.search(ligne)
|
||||
if matched: cableur = matched.group(1), matched.group(2)
|
||||
|
||||
|
@ -249,7 +255,7 @@ class ControleMailer:
|
|||
def __init__(self):
|
||||
# Recherche des câbleurs possédant des cotisations/chartes
|
||||
todo_list = db.search('paiement=%d&controle!=*p*' % ann_scol)
|
||||
self._paiements = chercher_cableurs(todo_list['adherent'], 'paiement')
|
||||
self._paiements = chercher_cableurs(todo_list['adherent'], '(paiement|controle)')
|
||||
self._chartes = chercher_cableurs(todo_list['club'], 'paiement')
|
||||
|
||||
# Recherche des câbleurs possédant des cartes d'étudiant
|
||||
|
@ -289,7 +295,7 @@ class ControleMailer:
|
|||
msg = u''
|
||||
|
||||
if self._paiements:
|
||||
msg += u"Fiches d'adhésion et cotisations des adhérents :\n"
|
||||
msg += u"Fiches d'adhésion et cotisations et/ou caution des adhérents :\n"
|
||||
msg += formater_pour_bureau(self._paiements) + '\n\n'
|
||||
|
||||
if self._chartes:
|
||||
|
@ -334,7 +340,7 @@ class ControleMailer:
|
|||
msg = u''
|
||||
|
||||
if self._paiements.has_key(c):
|
||||
msg += u"Fiches d'adhésion et cotisations des adhérents :\n"
|
||||
msg += u"Fiches d'adhésion, cotisations et/ou caution des adhérents :\n"
|
||||
msg += formater_pour_cableur(self._paiements[c]) + '\n\n'
|
||||
|
||||
if self._chartes.has_key(c):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue