Commit 19d6fd49 authored by Riri Novita's avatar Riri Novita

cf

parent b2cdb131
...@@ -263,6 +263,7 @@ export default class CashFlow extends Component { ...@@ -263,6 +263,7 @@ export default class CashFlow extends Component {
} }
} }
}) })
console.log(dataTable);
this.setState({ dataTable, loading: false, dataReal: res, editable: true }) this.setState({ dataTable, loading: false, dataReal: res, editable: true })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
...@@ -349,7 +350,12 @@ export default class CashFlow extends Component { ...@@ -349,7 +350,12 @@ export default class CashFlow extends Component {
let data = 18 let data = 18
let period = this.props.periode 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 (tableMeta.rowData[5] == "Cash at the end of the period") {
console.log(tableMeta.rowData[18]);
console.log(indexID);
console.log(tst);
console.log(period);
}
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = tableMeta.rowData[data].formula[indexID].value let valuezz = tableMeta.rowData[data].formula[indexID].value
forecastt += Number(valuezz == "" ? 0 : valuezz) forecastt += Number(valuezz == "" ? 0 : valuezz)
...@@ -2757,7 +2763,7 @@ export default class CashFlow extends Component { ...@@ -2757,7 +2763,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[20]).toFixed(1) : Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)} value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).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
...@@ -2774,7 +2780,7 @@ export default class CashFlow extends Component { ...@@ -2774,7 +2780,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[20]).toFixed(1) : Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)} value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -2789,7 +2795,7 @@ export default class CashFlow extends Component { ...@@ -2789,7 +2795,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[20]).toFixed(1) : Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)} value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
/> />
} }
/> />
...@@ -2838,7 +2844,7 @@ export default class CashFlow extends Component { ...@@ -2838,7 +2844,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[21]).toFixed(1) : Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)} value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).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
...@@ -2855,7 +2861,7 @@ export default class CashFlow extends Component { ...@@ -2855,7 +2861,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[21]).toFixed(1) : Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)} value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -2870,7 +2876,7 @@ export default class CashFlow extends Component { ...@@ -2870,7 +2876,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[21]).toFixed(1) : Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)} value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)).toFixed(1)}
/> />
} }
/> />
......
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