From 1452853838876dc830362caff5365ea08bba30d7 Mon Sep 17 00:00:00 2001 From: Caio SBA Date: Thu, 29 Dec 2011 23:27:52 -0300 Subject: [PATCH] Deal with decimal numbers in costs --- public/javascripts/manage-products.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/manage-products.js b/public/javascripts/manage-products.js index 20094e1..b9a67f2 100644 --- a/public/javascripts/manage-products.js +++ b/public/javascripts/manage-products.js @@ -93,7 +93,7 @@ function calculateValuesForBar() { var total_cost = parseFloat(jQuery('form #product_inputs_cost').val()); jQuery('form .price-details-price').each(function() { - var this_val = parseFloat(jQuery(this).val()) || 0; + var this_val = parseFloat(jQuery(this).val().replace(currency_format.separator, '.')) || 0; total_cost = total_cost + this_val; }); enablePriceDetailSubmit(); -- libgit2 0.21.2