mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix decimal rendering in progress bars (#3849)
This commit is contained in:
parent
d2049a1cd0
commit
2843799912
@ -185,14 +185,14 @@ function makeProgressBar(value, maximum, opts={}) {
|
||||
|
||||
var options = opts || {};
|
||||
|
||||
value = parseFloat(value);
|
||||
value = formatDecimal(parseFloat(value));
|
||||
|
||||
var percent = 100;
|
||||
|
||||
// Prevent div-by-zero or null value
|
||||
if (maximum && maximum > 0) {
|
||||
maximum = parseFloat(maximum);
|
||||
percent = parseInt(value / maximum * 100);
|
||||
maximum = formatDecimal(parseFloat(maximum));
|
||||
percent = formatDecimal(parseInt(value / maximum * 100));
|
||||
}
|
||||
|
||||
if (percent > 100) {
|
||||
|
Loading…
Reference in New Issue
Block a user