diff --git a/intranet/modules/gestionFactures/main.py b/intranet/modules/gestionFactures/main.py index c1230e30..d0487a63 100755 --- a/intranet/modules/gestionFactures/main.py +++ b/intranet/modules/gestionFactures/main.py @@ -98,7 +98,6 @@ 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'] @@ -113,7 +112,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'])) + liste_factures_affichees.sort(lambda x,y : cmp(int (y['no']), int(x['no']))) return liste_factures_affichees def delFacture(self, fid):