1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-22 23:42:25 +00:00

Use neg for negative numbers in invoices

This commit is contained in:
Yohann D'ANELLO 2020-08-06 14:39:01 +02:00
parent a4702fca86
commit c859fc7821
2 changed files with 6 additions and 1 deletions

View File

@ -16,5 +16,10 @@ def do_latex_escape(value):
)
def fp_value(value):
return value.replace("-", "neg ")
register = template.Library()
register.filter("escape_tex", do_latex_escape)
register.filter("fp_value", fp_value)

View File

@ -98,7 +98,7 @@
% Liste des produits facturés : Désignation, quantité, prix unitaire HT
{% for product in products %}
\AjouterProduit{ {{ product.designation|safe|escape_tex }}} { {{ product.quantity|safe|escape_tex }}} { {{ product.amount_euros|safe|escape_tex }}} { {{ product.total_euros|safe|escape_tex }}}
\AjouterProduit{ {{ product.designation|safe|escape_tex }}} { {{ product.quantity|safe|escape_tex|fp_value }}} { {{ product.amount_euros|safe|escape_tex|fp_value }}} { {{ product.total_euros|safe|escape_tex|fp_value }}}
{% endfor %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%