Commit 8118c9ed authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root

Fix float display

parent f91f284e
Pipeline #2345 passed with stage
in 3 minutes and 53 seconds
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment