Commit b9980c12 authored by faisalhamdi's avatar faisalhamdi

fixed negative comparison

parent 189ed559
...@@ -1548,7 +1548,7 @@ export default class SubHolding extends Component { ...@@ -1548,7 +1548,7 @@ export default class SubHolding extends Component {
let persenOL = 0 let persenOL = 0
if (mtd_mb < 0) { if (mtd_mb < 0) {
if (mtd_actual < mtd_mb) { if (parseFloat(mtd_actual) < parseFloat(mtd_mb)) {
persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb) persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb)
} else { } else {
persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb) + 1 persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb) + 1
...@@ -1558,7 +1558,7 @@ export default class SubHolding extends Component { ...@@ -1558,7 +1558,7 @@ export default class SubHolding extends Component {
} }
if (mtd_ol < 0) { if (mtd_ol < 0) {
if (mtd_actual < mtd_ol) { if (parseFloat(mtd_actual) < parseFloat(mtd_ol)) {
persenOL = Number((mtd_ol - mtd_actual)/mtd_ol) persenOL = Number((mtd_ol - mtd_actual)/mtd_ol)
} else { } else {
persenOL = Number((mtd_ol - mtd_actual)/mtd_ol) + 1 persenOL = Number((mtd_ol - mtd_actual)/mtd_ol) + 1
...@@ -1602,7 +1602,7 @@ export default class SubHolding extends Component { ...@@ -1602,7 +1602,7 @@ export default class SubHolding extends Component {
let persenOL = 0 let persenOL = 0
if (mtd_mb < 0) { if (mtd_mb < 0) {
if (mtd_actual < mtd_mb) { if (parseFloat(mtd_actual) < parseFloat(mtd_mb)) {
persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb) persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb)
} else { } else {
persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb) + 1 persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb) + 1
...@@ -1612,7 +1612,7 @@ export default class SubHolding extends Component { ...@@ -1612,7 +1612,7 @@ export default class SubHolding extends Component {
} }
if (mtd_ol < 0) { if (mtd_ol < 0) {
if (mtd_actual < mtd_ol) { if (parseFloat(mtd_actual) < parseFloat(mtd_ol)) {
persenOL = Number((mtd_ol - mtd_actual)/mtd_ol) persenOL = Number((mtd_ol - mtd_actual)/mtd_ol)
} else { } else {
persenOL = Number((mtd_ol - mtd_actual)/mtd_ol) + 1 persenOL = Number((mtd_ol - mtd_actual)/mtd_ol) + 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment