8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +00:00

Fix float display

This commit is contained in:
Gabriel Detraz 2019-12-27 18:00:57 +01:00 committed by root
parent f91f284ed1
commit 8118c9edf2

View file

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