mirror of
https://github.com/grocy/grocy.git
synced 2026-04-09 14:06:16 +02:00
Fix rounding error on total value calculation
This commit is contained in:
parent
779ac31ffe
commit
b12187b384
|
|
@ -229,7 +229,7 @@ function RefreshStatistics()
|
||||||
var valueSum = 0;
|
var valueSum = 0;
|
||||||
result.forEach(element =>
|
result.forEach(element =>
|
||||||
{
|
{
|
||||||
valueSum += parseInt(element.value);
|
valueSum += parseFloat(element.value);
|
||||||
});
|
});
|
||||||
$("#info-current-stock").text(__n(result.length, '%s Product', '%s Products') + ", " + __t('%s total value', valueSum.toLocaleString(undefined, { style: "currency", currency: Grocy.Currency })));
|
$("#info-current-stock").text(__n(result.length, '%s Product', '%s Products') + ", " + __t('%s total value', valueSum.toLocaleString(undefined, { style: "currency", currency: Grocy.Currency })));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user