Commit 9b65fcff authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'GGMAC' into 'master'

update CF

See merge request !1459
parents 568739bb 9084700c
......@@ -88,6 +88,7 @@ export default class CashFlowMR extends Component {
// console.log(checkApprover)
// console.log(checkPrevRev)
this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev })
// this.setState({viewOnly: true})
}
componentDidMount() {
......@@ -346,10 +347,7 @@ export default class CashFlowMR extends Component {
}
})
// console.log(tableMeta.rowData[5])
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
let anjay2 = []
let kurung = false
......@@ -402,24 +400,52 @@ export default class CashFlowMR extends Component {
}
})
if (index == anjay2.length - 1) {
// if (index == anjay2.length - 1) {
// if (opt == "tambah") {
// total = Number(total) + Number(totalPrio)
// } else if (opt == "kurang") {
// total = Number(total) - Number(totalPrio)
// } else if (opt == "kali") {
// total = Number(total) * Number(totalPrio)
// } else if (opt == "bagi") {
// total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
// } else {
// total += Number(totalPrio)
// }
// }
// if (opt == "") {
// total = Number(Number(total) + Number(totalPrio))
// } else {
if (opt == "tambah") {
total = Number(total) + Number(totalPrio)
totalPrio = 0
} else if (opt == "kurang") {
total = Number(total) - Number(totalPrio)
totalPrio = 0
} else if (opt == "kali") {
total = Number(total) * Number(totalPrio)
totalPrio = 0
} else if (opt == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
totalPrio = 0
}
// }
// if (tableMeta.rowData[5] == '3.2 Movement of SHL and intercompany loan (nett)') {
// console.log(totalPrio)
// console.log(opt)
// console.log(total)
// }
} else {
// const handleReturn = (x,y) => {
// return Number(totalXYZ)
// }
if (item == "+") {
opt = "tambah"
if (prio) {
total = Number(Number(totalPrio) + Number(total))
// total = handleReturn()
prio = false
totalPrio = 0
optPrio = ""
......@@ -428,6 +454,7 @@ export default class CashFlowMR extends Component {
opt = "kurang"
if (prio) {
total = Number(Number(totalPrio) + Number(total))
// total = handleReturn()
prio = false
totalPrio = 0
optPrio = ""
......@@ -436,6 +463,7 @@ export default class CashFlowMR extends Component {
opt = "kali"
if (prio) {
total = Number(Number(totalPrio) + Number(total))
// total = handleReturn()
prio = false
totalPrio = 0
optPrio = ""
......@@ -444,6 +472,7 @@ export default class CashFlowMR extends Component {
opt = "bagi"
if (prio) {
total = Number(Number(totalPrio) + Number(total))
// total = handleReturn()
prio = false
totalPrio = 0
optPrio = ""
......@@ -464,6 +493,15 @@ export default class CashFlowMR extends Component {
}
})
// if (tableMeta.rowData[5] == '3.2 Movement of SHL and intercompany loan (nett)' || tableMeta.rowData[5] == '3.6 Other') {
// console.log(tableMeta.rowData[5])
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
// console.log(anjay2)
// console.log(total)
// }
dataTable2[tableMeta.rowIndex][6].value = total
return total
......
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