mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 04:43:10 +00:00
Fix float display
This commit is contained in:
parent
f91f284ed1
commit
8118c9edf2
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue