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