mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +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 || {};
|
var options = opts || {};
|
||||||
|
|
||||||
value = parseFloat(value);
|
value = formatDecimal(parseFloat(value));
|
||||||
|
|
||||||
var percent = 100;
|
var percent = 100;
|
||||||
|
|
||||||
// Prevent div-by-zero or null value
|
// Prevent div-by-zero or null value
|
||||||
if (maximum && maximum > 0) {
|
if (maximum && maximum > 0) {
|
||||||
maximum = parseFloat(maximum);
|
maximum = formatDecimal(parseFloat(maximum));
|
||||||
percent = parseInt(value / maximum * 100);
|
percent = formatDecimal(parseInt(value / maximum * 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (percent > 100) {
|
if (percent > 100) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user