Passage aux adhésions glissantes (partie I, sans lc_ldap)

This commit is contained in:
Pierre-Elliott Bécue 2014-08-15 20:26:12 +02:00
parent 169b7000b8
commit 49cef4c095
12 changed files with 485 additions and 231 deletions

View file

@ -49,13 +49,17 @@ elif arg == "fichier" :
data = db.search(filtre)
return len(data['adherent']) + len(data['club'])
def count_adh():
data = db.get_adherents()
return len(data['adherent']) + len(data['club'])
total = 0
for bat in 'abcghijmpo' :
nb = count('paiement=ok&chbre=%s*' % bat)
nb = count_adh()
total += nb
file.write("bat%s.value %d\n" % (bat, nb))
nb = count('paiement=ok&chbre=EXT')
nb = count_adh()
total += nb
file.write("wifi.value %d\n" % nb)