Commit b9980c12 authored by faisalhamdi's avatar faisalhamdi

fixed negative comparison

parent 189ed559
......@@ -1548,7 +1548,7 @@ export default class SubHolding extends Component {
let persenOL = 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)
} else {
persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb) + 1
......@@ -1558,7 +1558,7 @@ export default class SubHolding extends Component {
}
if (mtd_ol < 0) {
if (mtd_actual < mtd_ol) {
if (parseFloat(mtd_actual) < parseFloat(mtd_ol)) {
persenOL = Number((mtd_ol - mtd_actual)/mtd_ol)
} else {
persenOL = Number((mtd_ol - mtd_actual)/mtd_ol) + 1
......@@ -1602,7 +1602,7 @@ export default class SubHolding extends Component {
let persenOL = 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)
} else {
persenMtd = Number((mtd_mb - mtd_actual)/mtd_mb) + 1
......@@ -1612,7 +1612,7 @@ export default class SubHolding extends Component {
}
if (mtd_ol < 0) {
if (mtd_actual < mtd_ol) {
if (parseFloat(mtd_actual) < parseFloat(mtd_ol)) {
persenOL = Number((mtd_ol - mtd_actual)/mtd_ol)
} else {
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