I'm using number_format($number,2,",",".")
. An example number is in this format: 8.726,36
I did sum of rows with javascript:
var totals = [0,0,0,0,0,0];
$(document).ready(function(){
var $dataRows = $("#sum_table tr:not('.totalColumn, .titlerow')");
$dataRows.each(function() {
$(this).find('.rowDataSd').each(function(i) {
totals[i] += parseFloat( $(this).html());
});
});
$("#sum_table td.totalCol").each(function(i) {
$(this).html(totals[i].toFixed(2).replace(".",",")+ " kn");
});
});
But total is not good (blue row).
How can I use multiple .replace(",",".")
?