8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-05-16 23:56:12 +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 %}
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;