mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 12:26:15 +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;
|
||||
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 })));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user