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):