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)