Commit c7f03c84 authored by syadziy's avatar syadziy

update issue tia

parent 02463a4b
......@@ -674,8 +674,34 @@ export default class BalanceSheetOLPA extends Component {
return a
}
const handleTotal = (tableMeta) => {
let total = 0
tableMeta.rowData.map((item, index) => {
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd") {
console.log(index)
if (index >= 7 && index <= 18) {
console.log(item.value + "aaa")
if (item.value == undefined) {
total += Number(item)
} else {
total += Number(item.value)
}
}
}
})
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
}
console.log(total)
return total
}
const handleValueFormula = (value, tableMeta, column, periode, forecast) => {
// console.log(value)
// console.log(tableMeta.rowData[5])
let splitFormula = String(tableMeta.rowData[3]).split('@')
let baru = []
let anjay = []
......@@ -769,7 +795,7 @@ export default class BalanceSheetOLPA extends Component {
})
// console.log(baru)
// console.log(anjay)
// if (tableMeta.rowData[5] == 'Profit (loss) MTD') {
// if (tableMeta.rowData[5] == 'TOTAL CURRENT ASSETS') {
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
......@@ -1718,7 +1744,7 @@ export default class BalanceSheetOLPA extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(handleTotal(tableMeta)).toFixed(1) : Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
/>
:
tableMeta.rowData[0] === 5 ?
......
......@@ -467,24 +467,27 @@ export default class CashFlow extends Component {
anjay.push(forecastt)
} else {
// console.log(JSON.stringify(tableMeta.rowData[6]))
let tst = String(item).replace('[M-1]', '')
let data = column == 7 ? 18 : column - 1
let period = data == 18 ? 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 (column != 6) {
let data = column - 1
let period = 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 {
anjay.push(valuezz == "" ? 0 : valuezz)
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 {
anjay.push(valuezz == "" ? 0 : valuezz)
}
}
}
}
......@@ -839,7 +842,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[6].value).toFixed(1)}
// value={Number(tableMeta.rowData[6].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[6], tableMeta, 6)).toFixed(1)}
/>
</span>
:
......@@ -850,7 +854,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[6].value).toFixed(1)}
// value={Number(tableMeta.rowData[6].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[6], tableMeta, 6)).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
......@@ -869,7 +874,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[6].value).toFixed(1)}
// value={Number(tableMeta.rowData[6].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[6], tableMeta, 6)).toFixed(1)}
/>
:
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
......@@ -887,7 +893,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[6].value).toFixed(1)}
// value={Number(tableMeta.rowData[6].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[6], tableMeta, 6)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -908,7 +915,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[7].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
// value={Number(tableMeta.rowData[7].value).toFixed(1)}
// value={Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
/>
</span>
......@@ -921,8 +929,9 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[7].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
// value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[8].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
value={Number(tableMeta.rowData[7].value).toFixed(1)}
// value={Number(tableMeta.rowData[7].value).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
......@@ -941,7 +950,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[7].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
// value={Number(tableMeta.rowData[7].value).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -958,7 +968,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[7].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
// value={Number(tableMeta.rowData[7].value).toFixed(1)}
/>
</LightTooltip>
:
......@@ -978,7 +989,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[8].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
// value={Number(tableMeta.rowData[8].value).toFixed(1)}
/>
</span>
:
......@@ -990,7 +1002,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[8].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
// value={Number(tableMeta.rowData[8].value).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
......@@ -1009,8 +1022,9 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[8].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
// value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
value={Number(tableMeta.rowData[8].value).toFixed(1)}
// value={Number(tableMeta.rowData[8].value).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1027,8 +1041,9 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[8].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
// value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
value={Number(tableMeta.rowData[8].value).toFixed(1)}
// value={Number(tableMeta.rowData[8].value).toFixed(1)}
/>
</LightTooltip>
:
......@@ -1049,7 +1064,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
// value={Number(tableMeta.rowData[9].value).toFixed(1)}
// value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
/>
</span>
......@@ -1062,9 +1078,10 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
// value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
// value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
value={Number(tableMeta.rowData[9].value).toFixed(1)}
// value={Number(tableMeta.rowData[9].value).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
......@@ -1083,7 +1100,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
// value={Number(tableMeta.rowData[9].value).toFixed(1)}
// value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
......@@ -1101,7 +1119,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
// value={Number(tableMeta.rowData[9].value).toFixed(1)}
// value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
/>
</LightTooltip>
......@@ -1125,9 +1144,10 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
// value={Number(tableMeta.rowData[10].value).toFixed(1)}
// value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
value={Number(tableMeta.rowData[10].value).toFixed(1)}
// value={Number(tableMeta.rowData[10].value).toFixed(1)}
/>
</span>
:
......@@ -1139,8 +1159,9 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
// value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
value={Number(tableMeta.rowData[10].value).toFixed(1)}
// value={Number(tableMeta.rowData[10].value).toFixed(1)}
/>
:
tableMeta.rowData[0] === 7 ?
......@@ -1159,7 +1180,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
// value={Number(tableMeta.rowData[10].value).toFixed(1)}
// value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
......@@ -1177,7 +1199,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
// value={Number(tableMeta.rowData[10].value).toFixed(1)}
// value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
/>
</LightTooltip>
......@@ -1199,7 +1222,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
// value={Number(tableMeta.rowData[11].value).toFixed(1)}
// value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
/>
</span>
......@@ -1212,7 +1236,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
// value={Number(tableMeta.rowData[11].value).toFixed(1)}
// value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
/>
:
......@@ -1232,7 +1257,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
// value={Number(tableMeta.rowData[11].value).toFixed(1)}
// value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
......@@ -1250,7 +1276,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
// value={Number(tableMeta.rowData[11].value).toFixed(1)}
// value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
/>
</LightTooltip>
......@@ -1272,7 +1299,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
// value={Number(tableMeta.rowData[12].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/>
</span>
......@@ -1285,7 +1313,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
// value={Number(tableMeta.rowData[12].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/>
:
......@@ -1305,7 +1334,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
// value={Number(tableMeta.rowData[12].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
......@@ -1323,7 +1353,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
// value={Number(tableMeta.rowData[12].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/>
</LightTooltip>
......@@ -1345,7 +1376,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
// value={Number(tableMeta.rowData[13].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/>
</span>
......@@ -1358,7 +1390,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
// value={Number(tableMeta.rowData[13].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/>
:
......@@ -1378,7 +1411,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
// value={Number(tableMeta.rowData[13].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
......@@ -1396,7 +1430,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
// value={Number(tableMeta.rowData[13].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/>
</LightTooltip>
......@@ -1420,7 +1455,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
// value={Number(tableMeta.rowData[14].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/>
</span>
......@@ -1433,7 +1469,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
// value={Number(tableMeta.rowData[14].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/>
:
......@@ -1453,7 +1490,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
// value={Number(tableMeta.rowData[14].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
......@@ -1471,7 +1509,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
// value={Number(tableMeta.rowData[14].value).toFixed(1)}
// value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/>
</LightTooltip>
......@@ -1493,7 +1532,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[15].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
// value={Number(tableMeta.rowData[15].value).toFixed(1)}
// value={Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/>
</span>
......@@ -1506,7 +1546,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[15].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
// value={Number(tableMeta.rowData[15].value).toFixed(1)}
// value={Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/>
:
......@@ -1527,7 +1568,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[15].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
// value={Number(tableMeta.rowData[15].value).toFixed(1)}
// value={Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
......@@ -1545,7 +1587,8 @@ export default class CashFlow extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15].value).toFixed(1)}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[15].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
// value={Number(tableMeta.rowData[15].value).toFixed(1)}
// value={Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/>
</LightTooltip>
......
......@@ -428,7 +428,7 @@ export default class ProfitLossOLPA extends Component {
})
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => {
if (item[23].length > 0) {
if (item[24].length > 0) {
console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true })
}
......
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