Commit c7f03c84 authored by syadziy's avatar syadziy

update issue tia

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