From 50efa40d8cc003fbd047b729d12ce881348df730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Thu, 11 Sep 2014 01:12:48 +0200 Subject: [PATCH] =?UTF-8?q?[printing]=20La=20liste=20des=20factures=20affi?= =?UTF-8?q?che=20maintenant=20la=20date=20du=20re=C3=A7u.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- printing/templates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/printing/templates.py b/printing/templates.py index 5c8fb2a..3c723ef 100644 --- a/printing/templates.py +++ b/printing/templates.py @@ -141,7 +141,7 @@ def list_factures(factures, width=None): data.append([ facture['fid'][0], facture['modePaiement'][0], - style("OK", "vert") if facture.get('recuPaiement', []) else style("NON", "rouge"), + style(facture.get('recuPaiement', [])[0], "vert") if facture.get('recuPaiement', []) else style("NON", "rouge"), controle, ' '.join(attr['code'] for attr in facture.get('article',[])), u"%s €" % sum([float(a['pu'])*int(a['nombre']) for a in facture.get('article',[])]) @@ -149,7 +149,7 @@ def list_factures(factures, width=None): return tableau( data, titre = [u'fid', u'Mode de paiement', u'Payé', u'Contrôle', u'Articles', u"Total"], - largeur = [5, 16, 6, 8, '*', 8], + largeur = [5, 16, 19, 8, '*', 8], alignement = ['d', 'g', 'c', 'c', 'g', 'd'], width=width)