mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Fixed sumFormatterQuantity if using 1.234,56 fomat
Previously sumFormatterQuantity used the parseFloat to convert the string purchase_cost to a floating point number. parseFloat does not return the correct value when using the comma format. To fix this sumFormatterQuantity now used the cleanFloat function to convert purchase_cost to a float. Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
parent
8996c24d1f
commit
90ca66834b
|
@ -639,7 +639,7 @@
|
|||
return 'no quantity';
|
||||
}
|
||||
var total_sum = data.reduce(function(sum, row) {
|
||||
return (sum) + (parseFloat(row["purchase_cost"])*row[multiplier] || 0);
|
||||
return (sum) + (cleanFloat(row["purchase_cost"])*row[multiplier] || 0);
|
||||
}, 0);
|
||||
return numberWithCommas(total_sum.toFixed(2));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue