Commit a398b78f authored by Riri Novita's avatar Riri Novita

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

parents 172339a0 c2f65102
...@@ -282,6 +282,7 @@ const create = (type = "") => { ...@@ -282,6 +282,7 @@ const create = (type = "") => {
const submitRollingOutlook = (body) => api.post('transaction/rolling_outlook/submit_rolling_outlook', body) const submitRollingOutlook = (body) => api.post('transaction/rolling_outlook/submit_rolling_outlook', body)
const getRollingOutlookCompanySubmitted = (body) => api.post('transaction/rolling_outlook/get_company_submitted', body) const getRollingOutlookCompanySubmitted = (body) => api.post('transaction/rolling_outlook/get_company_submitted', body)
const getRollingOutlookCF = (body) => api.post('transaction/cash_flow/rolling_outlook/get_report_hierarki', body) const getRollingOutlookCF = (body) => api.post('transaction/cash_flow/rolling_outlook/get_report_hierarki', body)
const createRollingOutlookCF = (body) => api.post('transaction/cash_flow/rolling_outlook/create_rolling_outlook', body)
//REPORT NEW //REPORT NEW
const getAllReportBS = (body) => api.post('/transaction/db_balance_sheet/get_report_hierarki', body) const getAllReportBS = (body) => api.post('/transaction/db_balance_sheet/get_report_hierarki', body)
...@@ -784,7 +785,8 @@ const create = (type = "") => { ...@@ -784,7 +785,8 @@ const create = (type = "") => {
approvalRolling, approvalRolling,
createPeriodeRevisionRO, createPeriodeRevisionRO,
historyApprovalRO, historyApprovalRO,
getRollingOutlookCF getRollingOutlookCF,
createRollingOutlookCF
} }
} }
......
...@@ -62,6 +62,7 @@ export default class BalanceSheetRO extends Component { ...@@ -62,6 +62,7 @@ export default class BalanceSheetRO extends Component {
} }
componentDidMount() { componentDidMount() {
console.log(this.props);
// this.getItemHierarki() // this.getItemHierarki()
this.getLatestUpdate() this.getLatestUpdate()
this.getSettingControl() this.getSettingControl()
...@@ -1065,6 +1066,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1065,6 +1066,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 6)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 6)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 6)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 6)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1196,6 +1198,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1196,6 +1198,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 7)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 7)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 7)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 7)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1327,6 +1330,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1327,6 +1330,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 8)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 8)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 8)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 8)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1458,6 +1462,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1458,6 +1462,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 9)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 9)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 9)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 9)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1589,6 +1594,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1589,6 +1594,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 10)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 10)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 10)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 10)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1720,6 +1726,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1720,6 +1726,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 11)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 11)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 11)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 11)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1851,6 +1858,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1851,6 +1858,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 12)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 12)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 12)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 12)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1982,6 +1990,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1982,6 +1990,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 13)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 13)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 13)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 13)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -2113,6 +2122,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2113,6 +2122,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 14)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 14)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 14)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 14)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -2244,6 +2254,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2244,6 +2254,7 @@ export default class BalanceSheetRO extends Component {
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 15)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 15)).toFixed(1) <= Number(this.state.maxValue)) ? (Number(handleValueFormula(tableMeta, 15)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 15)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
......
...@@ -86,6 +86,7 @@ export default class CashFlow extends Component { ...@@ -86,6 +86,7 @@ export default class CashFlow extends Component {
} }
componentDidMount() { componentDidMount() {
console.log(this.props);
this.setState({ loading: true }) this.setState({ loading: true })
this.getSettingControl() this.getSettingControl()
// console.log(this.props.PLBSFAMSubmitted) // console.log(this.props.PLBSFAMSubmitted)
...@@ -256,27 +257,23 @@ export default class CashFlow extends Component { ...@@ -256,27 +257,23 @@ export default class CashFlow extends Component {
} }
async downloadAllData() { async downloadAllData() {
// let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` // alert('Coming Soon ...')
// console.log(url); let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/rolling_outlook/export_rolling_outlook?rolling_outlook_id=${this.props.rollingOutlookID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&quartal=${this.props.quarter}`
let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}` console.log(url);
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}`
let res = await fetch( let res = await fetch(
this.props.submissionID == null ? resNull : resReal `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/rolling_outlook/export_rolling_outlook?rolling_outlook_id=${this.props.rollingOutlookID === null ? "" : this.props.rollingOutlookID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&quartal=${this.props.quarter}`
) )
console.log(this.props.submissionID);
console.log(resReal)
console.log(resNull)
res = await res.blob() res = await res.blob()
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
a.href = url; a.href = url;
a.download = 'Master Budget Cash Flow.xlsx'; a.download = 'Rolling Outlook Cash Flow.xlsx';
a.click(); a.click();
this.setState({ loading: false })
} else {
this.setState({ loading: false })
} }
setTimeout(() => {
this.setState({ loading: false })
}, 500);
} }
closeAlert() { closeAlert() {
...@@ -288,33 +285,48 @@ export default class CashFlow extends Component { ...@@ -288,33 +285,48 @@ export default class CashFlow extends Component {
let listCF = [] let listCF = []
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
listCF.push( listCF.push(
// {
// "item_report_id": item[1],
// "parent": item[2],
// "formula": String(item[3]),
// "item_name": item[5],
// "january": String(item[7].value == undefined ? item[7] : Number(item[7].value).toFixed(1)),
// "february": String(item[8].value == undefined ? item[8] : Number(item[8].value).toFixed(1)),
// "march": String(item[9].value == undefined ? item[9] : Number(item[9].value).toFixed(1)),
// "april": String(item[10].value == undefined ? item[10] : Number(item[10].value).toFixed(1)),
// "may": String(item[11].value == undefined ? item[11] : Number(item[11].value).toFixed(1)),
// "june": String(item[12].value == undefined ? item[12] : Number(item[12].value).toFixed(1)),
// "july": String(item[13].value == undefined ? item[13] : Number(item[13].value).toFixed(1)),
// "august": String(item[14].value == undefined ? item[14] : Number(item[14].value).toFixed(1)),
// "september": String(item[15].value == undefined ? item[15] : Number(item[15].value).toFixed(1)),
// "october": String(item[16].value == undefined ? item[16] : Number(item[16].value).toFixed(1)),
// "november": String(item[17].value == undefined ? item[17] : Number(item[17].value).toFixed(1)),
// "december": String(item[18].value == undefined ? item[18] : Number(item[18].value).toFixed(1)),
// "total_current_year": String(item[19] != '' ? Number(item[19]).toFixed(1) : item[19]),
// "total_next_year": String(item[20] != '' ? Number(item[20]).toFixed(1) : item[20]),
// "total_more_year": String(item[21] != '' ? Number(item[21]).toFixed(1) : item[21]),
// "kpi_type": "",
// "max_ach": "",
// "pic": "",
// "strategic": "",
// "total_actual_before": "",
// "uom": "",
// "weight": ""
// }
{ {
"item_report_id": item[1], "item_report_id": item[1],
"parent": item[2], "january": String(item[6].value == undefined ? item[6] : Number(item[6].value).toFixed(1)),
"formula": String(item[3]), "february": String(item[7].value == undefined ? item[7] : Number(item[7].value).toFixed(1)),
"item_name": item[5], "march": String(item[8].value == undefined ? item[8] : Number(item[8].value).toFixed(1)),
"january": String(item[7].value == undefined ? item[7] : Number(item[7].value).toFixed(1)), "april": String(item[9].value == undefined ? item[9] : Number(item[9].value).toFixed(1)),
"february": String(item[8].value == undefined ? item[8] : Number(item[8].value).toFixed(1)), "may": String(item[10].value == undefined ? item[10] : Number(item[10].value).toFixed(1)),
"march": String(item[9].value == undefined ? item[9] : Number(item[9].value).toFixed(1)), "june": String(item[11].value == undefined ? item[11] : Number(item[11].value).toFixed(1)),
"april": String(item[10].value == undefined ? item[10] : Number(item[10].value).toFixed(1)), "july": String(item[12].value == undefined ? item[12] : Number(item[12].value).toFixed(1)),
"may": String(item[11].value == undefined ? item[11] : Number(item[11].value).toFixed(1)), "august": String(item[13].value == undefined ? item[13] : Number(item[13].value).toFixed(1)),
"june": String(item[12].value == undefined ? item[12] : Number(item[12].value).toFixed(1)), "september": String(item[14].value == undefined ? item[14] : Number(item[14].value).toFixed(1)),
"july": String(item[13].value == undefined ? item[13] : Number(item[13].value).toFixed(1)), "october": String(item[15].value == undefined ? item[15] : Number(item[15].value).toFixed(1)),
"august": String(item[14].value == undefined ? item[14] : Number(item[14].value).toFixed(1)), "november": String(item[16].value == undefined ? item[16] : Number(item[16].value).toFixed(1)),
"september": String(item[15].value == undefined ? item[15] : Number(item[15].value).toFixed(1)), "december": String(item[17].value == undefined ? item[17] : Number(item[17].value).toFixed(1)),
"october": String(item[16].value == undefined ? item[16] : Number(item[16].value).toFixed(1)),
"november": String(item[17].value == undefined ? item[17] : Number(item[17].value).toFixed(1)),
"december": String(item[18].value == undefined ? item[18] : Number(item[18].value).toFixed(1)),
"total_current_year": String(item[19] != '' ? Number(item[19]).toFixed(1) : item[19]),
"total_next_year": String(item[20] != '' ? Number(item[20]).toFixed(1) : item[20]),
"total_more_year": String(item[21] != '' ? Number(item[21]).toFixed(1) : item[21]),
"kpi_type": "",
"max_ach": "",
"pic": "",
"strategic": "",
"total_actual_before": "",
"uom": "",
"weight": ""
} }
) )
}) })
...@@ -325,25 +337,44 @@ export default class CashFlow extends Component { ...@@ -325,25 +337,44 @@ export default class CashFlow extends Component {
createCashFlow(dbcf) { createCashFlow(dbcf) {
let payload = { let payload = {
"submission_id": this.props.submissionID, "rolling_outlook_id": this.props.rollingOutlookID,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"periode": this.props.periode, "periode": this.props.periode,
"report_id": 6, "report_id": this.props.report_id,
"status": "submitted", "status": "submitted",
"quartal": this.props.quarter,
"cash_flow": dbcf "cash_flow": dbcf
} }
console.log(dbcf) console.log(dbcf)
console.log(JSON.stringify(payload)) console.log(JSON.stringify(payload))
this.props.createCashFlow(payload) api.create().createRollingOutlookCF(payload).then(response => {
console.log(payload);
console.log(response);
// console.log(JSON.stringify(payload))
if (response.data) {
if (response.data.status === "success") {
this.props.onClickClose()
this.props.refresh()
} else {
this.setState({ loading: false, handleTekTekTek: 0 }, () => {
this.props.onClickClose()
this.props.refresh()
})
}
} else {
this.setState({ loading: false, handleTekTekTek: 0 })
}
})
this.props.onClickClose() this.props.onClickClose()
this.props.refresh()
} }
render() { render() {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
let loading = false let loading = false
const handleValueFormula = (value, tableMeta, column, periode, forecast) => { const handleValueFormula = (value, tableMeta, column, periode, forecast) => {
console.log(tableMeta.rowData[5]) // console.log(tableMeta.rowData[5])
console.log(column) // console.log(column)
loading = true loading = true
let splitFormula = String(tableMeta.rowData[3]).split(/([()@])/) let splitFormula = String(tableMeta.rowData[3]).split(/([()@])/)
let baru = [] let baru = []
...@@ -451,7 +482,7 @@ export default class CashFlow extends Component { ...@@ -451,7 +482,7 @@ export default class CashFlow extends Component {
anjay.push(valuezz == "" ? 0 : Number(valuezz)) anjay.push(valuezz == "" ? 0 : Number(valuezz))
} }
} else { } else {
console.log(value) // console.log(value)
let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode)) let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = value.formula[indexID].value let valuezz = value.formula[indexID].value
...@@ -809,25 +840,8 @@ export default class CashFlow extends Component { ...@@ -809,25 +840,8 @@ export default class CashFlow extends Component {
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
(Number(tableMeta.rowData[6].value).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[6].value).toFixed(1) <= Number(this.state.maxValue)) ? this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
<NumberFormat (Number(tableMeta.rowData[6].value).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[6].value).toFixed(1) <= Number(this.state.maxValue)) ?
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[6].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 <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -837,16 +851,34 @@ export default class CashFlow extends Component { ...@@ -837,16 +851,34 @@ export default class CashFlow extends Component {
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'black'
}} }}
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)}
/> />
</LightTooltip> :
<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
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[6].value).toFixed(1)}
/>
</LightTooltip>
: :
null null
} }
</div> </div>
<div className="col-2"> <div className="col-2">
...@@ -864,7 +896,7 @@ export default class CashFlow extends Component { ...@@ -864,7 +896,7 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[7].value).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>
: :
...@@ -881,24 +913,8 @@ export default class CashFlow extends Component { ...@@ -881,24 +913,8 @@ export default class CashFlow extends Component {
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
(Number(tableMeta.rowData[7].value).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[7].value).toFixed(1) <= Number(this.state.maxValue)) ? this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
<NumberFormat (Number(tableMeta.rowData[7].value).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[7].value).toFixed(1) <= Number(this.state.maxValue)) ?
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
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 <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -908,16 +924,33 @@ export default class CashFlow extends Component { ...@@ -908,16 +924,33 @@ export default class CashFlow extends Component {
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[7].value).toFixed(1)} value={Number(tableMeta.rowData[7].value).toFixed(1)}
/> /> :
</LightTooltip> <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
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7].value).toFixed(1)}
/>
</LightTooltip>
: :
null null
} }
</div> </div>
<div className="col-3"> <div className="col-3">
...@@ -949,25 +982,8 @@ export default class CashFlow extends Component { ...@@ -949,25 +982,8 @@ export default class CashFlow extends Component {
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
(Number(tableMeta.rowData[8].value).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[8].value).toFixed(1) <= Number(this.state.maxValue)) ? this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
<NumberFormat (Number(tableMeta.rowData[8].value).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[8].value).toFixed(1) <= Number(this.state.maxValue)) ?
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
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={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 <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -977,17 +993,35 @@ export default class CashFlow extends Component { ...@@ -977,17 +993,35 @@ export default class CashFlow extends Component {
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'black'
}} }}
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[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 title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
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={Number(tableMeta.rowData[8].value).toFixed(1)}
/>
</LightTooltip>
: :
null null
} }
</div> </div>
<div className="col-4"> <div className="col-4">
...@@ -1004,7 +1038,7 @@ export default class CashFlow extends Component { ...@@ -1004,7 +1038,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
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)}
/> />
</span> </span>
: :
...@@ -1017,28 +1051,12 @@ export default class CashFlow extends Component { ...@@ -1017,28 +1051,12 @@ export default class CashFlow extends Component {
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.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)}
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
((this.props.quarter != 'q1'? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter != 'q1'? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)) <= Number(this.state.maxValue)) ? this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
<NumberFormat ((this.props.quarter != 'q1' ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter != 'q1' ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)) <= Number(this.state.maxValue)) ?
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
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>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1048,16 +1066,33 @@ export default class CashFlow extends Component { ...@@ -1048,16 +1066,33 @@ export default class CashFlow extends Component {
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
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 title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[9].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
/>
</LightTooltip>
: :
null null
} }
</div> </div>
</div> </div>
...@@ -1077,7 +1112,7 @@ export default class CashFlow extends Component { ...@@ -1077,7 +1112,7 @@ export default class CashFlow extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
// 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)}
/> />
</span> </span>
: :
...@@ -1093,24 +1128,8 @@ export default class CashFlow extends Component { ...@@ -1093,24 +1128,8 @@ export default class CashFlow extends Component {
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
((this.props.quarter != 'q1'? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter != 'q1'? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)) <= Number(this.state.maxValue)) ? this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
<NumberFormat ((this.props.quarter != 'q1' ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter != 'q1' ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)) <= Number(this.state.maxValue)) ?
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
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>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1120,16 +1139,33 @@ export default class CashFlow extends Component { ...@@ -1120,16 +1139,33 @@ export default class CashFlow extends Component {
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
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 title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[10].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
/>
</LightTooltip>
: :
null null
} }
</div> </div>
<div className="col-2"> <div className="col-2">
...@@ -1146,7 +1182,7 @@ export default class CashFlow extends Component { ...@@ -1146,7 +1182,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
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>
: :
...@@ -1158,28 +1194,12 @@ export default class CashFlow extends Component { ...@@ -1158,28 +1194,12 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
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)}
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
((this.props.quarter != 'q1'? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter != 'q1'? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)) <= Number(this.state.maxValue)) ? this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
<NumberFormat ((this.props.quarter != 'q1' ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter != 'q1' ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)) <= Number(this.state.maxValue)) ?
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
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>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1189,16 +1209,33 @@ export default class CashFlow extends Component { ...@@ -1189,16 +1209,33 @@ export default class CashFlow extends Component {
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
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 title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={this.props.quarter != 'q1' ? Number(tableMeta.rowData[11].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
/>
</LightTooltip>
: :
null null
} }
</div> </div>
<div className="col-3"> <div className="col-3">
...@@ -1231,24 +1268,8 @@ export default class CashFlow extends Component { ...@@ -1231,24 +1268,8 @@ export default class CashFlow extends Component {
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
((this.props.quarter == 'q3' ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter == 'q3' ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)) <= Number(this.state.maxValue)) ? this.props.quarter === 'q3' ? null :
<NumberFormat ((this.props.quarter == 'q3' ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter == 'q3' ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)) <= Number(this.state.maxValue)) ?
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
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>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1258,16 +1279,33 @@ export default class CashFlow extends Component { ...@@ -1258,16 +1279,33 @@ export default class CashFlow extends Component {
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
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 title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[12].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
/>
</LightTooltip>
: :
null null
} }
</div> </div>
<div className="col-4"> <div className="col-4">
...@@ -1300,24 +1338,8 @@ export default class CashFlow extends Component { ...@@ -1300,24 +1338,8 @@ export default class CashFlow extends Component {
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
((this.props.quarter == 'q3' ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter == 'q3' ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)) <= Number(this.state.maxValue)) ? this.props.quarter === 'q3' ? null :
<NumberFormat ((this.props.quarter == 'q3' ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter == 'q3' ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)) <= Number(this.state.maxValue)) ?
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
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>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1327,16 +1349,33 @@ export default class CashFlow extends Component { ...@@ -1327,16 +1349,33 @@ export default class CashFlow extends Component {
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
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 title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[13].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
/>
</LightTooltip>
: :
null null
} }
</div> </div>
</div> </div>
...@@ -1371,24 +1410,8 @@ export default class CashFlow extends Component { ...@@ -1371,24 +1410,8 @@ export default class CashFlow extends Component {
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
((this.props.quarter == 'q3' ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter == 'q3' ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)) <= Number(this.state.maxValue)) ? this.props.quarter === 'q3' ? null :
<NumberFormat ((this.props.quarter == 'q3' ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)) >= Number(this.state.minValue) && (this.props.quarter == 'q3' ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)) <= Number(this.state.maxValue)) ?
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
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>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1398,16 +1421,33 @@ export default class CashFlow extends Component { ...@@ -1398,16 +1421,33 @@ export default class CashFlow extends Component {
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent',
color: 'red' color: 'black'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
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 title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={this.props.quarter == 'q3' ? Number(tableMeta.rowData[14].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
/>
</LightTooltip>
: :
null null
} }
</div> </div>
<div className="col-2"> <div className="col-2">
...@@ -1476,7 +1516,7 @@ export default class CashFlow extends Component { ...@@ -1476,7 +1516,7 @@ export default class CashFlow extends Component {
/> />
</LightTooltip> </LightTooltip>
: :
null null
} }
</div> </div>
<div className="col-3"> <div className="col-3">
...@@ -1545,7 +1585,7 @@ export default class CashFlow extends Component { ...@@ -1545,7 +1585,7 @@ export default class CashFlow extends Component {
/> />
</LightTooltip> </LightTooltip>
: :
null null
} }
</div> </div>
<div className="col-4"> <div className="col-4">
...@@ -1981,7 +2021,7 @@ export default class CashFlow extends Component { ...@@ -1981,7 +2021,7 @@ export default class CashFlow extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} {String(this.props.quarter).toLocaleUpperCase()} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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