mirror of https://gitlab.crans.org/bde/nk20
Use neg for negative numbers in invoices
This commit is contained in:
parent
a4702fca86
commit
c859fc7821
|
@ -16,5 +16,10 @@ def do_latex_escape(value):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def fp_value(value):
|
||||||
|
return value.replace("-", "neg ")
|
||||||
|
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
register.filter("escape_tex", do_latex_escape)
|
register.filter("escape_tex", do_latex_escape)
|
||||||
|
register.filter("fp_value", fp_value)
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
% Liste des produits facturés : Désignation, quantité, prix unitaire HT
|
% Liste des produits facturés : Désignation, quantité, prix unitaire HT
|
||||||
|
|
||||||
{% for product in products %}
|
{% 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 %}
|
{% endfor %}
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
Loading…
Reference in New Issue