diff --git a/apps/treasury/templatetags/escape_tex.py b/apps/treasury/templatetags/escape_tex.py index 7cc41fb5..3d635690 100644 --- a/apps/treasury/templatetags/escape_tex.py +++ b/apps/treasury/templatetags/escape_tex.py @@ -16,10 +16,5 @@ def do_latex_escape(value): ) -def fp_value(value): - return value.replace("-", "").replace("-", "neg") - - register = template.Library() register.filter("escape_tex", do_latex_escape) -register.filter("fp_value", fp_value) diff --git a/templates/treasury/invoice_sample.tex b/templates/treasury/invoice_sample.tex index d1b045ac..cf79029e 100644 --- a/templates/treasury/invoice_sample.tex +++ b/templates/treasury/invoice_sample.tex @@ -31,7 +31,8 @@ \newcommand{\AfficheResultat}{% \ListeProduits - \FPeval{\TotalTVA}{\TotalHT * \TVA / 100} + \FPmul{\TotalTVA}{\TotalHT}{\TVA} + \FPdiv{\TotalTVA}{\TotalTVA}{100} \FPadd{\TotalTTC}{\TotalHT}{\TotalTVA} \FPround{\TotalHT}{\TotalHT}{2} \FPround{\TotalTVA}{\TotalTVA}{2} @@ -98,7 +99,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|fp_value }}} { {{ product.amount_euros|safe|escape_tex|fp_value }}} { {{ product.total_euros|safe|escape_tex|fp_value }}} +\AjouterProduit{{"{"}}{{ product.designation|safe|escape_tex }}} {{"{"}}{{ product.quantity|safe|escape_tex }}} {{"{"}}{{ product.amount_euros|safe|escape_tex }}} {{"{"}}{{ product.total_euros|safe|escape_tex }}} {% endfor %} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%