Commit 3d1f3560 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

apdet

See merge request !492
parents a90df87e 722a1edf
......@@ -484,7 +484,10 @@ export default class FixedAssetsMovement extends Component {
if (String(item).includes('#')) {
if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[M-1]', '')
let indexID = tableMeta.rowData[18].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == Number(this.props.periode)-1)
let data = tableMeta.columnIndex == 7? 18 : tableMeta.columnIndex - 1
let period = data == 18? Number(this.props.periode)-1 : this.props.periode
// console.log(tableMeta.columnIndex)
let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
// console.log(indexID)
if (indexID !== -1) {
let valuezz = tableMeta.rowData[18].formula[indexID].value
......@@ -507,7 +510,7 @@ export default class FixedAssetsMovement extends Component {
// console.log(dataTable2[indexID][tableMeta.columnIndex])
if (indexID !== -1) {
let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value
anjay.push(valuezz)
anjay.push(valuezz == ""? 0 : valuezz)
}
}
}
......@@ -525,6 +528,7 @@ export default class FixedAssetsMovement extends Component {
} else if (item == "/") {
opt = "bagi"
} else {
item = item == ""? 0 : item
if (opt == "tambah") {
total = Number(total) + Number(item)
} else if (opt == "kurang") {
......@@ -538,13 +542,14 @@ export default class FixedAssetsMovement extends Component {
}
}
})
// console.log(tableMeta.rowData[5])
// console.log(baru)
// console.log(anjay)
// console.log(total)
// console.log(splitFormula)
console.log(dataTable2[tableMeta.rowIndex][22])
console.log(tableMeta.rowData[5])
console.log(baru)
console.log(anjay)
console.log(total)
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) {
// console.log([tableMeta.rowIndex][tableMeta.columnIndex])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = 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