Changement de l'ordre d'affichage

This commit is contained in:
Pierre-Elliott Bécue 2015-10-01 11:34:51 +02:00
parent a732024852
commit d4f67daea0

View file

@ -52,6 +52,7 @@ SUPPRIMER = 'S'
STYLES = {
'fid': 'cyan',
'aid': 'violet',
'proprio': 'rouge',
'total': 'vert',
'recuPaiement': 'rouge',
@ -143,36 +144,43 @@ def format_facture(facture):
proprietaire = facture.proprio()
# String formatting de gros sac
txt = u"[%s] %s € le %s par %s (%s)" % (
txt = u"[%s] %s (%s), %s € par %s le %s " % (
affichage.style(
facture['fid'][0],
STYLES['fid'],
dialog=True
),
affichage.style(
"%sid=%s" % (
u'a' if proprietaire.has_key("aid") else u"c",
proprietaire.get('aid', proprietaire.get('cid', [u'n/a']))[0],
),
STYLES['aid'],
dialog=True
),
affichage.style(
u"%s %s" % (
proprietaire.get('prenom', [u"Club"])[0],
proprietaire['nom'][0],
),
STYLES['proprio'],
dialog=True
),
affichage.style(
facture.total(),
STYLES['total'],
dialog=True
),
affichage.style(
crans_utils.datetime_from_generalized_time_format(unicode(facture['recuPaiement'][0])).strftime("%d/%m/%Y %H:%M:%S"),
STYLES['recuPaiement'],
dialog=True
),
affichage.style(
facture['modePaiement'][0],
STYLES['modePaiement'],
dialog=True
),
affichage.style(
u"%s %s [%sid=%s]" % (
proprietaire.get('prenom', [u"Club"])[0],
proprietaire['nom'][0],
u'a' if proprietaire.has_key("aid") else u"c",
proprietaire.get('aid', proprietaire.get('cid', [u'n/a']))[0],
crans_utils.datetime_from_generalized_time_format(unicode(facture['recuPaiement'][0])).strftime("%d/%m/%Y %H:%M:%S"),
STYLES['recuPaiement'],
dialog=True
),
STYLES['proprio'],
dialog=True),
)
return txt