From 636e75038f98610c9f698864de8f576c9de4bcd6 Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Wed, 28 Jan 2009 16:06:05 +0100 Subject: [PATCH] =?UTF-8?q?[intranet]=20affichage=20am=C3=A9lior=C3=A9=20d?= =?UTF-8?q?es=20factures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20090128150605-bd074-feb75368d7dd249397474e0e5d8741cd1334464d.gz --- intranet/modules/gestionFactures/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/intranet/modules/gestionFactures/main.py b/intranet/modules/gestionFactures/main.py index 93fc50a9..15813319 100755 --- a/intranet/modules/gestionFactures/main.py +++ b/intranet/modules/gestionFactures/main.py @@ -98,6 +98,9 @@ class main(ModuleBase): facture['adherent'] = f.proprietaire().mail() facture['montant'] = f.total() facture['payee'] = f.recuPaiement() + facture['datetime'] = datetime.datetime.strptime (f.historique()[0].split(',')[0], '%d/%m/%Y %H:%M') + facture['date'] = f.historique()[0].split(',')[0] + facture['url'] = f.urlPaypal() facture['intitule'] = f.articles()[0]['designation'] facture['details'] = [ { @@ -110,6 +113,7 @@ class main(ModuleBase): except: crans.cp.log("Facture non affichable : fid=%s" % str(f.numero()), "GESTION FACTURES", 1) + liste_factures_affichees.sort(lambda x y : cmp(x['datetime'], y['datetime'])) return liste_factures_affichees def delFacture(self, fid):