Commit b709807f authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'faisal' into 'master'

fixed negative comparison

See merge request !1089
parents 189ed559 b9980c12
...@@ -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