Commit 722a1edf authored by d.arizona's avatar d.arizona

apdet

parent a90df87e
...@@ -484,7 +484,10 @@ export default class FixedAssetsMovement extends Component { ...@@ -484,7 +484,10 @@ export default class FixedAssetsMovement extends Component {
if (String(item).includes('#')) { if (String(item).includes('#')) {
if (String(item).includes('[M-1]')) { if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[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) // console.log(indexID)
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = tableMeta.rowData[18].formula[indexID].value let valuezz = tableMeta.rowData[18].formula[indexID].value
...@@ -507,7 +510,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -507,7 +510,7 @@ export default class FixedAssetsMovement extends Component {
// console.log(dataTable2[indexID][tableMeta.columnIndex]) // console.log(dataTable2[indexID][tableMeta.columnIndex])
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value 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 { ...@@ -525,6 +528,7 @@ export default class FixedAssetsMovement extends Component {
} else if (item == "/") { } else if (item == "/") {
opt = "bagi" opt = "bagi"
} else { } else {
item = item == ""? 0 : item
if (opt == "tambah") { if (opt == "tambah") {
total = Number(total) + Number(item) total = Number(total) + Number(item)
} else if (opt == "kurang") { } else if (opt == "kurang") {
...@@ -538,13 +542,14 @@ export default class FixedAssetsMovement extends Component { ...@@ -538,13 +542,14 @@ export default class FixedAssetsMovement extends Component {
} }
} }
}) })
// console.log(tableMeta.rowData[5]) console.log(dataTable2[tableMeta.rowIndex][22])
// console.log(baru) console.log(tableMeta.rowData[5])
// console.log(anjay) console.log(baru)
// console.log(total) console.log(anjay)
// console.log(splitFormula) console.log(total)
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) { if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) {
// console.log([tableMeta.rowIndex][tableMeta.columnIndex])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
} else { } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = total 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