Commit 1452853838876dc830362caff5365ea08bba30d7
Committed by
Daniela Feitosa
1 parent
8c66d377
Exists in
master
and in
29 other branches
Deal with decimal numbers in costs
(ActionItem1413)
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
public/javascripts/manage-products.js
@@ -93,7 +93,7 @@ function calculateValuesForBar() { | @@ -93,7 +93,7 @@ function calculateValuesForBar() { | ||
93 | var total_cost = parseFloat(jQuery('form #product_inputs_cost').val()); | 93 | var total_cost = parseFloat(jQuery('form #product_inputs_cost').val()); |
94 | 94 | ||
95 | jQuery('form .price-details-price').each(function() { | 95 | jQuery('form .price-details-price').each(function() { |
96 | - var this_val = parseFloat(jQuery(this).val()) || 0; | 96 | + var this_val = parseFloat(jQuery(this).val().replace(currency_format.separator, '.')) || 0; |
97 | total_cost = total_cost + this_val; | 97 | total_cost = total_cost + this_val; |
98 | }); | 98 | }); |
99 | enablePriceDetailSubmit(); | 99 | enablePriceDetailSubmit(); |