Commit b7516f7d authored by syadziy's avatar syadziy

update issue OLPA

parent b636af68
......@@ -1469,12 +1469,12 @@ export default class OutlookPA extends Component {
<button
style={{
backgroundColor: 'transparent',
cursor: this.state.isSubmit === false ? 'default' : tableMeta.rowData[5] ? 'pointer' : 'default',
cursor: (this.state.periode.periode == '2020' && tableMeta.rowData[1] == 'Balance Sheet' && tableMeta.rowData[3] == 'CLOSED') ? 'pointer' : (this.state.isSubmit === false ? 'default' : tableMeta.rowData[5] ? 'pointer' : 'default'),
// cursor: tableMeta.rowData[5] ? 'pointer' : 'default',
borderColor: 'transparent'
}}
onClick={() =>
tableMeta.rowData[5] == true ?
tableMeta.rowData[5] == true || (this.state.periode.periode == '2020' && tableMeta.rowData[1] == 'Balance Sheet' && tableMeta.rowData[3] == 'CLOSED') ?
this.clickDetail(tableMeta.rowData[1], tableMeta.rowData[4], tableMeta.rowData[2], tableMeta.rowData[3])
: null
}
......@@ -1483,7 +1483,7 @@ export default class OutlookPA extends Component {
(tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(this.state.lastRevision == 0 ? (tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(tableMeta.rowData[3] !== 'submitted' ? '#5198ea' : 'GrayText'))} */}
<Typography style={{ color: tableMeta.rowData[5] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography>
<Typography style={{ color: (this.state.periode.periode == '2020' && tableMeta.rowData[1] == 'Balance Sheet' && tableMeta.rowData[3] == 'CLOSED') ? '#5198ea' : tableMeta.rowData[5] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography>
</button>
</div >
);
......
......@@ -678,9 +678,9 @@ export default class BalanceSheetOLPA extends Component {
let total = 0
tableMeta.rowData.map((item, index) => {
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd") {
console.log(index)
// console.log(index)
if (index >= 7 && index <= 18) {
console.log(item.value + "aaa")
// console.log(item.value + "aaa")
if (item.value == undefined) {
total += Number(item)
} else {
......@@ -695,7 +695,7 @@ export default class BalanceSheetOLPA extends Component {
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = total
}
console.log(total)
// console.log(total)
return total
}
......@@ -775,8 +775,8 @@ export default class BalanceSheetOLPA extends Component {
let valuezz = dataTable2[indexID][data].value !== undefined ? dataTable2[indexID][data].value : dataTable2[indexID][data]
anjay.push(valuezz == "" ? 0 : valuezz)
}
if (tableMeta.rowData[5] == 'R/E (Cummulative)') {
console.log(tst, data, tableMeta.rowData[data]);}
// if (tableMeta.rowData[5] == 'R/E (Cummulative)') {
// console.log(tst, data, tableMeta.rowData[data]);}
}
} else {
let indexID = dataTable2.findIndex((val) => val[20] == item)
......@@ -796,11 +796,11 @@ export default class BalanceSheetOLPA extends Component {
})
// console.log(baru)
// console.log(anjay)
if (tableMeta.rowData[5] == 'R/E (Cummulative)') {
console.log(splitFormula)
console.log(baru)
console.log(anjay)
}
// if (tableMeta.rowData[5] == 'R/E (Cummulative)') {
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
// }
let total = 0
let opt = ""
anjay.map((item, index) => {
......
......@@ -269,7 +269,7 @@ export default class CashFlow extends Component {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
a.download = 'Rolling Outlook Cash Flow.xlsx';
a.download = 'Outlook Performance Appraisal Cash Flow.xlsx';
a.click();
}
setTimeout(() => {
......@@ -423,14 +423,14 @@ export default class CashFlow extends Component {
let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
if (indexID !== -1) {
let valuezz = tableMeta.rowData[data].formula[indexID].value
if (tableMeta.rowData[5] == "Cash at the beginning period") {
// console.log(dataTable2[tableMeta.rowIndex+1])
// console.log(dataTable2[tableMeta.rowIndex+1][data].value)
let valuezzz = dataTable2[tableMeta.rowIndex][7].value
forecastt += Number(valuezzz == "" ? 0 : valuezzz)
} else {
// if (tableMeta.rowData[5] == "Cash at the beginning period") {
// // console.log(dataTable2[tableMeta.rowIndex+1])
// // console.log(dataTable2[tableMeta.rowIndex+1][data].value)
// let valuezzz = dataTable2[tableMeta.rowIndex][7].value
// forecastt += Number(valuezzz == "" ? 0 : valuezzz)
// } else {
forecastt += Number(valuezz == "" ? 0 : valuezz)
}
// }
}
}
......@@ -441,12 +441,12 @@ export default class CashFlow extends Component {
let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
if (indexID !== -1) {
let valuezz = tableMeta.rowData[data].formula[indexID].value
if (tableMeta.rowData[5] == "Cash at the beginning period") {
let valuezzz = dataTable2[tableMeta.rowIndex + 1][19]
forecastt += Number(valuezzz == "" ? 0 : valuezzz)
} else {
// if (tableMeta.rowData[5] == "Cash at the beginning period") {
// let valuezzz = dataTable2[tableMeta.rowIndex + 1][19]
// forecastt += Number(valuezzz == "" ? 0 : valuezzz)
// } else {
forecastt += Number(valuezz == "" ? 0 : valuezz)
}
// }
}
}
......@@ -456,12 +456,12 @@ export default class CashFlow extends Component {
let indexID = forecast.findIndex((val) => String(val.item_formula).replace('forecast_', '') == String(`@${tst}`) && val.periode == period)
if (indexID !== -1) {
let valuezz = forecast[indexID].value
if (tableMeta.rowData[5] == "Cash at the beginning period") {
let valuezzz = dataTable2[tableMeta.rowIndex + 1][20]
forecastt += Number(valuezzz == "" ? 0 : valuezzz)
} else {
// if (tableMeta.rowData[5] == "Cash at the beginning period") {
// let valuezzz = dataTable2[tableMeta.rowIndex + 1][20]
// forecastt += Number(valuezzz == "" ? 0 : valuezzz)
// } else {
forecastt += Number(valuezz == "" ? 0 : valuezz)
}
// }
}
}
......@@ -469,27 +469,27 @@ export default class CashFlow extends Component {
} else {
// console.log(JSON.stringify(tableMeta.rowData[6]))
let tst = String(item).replace('[M-1]', '')
if (column != 6) {
// if (column != 6) {
let data = column == 6 ? 17 : column - 1
let period = data == 17 ? Number(this.props.periode) - 1 : this.props.periode
let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
if (indexID !== -1) {
let valuezz = tableMeta.rowData[data].formula[indexID].value
if (tableMeta.rowData[5] == "Cash at the beginning period" && column != 7) {
// console.log(data)
// console.log(dataTable2[tableMeta.rowIndex+1][5])
// console.log(dataTable2[tableMeta.rowIndex+1][data])
// console.log(dataTable2[tableMeta.rowIndex-1][data].value)
// console.log(dataTable2[tableMeta.rowIndex][data].value)
// console.log(dataTable2[tableMeta.rowIndex+1][data].value)
let valuezzz = dataTable2[tableMeta.rowIndex + 1][data].value
anjay.push(valuezzz == "" ? 0 : valuezzz)
} else {
// if (tableMeta.rowData[5] == "Cash at the beginning period" && column != 7) {
// // console.log(data)
// // console.log(dataTable2[tableMeta.rowIndex+1][5])
// // console.log(dataTable2[tableMeta.rowIndex+1][data])
// // console.log(dataTable2[tableMeta.rowIndex-1][data].value)
// // console.log(dataTable2[tableMeta.rowIndex][data].value)
// // console.log(dataTable2[tableMeta.rowIndex+1][data].value)
// let valuezzz = dataTable2[tableMeta.rowIndex + 1][data].value
// anjay.push(valuezzz == "" ? 0 : valuezzz)
// } else {
anjay.push(valuezz == "" ? 0 : valuezz)
}
// }
}
}
// }
}
} else {
if (forecast !== undefined) {
......@@ -683,14 +683,14 @@ export default class CashFlow extends Component {
total = R.equals(total, NaN) ? "0.0" : total
// if (tableMeta.rowData[1] == 3243762 && column == 17) {
// console.log(tableMeta.rowData)
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
// console.log(anjay2)
// console.log(total)
// }
if (tableMeta.rowData[2] == 'Income Tax') {
console.log(tableMeta.rowData)
console.log(splitFormula)
console.log(baru)
console.log(anjay)
console.log(anjay2)
console.log(total)
}
if (dataTable2[tableMeta.rowIndex][column].value == undefined) {
dataTable2[tableMeta.rowIndex][column] = 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