[printing/facture] Le calcul du prix d'un article nécessitait des parenthèses.

This commit is contained in:
Pierre-Elliott Bécue 2014-09-25 00:52:23 +02:00
parent b4bfe6cdc4
commit 8892e90579

View file

@ -3,7 +3,7 @@
{{"Article : "|coul('gras')}} Prix N° Total Commentaire {{"Article : "|coul('gras')}} Prix N° Total Commentaire
{% set total = [] %}{% for a in o.article %} {% set total = [] %}{% for a in o.article %}
{% do total.append( a.pu|float * a.nombre|int) %} {% do total.append( a.pu|float * a.nombre|int) %}
{{"%05.2f" % a.pu|float}}€ x{{"%02d" % a.nombre|int}} {{"%05.2f" % a.pu|float * a.nombre|int}}€ {{a.designation}} {{"%05.2f" % a.pu|float}}€ x{{"%02d" % a.nombre|int}} {{"%05.2f" % (a.pu|float * a.nombre|int)}}€ {{a.designation}}
{% endfor %} {% endfor %}
{{"total : "|coul('gras')}}{{"%05.2f" % total|sum}}€ {{"total : "|coul('gras')}}{{"%05.2f" % total|sum}}€
{% endif %} {% endif %}