Commit fbe4f164 authored by Riri Novita's avatar Riri Novita

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents bc75a98c ae49e366
...@@ -663,10 +663,17 @@ export default class FixedAssetsMovement extends Component { ...@@ -663,10 +663,17 @@ export default class FixedAssetsMovement extends Component {
const handleForecast = (tableMeta, periode) => { const handleForecast = (tableMeta, periode) => {
let total = 0 let total = 0
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'gain/ (loss) on fixed assets' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') { if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'gain/ (loss) on fixed assets' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
let indexID = dataTable2.findIndex((val, index) => String(val[5]).toLocaleLowerCase() == 'ending balance' && dataTable2[index-1][2] == tableMeta.rowData[2])
if (indexID !== -1) {
total = dataTable2[indexID][18].value
}
} else {
let indexID = dataTable2[tableMeta.rowIndex][23].findIndex((val) => val.periode == periode) let indexID = dataTable2[tableMeta.rowIndex][23].findIndex((val) => val.periode == periode)
if (indexID !== -1) { if (indexID !== -1) {
total = dataTable2[tableMeta.rowIndex][23][indexID].value total = dataTable2[tableMeta.rowIndex][23][indexID].value
} }
}
} else { } else {
total = handleValueFormula(tableMeta.columnIndex, tableMeta) total = handleValueFormula(tableMeta.columnIndex, tableMeta)
} }
......
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