diff --git a/cotisations/templates/cotisations/facture.html b/cotisations/templates/cotisations/facture.html index df29a2cb..dc9b31f7 100644 --- a/cotisations/templates/cotisations/facture.html +++ b/cotisations/templates/cotisations/facture.html @@ -87,7 +87,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% if articlesformset %} var prices = {}; {% for article in articlelist %} -prices[{{ article.id|escapejs }}] = {{ article.prix }}; +prices[{{ article.id|escapejs }}] = "{{ article.prix }}"; {% endfor %} var template = `Article :   @@ -121,7 +121,7 @@ function update_price(){ if (article == '') { continue; } - article_price = prices[article]; + article_price = parseFloat(prices[article].replace(',', '.')); quantity = document.getElementById( 'id_form-' + i.toString() + '-quantity').value; price += article_price * quantity;