CashFlow.js 283 KB
Newer Older
1
import { createMuiTheme, FormControlLabel, MuiThemeProvider, Paper, Snackbar, TableCell, Tooltip, Typography, withStyles } from '@material-ui/core'
d.arizona's avatar
d.arizona committed
2
import MUIDataTable from 'mui-datatables';
Deni Rinaldi's avatar
Deni Rinaldi committed
3
import React, { Component } from 'react'
d.arizona's avatar
d.arizona committed
4
import NumberFormat from 'react-number-format';
Deni Rinaldi's avatar
Deni Rinaldi committed
5
import ReactTooltip from 'react-tooltip';
d.arizona's avatar
d.arizona committed
6
import api from '../../api';
Deni Rinaldi's avatar
Deni Rinaldi committed
7
import Images from '../../assets/Images';
d.arizona's avatar
d.arizona committed
8
import * as R from 'ramda'
d.arizona's avatar
d.arizona committed
9
import { PropagateLoader } from 'react-spinners';
10
import Constant from '../../library/Constant';
Riri Novita's avatar
Riri Novita committed
11
import { Alert, Autocomplete } from '@material-ui/lab';
12
import { fixNumber } from '../../library/Utils';
d.arizona's avatar
d.arizona committed
13

d.arizona's avatar
d.arizona committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3());

const options = ct.customOptionsFixedColumn();
const style = {
    position: "sticky",
    left: 0,
    background: "white",
    zIndex: 101,
};
const style2 = {
    position: "sticky",
    background: "white",
    zIndex: 100
};
Deni Rinaldi's avatar
Deni Rinaldi committed
29

d.arizona's avatar
d.arizona committed
30 31 32 33 34 35 36 37
const LightTooltip = withStyles((theme) => ({
    tooltip: {
        backgroundColor: theme.palette.common.white,
        color: 'rgba(0, 0, 0, 0.87)',
        boxShadow: theme.shadows[1],
        fontSize: 11,
    },
}))(Tooltip);
Deni Rinaldi's avatar
Deni Rinaldi committed
38
export default class CashFlow extends Component {
d.arizona's avatar
d.arizona committed
39 40 41
    constructor(props) {
        super(props)
        this.state = {
d.arizona's avatar
d.arizona committed
42
            dataTable: [],
Deni Rinaldi's avatar
Deni Rinaldi committed
43 44
            loading: false,
            minValue: "0",
d.arizona's avatar
d.arizona committed
45
            maxValue: "0",
Riri Novita's avatar
Riri Novita committed
46 47 48
            handleDoubleClick: 0,
            defaultCurrencyUpload: this.props.defaultCurrency,
            visibleAlertSave: false
d.arizona's avatar
d.arizona committed
49 50 51 52
        }
    }

    componentDidMount() {
Deni Rinaldi's avatar
Deni Rinaldi committed
53
        this.setState({ loading: true })
d.arizona's avatar
d.arizona committed
54
        console.log(this.props.PLBSFAMSubmitted)
Deni Rinaldi's avatar
Deni Rinaldi committed
55 56 57 58 59 60 61
        this.getSettingControl()
    }

    getSettingControl() {
        let body = {
            group: 'THRESHOLD_CONTROL',
            company_id: this.props.company.company_id,
Riri Novita's avatar
Riri Novita committed
62 63
            type: 'CASH_FLOW',
            currency_id: this.props.defaultCurrency.id,
Deni Rinaldi's avatar
Deni Rinaldi committed
64 65 66 67 68 69 70 71 72 73 74
        }

        api.create().getAllSettingByType(body).then(response => {
            console.log(response);
            this.setState({
                minValue: response.data.data[0] ? response.data.data[0].min_value : null,
                maxValue: response.data.data[0] ? response.data.data[0].max_value : null,
            }, () => {
                this.getItemHierarki()
            })
        })
d.arizona's avatar
d.arizona committed
75 76 77 78 79 80 81 82 83
    }

    getItemHierarki() {
        this.setState({ loading: true })
        let payload = {
            "report_id": this.props.report_id,
            "revision": Number(this.props.revision),
            "periode": this.props.periode,
            "company_id": this.props.company.company_id,
Riri Novita's avatar
Riri Novita committed
84 85
            "submission_id": this.props.submissionID,
            "currency_id": this.props.defaultCurrency.id
d.arizona's avatar
d.arizona committed
86 87
        }
        // console.log(JSON.stringify(payload))
d.arizona's avatar
d.arizona committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
        // if (this.props.status === 'CLOSED') {
        //     api.create().getDetailReportCF(payload).then(response => {
        //         console.log(response);
        //         let dataTable = []
        //         // console.log(response)
        //         if (response.data) {
        //             if (response.ok) {
        //                 if (response.data.status == 'success') {
        //                     let res = response.data.data
        //                     const handlePushChild = (item) => {
        //                         dataTable.push([
        //                             item.type_report_id,
        //                             item.id,
        //                             item.parent,
        //                             item.formula,
        //                             item.level,
        //                             item.description,
        //                             item.cash_flow.total_actual_before === null ? "0" : item.cash_flow.total_actual_before === "" ? "0" : item.cash_flow.total_actual_before,
        //                             item.cash_flow.january,
        //                             item.cash_flow.february,
        //                             item.cash_flow.march,
        //                             item.cash_flow.april,
        //                             item.cash_flow.may,
        //                             item.cash_flow.june,
        //                             item.cash_flow.july,
        //                             item.cash_flow.august,
        //                             item.cash_flow.september,
        //                             item.cash_flow.october,
        //                             item.cash_flow.november,
        //                             item.cash_flow.december,
        //                             item.cash_flow.total_current_year,
        //                             item.cash_flow.total_next_year,
        //                             item.cash_flow.total_more_year,
        //                             item.order,
        //                             item.condition_it_should_be,
        //                             item.condition_if_wrong,
        //                             item.cash_flow.forecast_formula == null ? [] : item.cash_flow.forecast_formula
        //                         ])
Deni Rinaldi's avatar
Deni Rinaldi committed
126

d.arizona's avatar
d.arizona committed
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
        //                         if (item.children !== null) {
        //                             if (item.children.length > 0) {
        //                                 item.children.map((items, indexs) => {
        //                                     handlePushChild(items)
        //                                 })
        //                             }
        //                         }
        //                     }
        //                     res.map((item, index) => {
        //                         dataTable.push([
        //                             item.type_report_id,
        //                             item.id,
        //                             item.parent,
        //                             item.formula,
        //                             item.level,
        //                             item.description,
        //                             item.cash_flow.total_actual_before === null ? "0" : item.cash_flow.total_actual_before === "" ? "0" : item.cash_flow.total_actual_before,
        //                             item.cash_flow.january,
        //                             item.cash_flow.february,
        //                             item.cash_flow.march,
        //                             item.cash_flow.april,
        //                             item.cash_flow.may,
        //                             item.cash_flow.june,
        //                             item.cash_flow.july,
        //                             item.cash_flow.august,
        //                             item.cash_flow.september,
        //                             item.cash_flow.october,
        //                             item.cash_flow.november,
        //                             item.cash_flow.december,
        //                             item.cash_flow.total_current_year,
        //                             item.cash_flow.total_next_year,
        //                             item.cash_flow.total_more_year,
        //                             item.order,
        //                             item.condition_it_should_be,
        //                             item.condition_if_wrong,
        //                             item.cash_flow.forecast_formula == null ? [] : item.cash_flow.forecast_formula
        //                         ])
        //                         if (item.children !== null) {
        //                             if (item.children.length > 0) {
        //                                 item.children.map((items, indexs) => {
        //                                     handlePushChild(items)
        //                                 })
        //                             }
        //                         }
        //                     })
        //                     this.setState({ dataTable, loading: false, dataReal: res, editable: true })
        //                 } else {
        //                     this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
d.arizona's avatar
d.arizona committed
175
        //                         if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
d.arizona's avatar
d.arizona committed
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
        //                             setTimeout(() => {
        //                                 localStorage.removeItem(Constant.TOKEN)
        //                                 window.location.reload();
        //                             }, 1000);
        //                         }
        //                     })
        //                 }
        //             } else {
        //                 this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
        //             }
        //         } else {
        //             this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
        //         }
        //     })
        // } else {
d.arizona's avatar
d.arizona committed
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
        api.create().getDetailReportCF(payload).then(response => {
            let dataTable = []
            console.log(response)
            if (response.data) {
                if (response.ok) {
                    if (response.data.status == 'success') {
                        let res = response.data.data
                        const handlePushChild = (item) => {
                            dataTable.push([
                                item.type_report_id,
                                item.id,
                                item.parent,
                                item.formula,
                                item.level,
                                item.description,
                                item.cash_flow.total_actual_before === null ? "0" : item.cash_flow.total_actual_before === "" ? "0" : item.cash_flow.total_actual_before,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.january, formula: item.cash_flow.january_formula } : item.cash_flow.january,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.february, formula: item.cash_flow.february_formula } : item.cash_flow.february,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.march, formula: item.cash_flow.march_formula } : item.cash_flow.march,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.april, formula: item.cash_flow.april_formula } : item.cash_flow.april,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.may, formula: item.cash_flow.may_formula } : item.cash_flow.may,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.june, formula: item.cash_flow.june_formula } : item.cash_flow.june,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.july, formula: item.cash_flow.july_formula } : item.cash_flow.july,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.august, formula: item.cash_flow.august_formula } : item.cash_flow.august,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.september, formula: item.cash_flow.september_formula } : item.cash_flow.september,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.october, formula: item.cash_flow.october_formula } : item.cash_flow.october,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.november, formula: item.cash_flow.november_formula } : item.cash_flow.november,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.december, formula: item.cash_flow.december_formula } : item.cash_flow.december,
                                item.cash_flow.total_current_year,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? 0 : item.cash_flow.total_next_year,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? 0 : item.cash_flow.total_more_year,
                                item.order,
                                item.condition_it_should_be,
                                item.condition_if_wrong,
                                item.cash_flow.forecast_formula == null ? [] : item.cash_flow.forecast_formula
                            ])
Deni Rinaldi's avatar
Deni Rinaldi committed
227

d.arizona's avatar
d.arizona committed
228 229 230 231 232
                            if (item.children !== null) {
                                if (item.children.length > 0) {
                                    item.children.map((items, indexs) => {
                                        handlePushChild(items)
                                    })
233 234
                                }
                            }
d.arizona's avatar
d.arizona committed
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
                        }
                        res.map((item, index) => {
                            dataTable.push([
                                item.type_report_id,
                                item.id,
                                item.parent,
                                item.formula,
                                item.level,
                                item.description,
                                item.cash_flow.total_actual_before === null ? "0" : item.cash_flow.total_actual_before === "" ? "0" : item.cash_flow.total_actual_before,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.january, formula: item.cash_flow.january_formula } : item.cash_flow.january,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.february, formula: item.cash_flow.february_formula } : item.cash_flow.february,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.march, formula: item.cash_flow.march_formula } : item.cash_flow.march,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.april, formula: item.cash_flow.april_formula } : item.cash_flow.april,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.may, formula: item.cash_flow.may_formula } : item.cash_flow.may,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.june, formula: item.cash_flow.june_formula } : item.cash_flow.june,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.july, formula: item.cash_flow.july_formula } : item.cash_flow.july,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.august, formula: item.cash_flow.august_formula } : item.cash_flow.august,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.september, formula: item.cash_flow.september_formula } : item.cash_flow.september,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.october, formula: item.cash_flow.october_formula } : item.cash_flow.october,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.november, formula: item.cash_flow.november_formula } : item.cash_flow.november,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.december, formula: item.cash_flow.december_formula } : item.cash_flow.december,
                                item.cash_flow.total_current_year,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? 0 : item.cash_flow.total_next_year,
                                item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? 0 : item.cash_flow.total_more_year,
                                item.order,
                                item.condition_it_should_be,
                                item.condition_if_wrong,
                                item.cash_flow.forecast_formula == null ? [] : item.cash_flow.forecast_formula
                            ])
                            if (item.children !== null) {
                                if (item.children.length > 0) {
                                    item.children.map((items, indexs) => {
                                        handlePushChild(items)
                                    })
Deni Rinaldi's avatar
Deni Rinaldi committed
270
                                }
d.arizona's avatar
d.arizona committed
271 272 273 274 275 276 277 278 279 280 281 282 283 284
                            }
                        })
                        console.log(dataTable);
                        this.setState({ dataTable, loading: false, dataReal: res, editable: true }, () => {
                            this.setState({ loading: true }, () => {
                                setTimeout(() => {
                                    this.setState({ loading: false }, () => {
                                        this.setState({ loading: true }, () => {
                                            setTimeout(() => {
                                                this.setState({ loading: false }, () => {
                                                    this.setState({ loading: true }, () => {
                                                        setTimeout(() => {
                                                            this.setState({ loading: false })
                                                        }, 500);
d.arizona's avatar
d.arizona committed
285
                                                    })
d.arizona's avatar
d.arizona committed
286 287
                                                })
                                            }, 500);
d.arizona's avatar
d.arizona committed
288
                                        })
d.arizona's avatar
d.arizona committed
289 290
                                    })
                                }, 500);
Deni Rinaldi's avatar
Deni Rinaldi committed
291
                            })
d.arizona's avatar
d.arizona committed
292
                        })
293
                    } else {
d.arizona's avatar
d.arizona committed
294
                        this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
d.arizona's avatar
d.arizona committed
295
                            if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
d.arizona's avatar
d.arizona committed
296 297 298 299 300 301
                                setTimeout(() => {
                                    localStorage.removeItem(Constant.TOKEN)
                                    window.location.reload();
                                }, 1000);
                            }
                        })
Deni Rinaldi's avatar
Deni Rinaldi committed
302
                    }
303
                } else {
d.arizona's avatar
d.arizona committed
304
                    this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
d.arizona's avatar
d.arizona committed
305
                }
d.arizona's avatar
d.arizona committed
306 307 308 309
            } else {
                this.setState({ alert: true, messageAlert: 'Connection Timeout, please check your Connection', tipeAlert: 'error', loading: false })
            }
        })
d.arizona's avatar
d.arizona committed
310
        // }
d.arizona's avatar
d.arizona committed
311 312
    }

d.arizona's avatar
d.arizona committed
313
    async downloadAllData() {
faisalhamdi's avatar
faisalhamdi committed
314
        // 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}`
d.arizona's avatar
d.arizona committed
315
        // console.log(url);
Riri Novita's avatar
Riri Novita committed
316 317
        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}`
        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}`
d.arizona's avatar
d.arizona committed
318 319 320
        let res = await fetch(
            this.props.submissionID == null ? resNull : resReal
        )
d.arizona's avatar
d.arizona committed
321 322 323
        console.log(this.props.submissionID);
        console.log(resReal)
        console.log(resNull)
d.arizona's avatar
d.arizona committed
324 325 326 327 328 329 330
        res = await res.blob()
        if (res.size > 0) {
            let url = window.URL.createObjectURL(res);
            let a = document.createElement('a');
            a.href = url;
            a.download = 'Master Budget Cash Flow.xlsx';
            a.click();
Deni Rinaldi's avatar
Deni Rinaldi committed
331
            this.setState({ loading: false })
d.arizona's avatar
d.arizona committed
332
        } else {
Deni Rinaldi's avatar
Deni Rinaldi committed
333
            this.setState({ loading: false })
d.arizona's avatar
d.arizona committed
334 335 336
        }
    }

337 338 339 340
    closeAlert() {
        this.setState({ alert: false })
    }

341
    olahDataCashFlow(dataTable2) {
d.arizona's avatar
d.arizona committed
342 343
        console.log(dataTable2)
        let listCF = []
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410
        if (this.props.defaultCurrency.id == 2) {
            dataTable2.map((item, index) => {
                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)),
                        "february": String(item[8].value == undefined ? item[8] : Number(item[8].value)),
                        "march": String(item[9].value == undefined ? item[9] : Number(item[9].value)),
                        "april": String(item[10].value == undefined ? item[10] : Number(item[10].value)),
                        "may": String(item[11].value == undefined ? item[11] : Number(item[11].value)),
                        "june": String(item[12].value == undefined ? item[12] : Number(item[12].value)),
                        "july": String(item[13].value == undefined ? item[13] : Number(item[13].value)),
                        "august": String(item[14].value == undefined ? item[14] : Number(item[14].value)),
                        "september": String(item[15].value == undefined ? item[15] : Number(item[15].value)),
                        "october": String(item[16].value == undefined ? item[16] : Number(item[16].value)),
                        "november": String(item[17].value == undefined ? item[17] : Number(item[17].value)),
                        "december": String(item[18].value == undefined ? item[18] : Number(item[18].value)),
                        "total_current_year": String(item[19] != '' ? Number(item[19]) : item[19]),
                        "total_next_year": String(item[20] != '' ? Number(item[20]) : item[20]),
                        "total_more_year": String(item[21] != '' ? Number(item[21]) : item[21]),
                        "kpi_type": "",
                        "max_ach": "",
                        "pic": "",
                        "strategic": "",
                        "total_actual_before": "",
                        "uom": "",
                        "weight": ""
                    }
                )
            })
        } else {
            dataTable2.map((item, index) => {
                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] : fixNumber(Number(item[7].value), 1)),
                        "february": String(item[8].value == undefined ? item[8] : fixNumber(Number(item[8].value), 1)),
                        "march": String(item[9].value == undefined ? item[9] : fixNumber(Number(item[9].value), 1)),
                        "april": String(item[10].value == undefined ? item[10] : fixNumber(Number(item[10].value), 1)),
                        "may": String(item[11].value == undefined ? item[11] : fixNumber(Number(item[11].value), 1)),
                        "june": String(item[12].value == undefined ? item[12] : fixNumber(Number(item[12].value), 1)),
                        "july": String(item[13].value == undefined ? item[13] : fixNumber(Number(item[13].value), 1)),
                        "august": String(item[14].value == undefined ? item[14] : fixNumber(Number(item[14].value), 1)),
                        "september": String(item[15].value == undefined ? item[15] : fixNumber(Number(item[15].value), 1)),
                        "october": String(item[16].value == undefined ? item[16] : fixNumber(Number(item[16].value), 1)),
                        "november": String(item[17].value == undefined ? item[17] : fixNumber(Number(item[17].value), 1)),
                        "december": String(item[18].value == undefined ? item[18] : fixNumber(Number(item[18].value), 1)),
                        "total_current_year": String(item[19] != '' ? fixNumber(Number(item[19]), 1) : item[19]),
                        "total_next_year": String(item[20] != '' ? fixNumber(Number(item[20]), 1) : item[20]),
                        "total_more_year": String(item[21] != '' ? fixNumber(Number(item[21]), 1) : item[21]),
                        "kpi_type": "",
                        "max_ach": "",
                        "pic": "",
                        "strategic": "",
                        "total_actual_before": "",
                        "uom": "",
                        "weight": ""
                    }
                )
            })
        }
d.arizona's avatar
d.arizona committed
411 412

        console.log(listCF)
413
        this.createCashFlow(listCF)
d.arizona's avatar
d.arizona committed
414 415
    }

416
    createCashFlow(dbcf) {
d.arizona's avatar
d.arizona committed
417 418 419
        let payload = {
            "submission_id": this.props.submissionID,
            "company_id": this.props.company.company_id,
d.arizona's avatar
d.arizona committed
420
            "periode": this.props.periode,
d.arizona's avatar
d.arizona committed
421
            "report_id": 6,
Riri Novita's avatar
Riri Novita committed
422
            "currency_id": this.props.defaultCurrency.id,
d.arizona's avatar
d.arizona committed
423 424 425 426 427
            "status": "submitted",
            "cash_flow": dbcf
        }
        console.log(dbcf)
        console.log(JSON.stringify(payload))
428
        this.props.createCashFlow(payload)
429
        // this.props.onClickClose()
d.arizona's avatar
d.arizona committed
430 431
    }

Deni Rinaldi's avatar
Deni Rinaldi committed
432
    render() {
d.arizona's avatar
d.arizona committed
433
        let dataTable2 = this.state.dataTable
d.arizona's avatar
d.arizona committed
434
        let loading = false
d.arizona's avatar
d.arizona committed
435
        const handleValueFormula = (value, tableMeta, column, periode, forecast) => {
d.arizona's avatar
d.arizona committed
436
            loading = true
d.arizona's avatar
d.arizona committed
437
            let splitFormula = String(tableMeta.rowData[3]).split(/([()@])/)
syadziy's avatar
syadziy committed
438 439 440 441 442
            // if (tableMeta.rowData[5] == "Cash at the end of the period" && column == 7) {
            //     console.log(splitFormula + " aaa");
            //     splitFormula = String("@2#BS").split(/([()@])/);
            //     console.log(splitFormula + " bbb");
            // }
d.arizona's avatar
d.arizona committed
443 444
            let baru = []
            let anjay = []
d.arizona's avatar
d.arizona committed
445

d.arizona's avatar
d.arizona committed
446 447
            splitFormula.map((item, index) => {
                let items = String(item).substr(Number(String(item).length) - 1, 1)
d.arizona's avatar
d.arizona committed
448
                let subForm = String(item).substr(0, Number(String(item).length) - 1)
d.arizona's avatar
d.arizona committed
449 450 451
                let re = /^[a-zA-Z0-9_]+$/;
                if (item !== "") {
                    if (!re.test(items)) {
d.arizona's avatar
d.arizona committed
452
                        baru.push(subForm)
d.arizona's avatar
d.arizona committed
453
                        baru.push(items)
d.arizona's avatar
d.arizona committed
454 455 456 457 458 459
                    } else {
                        baru.push(String(item))
                    }
                }
            })

d.arizona's avatar
d.arizona committed
460
            let handledoubleFC = 0
d.arizona's avatar
d.arizona committed
461
            baru.map((item, index) => {
Deni Rinaldi's avatar
Deni Rinaldi committed
462
                if (item == '-' || item == '+' || item == '/' || item == '*' || item == '(' || item == ')') {
d.arizona's avatar
d.arizona committed
463 464 465
                    anjay.push(item)
                } else {
                    if (String(item).includes('#')) {
d.arizona's avatar
d.arizona committed
466 467 468
                        if (String(item).includes('[M-1]')) {
                            if (forecast !== undefined) {
                                let forecastt = 0
d.arizona's avatar
d.arizona committed
469 470 471 472 473 474 475
                                if (column == 19) {
                                    let tst = String(item).replace('[M-1]', '')
                                    let data = 18
                                    let period = this.props.periode - 1
                                    let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
                                    if (indexID !== -1) {
                                        let valuezz = tableMeta.rowData[data].formula[indexID].value
syadziy's avatar
syadziy committed
476 477 478 479 480 481
                                        // if (tableMeta.rowData[5] == "Cash at the beginning period") {
                                        //     // console.log(dataTable2[tableMeta.rowIndex+1])
                                        //     // console.log(dataTable2[tableMeta.rowIndex+1][data].value)
                                        //     let valuezzz = dataTable2[tableMeta.rowIndex][7].value
                                        //     forecastt += Number(valuezzz == "" ? 0 : valuezzz)
                                        // } else {
Riri Novita's avatar
Riri Novita committed
482
                                        forecastt += Number(valuezz == "" ? 0 : valuezz)
syadziy's avatar
syadziy committed
483
                                        // }
d.arizona's avatar
d.arizona committed
484 485 486
                                    }
                                }

d.arizona's avatar
d.arizona committed
487 488 489 490 491 492 493
                                if (column == 20) {
                                    let tst = String(item).replace('[M-1]', '')
                                    let data = 18
                                    let period = this.props.periode
                                    let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
                                    if (indexID !== -1) {
                                        let valuezz = tableMeta.rowData[data].formula[indexID].value
syadziy's avatar
syadziy committed
494 495 496 497
                                        // if (tableMeta.rowData[5] == "Cash at the beginning period") {
                                        //     let valuezzz = dataTable2[tableMeta.rowIndex + 1][19]
                                        //     forecastt += Number(valuezzz == "" ? 0 : valuezzz)
                                        // } else {
Riri Novita's avatar
Riri Novita committed
498
                                        forecastt += Number(valuezz == "" ? 0 : valuezz)
syadziy's avatar
syadziy committed
499
                                        // }
d.arizona's avatar
d.arizona committed
500
                                    }
d.arizona's avatar
d.arizona committed
501
                                }
d.arizona's avatar
d.arizona committed
502 503 504 505 506 507 508

                                if (column == 21) {
                                    let tst = String(item).replace('[M-1]', '')
                                    let period = Number(this.props.periode) + 1
                                    let indexID = forecast.findIndex((val) => String(val.item_formula).replace('forecast_', '') == String(`@${tst}`) && val.periode == period)
                                    if (indexID !== -1) {
                                        let valuezz = forecast[indexID].value
syadziy's avatar
syadziy committed
509 510 511 512
                                        // if (tableMeta.rowData[5] == "Cash at the beginning period") {
                                        //     let valuezzz = dataTable2[tableMeta.rowIndex + 1][20]
                                        //     forecastt += Number(valuezzz == "" ? 0 : valuezzz)
                                        // } else {
Riri Novita's avatar
Riri Novita committed
513
                                        forecastt += Number(valuezz == "" ? 0 : valuezz)
syadziy's avatar
syadziy committed
514
                                        // }
d.arizona's avatar
d.arizona committed
515 516
                                    }
                                }
Deni Rinaldi's avatar
Deni Rinaldi committed
517

d.arizona's avatar
d.arizona committed
518 519
                                anjay.push(forecastt)
                            } else {
d.arizona's avatar
d.arizona committed
520 521 522 523
                                let tst = String(item).replace('[M-1]', '')
                                let data = column == 7 ? 18 : column - 1
                                let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode
                                let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
Deni Rinaldi's avatar
Deni Rinaldi committed
524

d.arizona's avatar
d.arizona committed
525
                                if (indexID !== -1) {
syadziy's avatar
syadziy committed
526 527 528 529 530 531 532 533 534 535 536
                                    let valuezz = tableMeta.rowData[5] == "Audit and other adjustment" && column == 7 ? 0 : tableMeta.rowData[data].formula[indexID].value
                                    // if (tableMeta.rowData[5] == "Cash at the beginning period" && column != 7) {
                                    //     // console.log(data)
                                    //     // console.log(dataTable2[tableMeta.rowIndex+1][5])
                                    //     // console.log(dataTable2[tableMeta.rowIndex+1][data])
                                    //     // console.log(dataTable2[tableMeta.rowIndex-1][data].value)
                                    //     // console.log(dataTable2[tableMeta.rowIndex][data].value)
                                    //     // console.log(dataTable2[tableMeta.rowIndex+1][data].value)
                                    //     let valuezzz = dataTable2[tableMeta.rowIndex + 1][data].value
                                    //     anjay.push(valuezzz == "" ? 0 : valuezzz)
                                    // } else {
Riri Novita's avatar
Riri Novita committed
537
                                    anjay.push(valuezz == "" ? 0 : valuezz)
syadziy's avatar
syadziy committed
538
                                    // }
d.arizona's avatar
d.arizona committed
539
                                }
d.arizona's avatar
d.arizona committed
540 541 542
                            }
                        } else {
                            if (forecast !== undefined) {
Deni Rinaldi's avatar
Deni Rinaldi committed
543 544 545 546 547
                                let indexID = forecast.findIndex((val) => String(val.item_formula).replace('forecast_', '') == String(`@${item}`) && val.periode == Number(periode))
                                if (indexID !== -1) {
                                    let valuezz = forecast[indexID].value
                                    anjay.push(valuezz == "" ? 0 : Number(valuezz))
                                }
d.arizona's avatar
d.arizona committed
548 549 550 551 552 553
                            } else {
                                let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
                                if (indexID !== -1) {
                                    let valuezz = value.formula[indexID].value
                                    anjay.push(valuezz == "" ? 0 : valuezz)
                                }
d.arizona's avatar
d.arizona committed
554 555 556 557 558
                            }
                        }
                    } else {
                        let indexID = dataTable2.findIndex((val) => val[22] == item)
                        if (indexID !== -1) {
d.arizona's avatar
d.arizona committed
559
                            let valuezz = dataTable2[indexID][column].value == undefined ? dataTable2[indexID][column] : dataTable2[indexID][column].value
d.arizona's avatar
d.arizona committed
560 561 562 563 564
                            if (item == dataTable2[tableMeta.rowIndex][22]) {
                                anjay.push(0)
                            } else {
                                anjay.push(valuezz == "" ? 0 : valuezz)
                            }
d.arizona's avatar
d.arizona committed
565 566 567 568 569 570 571 572
                        } else {
                            if (item === '(-1)') {
                                anjay.push(-1)
                            }
                        }
                    }
                }
            })
d.arizona's avatar
d.arizona committed
573 574 575 576

            let anjay2 = []
            let kurung = false
            let item1 = []
Deni Rinaldi's avatar
Deni Rinaldi committed
577
            anjay.map((item, index) => {
d.arizona's avatar
d.arizona committed
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592
                if (item == "(") {
                    kurung = true
                } else if (item == ")") {
                    kurung = false
                    anjay2.push(item1)
                    item1 = []
                } else {
                    if (kurung) {
                        item1.push(item)
                    } else {
                        anjay2.push(item)
                    }
                }
            })

d.arizona's avatar
d.arizona committed
593 594
            let total = 0
            let opt = ""
d.arizona's avatar
d.arizona committed
595 596 597
            let totalPrio = 0
            let optPrio = ""
            let prio = false
d.arizona's avatar
d.arizona committed
598
            let optPrev = ""
d.arizona's avatar
d.arizona committed
599 600 601
            anjay2.map((item, index) => {
                if (Array.isArray(item)) {
                    prio = true
d.arizona's avatar
d.arizona committed
602
                    optPrev = opt
d.arizona's avatar
d.arizona committed
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626
                    item.map((items, indexs) => {
                        if (items == "+") {
                            optPrio = "tambah"
                        } else if (items == "-") {
                            optPrio = "kurang"
                        } else if (items == "*") {
                            optPrio = "kali"
                        } else if (items == "/") {
                            optPrio = "bagi"
                        } else {
                            if (optPrio == "tambah") {
                                totalPrio = Number(totalPrio) + Number(items)
                            } else if (optPrio == "kurang") {
                                totalPrio = Number(totalPrio) - Number(items)
                            } else if (optPrio == "kali") {
                                totalPrio = Number(totalPrio) * Number(items)
                            } else if (optPrio == "bagi") {
                                totalPrio = Number(totalPrio) / Number(items) == NaN ? 0 : Number(totalPrio) / Number(items)
                            } else {
                                totalPrio += Number(items)
                            }
                        }
                    })

Deni Rinaldi's avatar
Deni Rinaldi committed
627
                    if (index == anjay2.length - 1) {
d.arizona's avatar
d.arizona committed
628 629 630 631 632 633 634 635 636 637 638 639
                        if (opt == "tambah") {
                            total = Number(total) + Number(totalPrio)
                        } else if (opt == "kurang") {
                            total = Number(total) - Number(totalPrio)
                        } else if (opt == "kali") {
                            total = Number(total) * Number(totalPrio)
                        } else if (opt == "bagi") {
                            total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
                        } else {
                            total += Number(totalPrio)
                        }
                    }
d.arizona's avatar
d.arizona committed
640
                } else {
d.arizona's avatar
d.arizona committed
641 642 643
                    if (item == "+") {
                        opt = "tambah"
                        if (prio) {
d.arizona's avatar
d.arizona committed
644 645 646 647 648 649 650 651 652 653 654
                            if (optPrev == "tambah") {
                                total = Number(total) + Number(totalPrio)
                            } else if (optPrev == "kurang") {
                                total = Number(total) - Number(totalPrio)
                            } else if (optPrev == "kali") {
                                total = Number(total) * Number(totalPrio)
                            } else if (optPrev == "bagi") {
                                total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
                            } else {
                                total += Number(totalPrio)
                            }
d.arizona's avatar
d.arizona committed
655 656 657 658 659 660 661
                            prio = false
                            totalPrio = 0
                            optPrio = ""
                        }
                    } else if (item == "-") {
                        opt = "kurang"
                        if (prio) {
d.arizona's avatar
d.arizona committed
662 663 664 665 666 667 668 669 670 671 672
                            if (optPrev == "tambah") {
                                total = Number(total) + Number(totalPrio)
                            } else if (optPrev == "kurang") {
                                total = Number(total) - Number(totalPrio)
                            } else if (optPrev == "kali") {
                                total = Number(total) * Number(totalPrio)
                            } else if (optPrev == "bagi") {
                                total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
                            } else {
                                total += Number(totalPrio)
                            }
d.arizona's avatar
d.arizona committed
673 674 675 676 677 678 679
                            prio = false
                            totalPrio = 0
                            optPrio = ""
                        }
                    } else if (item == "*") {
                        opt = "kali"
                        if (prio) {
d.arizona's avatar
d.arizona committed
680 681 682 683 684 685 686 687 688 689 690
                            if (optPrev == "tambah") {
                                total = Number(total) + Number(totalPrio)
                            } else if (optPrev == "kurang") {
                                total = Number(total) - Number(totalPrio)
                            } else if (optPrev == "kali") {
                                total = Number(total) * Number(totalPrio)
                            } else if (optPrev == "bagi") {
                                total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
                            } else {
                                total += Number(totalPrio)
                            }
d.arizona's avatar
d.arizona committed
691 692 693 694 695 696 697
                            prio = false
                            totalPrio = 0
                            optPrio = ""
                        }
                    } else if (item == "/") {
                        opt = "bagi"
                        if (prio) {
d.arizona's avatar
d.arizona committed
698 699 700 701 702 703 704 705 706 707 708
                            if (optPrev == "tambah") {
                                total = Number(total) + Number(totalPrio)
                            } else if (optPrev == "kurang") {
                                total = Number(total) - Number(totalPrio)
                            } else if (optPrev == "kali") {
                                total = Number(total) * Number(totalPrio)
                            } else if (optPrev == "bagi") {
                                total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
                            } else {
                                total += Number(totalPrio)
                            }
d.arizona's avatar
d.arizona committed
709 710 711 712
                            prio = false
                            totalPrio = 0
                            optPrio = ""
                        }
d.arizona's avatar
d.arizona committed
713
                    } else {
d.arizona's avatar
d.arizona committed
714 715 716 717 718 719 720 721 722 723 724
                        if (opt == "tambah") {
                            total = Number(total) + Number(item)
                        } else if (opt == "kurang") {
                            total = Number(total) - Number(item)
                        } else if (opt == "kali") {
                            total = Number(total) * Number(item)
                        } else if (opt == "bagi") {
                            total = Number(total) / Number(item) == NaN ? 0 : Number(total) / Number(item)
                        } else {
                            total += Number(item)
                        }
d.arizona's avatar
d.arizona committed
725 726
                    }
                }
d.arizona's avatar
d.arizona committed
727 728 729 730 731
                // if (String(tableMeta.rowData[5]).toLocaleUpperCase() == "4.0 CASH FLOW MOVEMENT" && column == 7) {
                //     console.log(item)
                //     console.log(totalPrio)
                //     console.log(total)
                // }
d.arizona's avatar
d.arizona committed
732
            })
d.arizona's avatar
d.arizona committed
733 734 735 736

            total = R.equals(total, NaN) ? "0.0" : total
            // // total = R.equals(total, NaN) ? "0.0" : total
            // // console.log(dataTable2[tableMeta.rowIndex][22])
Deni Rinaldi's avatar
Deni Rinaldi committed
737
            // // console.log(tableMeta.rowData[5])
d.arizona's avatar
d.arizona committed
738 739
            // if (tableMeta.rowData[5] == "1.5 Other non-current assets") {
            // if (forecast !== undefined) {
d.arizona's avatar
d.arizona committed
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754
            // if (column == 19) { 
            //     console.log(splitFormula)
            //         console.log(baru)
            //         console.log(anjay)
            //         console.log(anjay2)
            //         console.log(total)
            // }
            // if (String(tableMeta.rowData[5]).toLocaleUpperCase() == "4.0 CASH FLOW MOVEMENT" && column == 7) {
            //     console.log(splitFormula)
            //     console.log(baru)
            //     console.log(anjay)
            //     console.log(anjay2)
            //     console.log(total)
            //     console.log(dataTable2[tableMeta.rowIndex])
            // }
d.arizona's avatar
d.arizona committed
755 756
            // }

syadziy's avatar
syadziy committed
757
            if (tableMeta.rowData[5] == "Cash at the end of the period" && column == 7) {
qorri_di's avatar
qorri_di committed
758 759 760 761 762
                // console.log(splitFormula)
                // console.log(baru)
                // console.log(anjay)
                // console.log(anjay2)
                // console.log(total)
syadziy's avatar
syadziy committed
763 764
                // let testttt = dataTable2[tableMeta.rowIndex - 1][8].value
                // console.log(testttt)
qorri_di's avatar
qorri_di committed
765
                // total = testttt 
d.arizona's avatar
d.arizona committed
766 767
            }

d.arizona's avatar
d.arizona committed
768 769 770 771 772
            if (dataTable2[tableMeta.rowIndex][column].value == undefined) {
                dataTable2[tableMeta.rowIndex][column] = total
            } else {
                dataTable2[tableMeta.rowIndex][column].value = total
            }
d.arizona's avatar
d.arizona committed
773
            loading = false
d.arizona's avatar
d.arizona committed
774 775
            return total
        }
d.arizona's avatar
d.arizona committed
776

d.arizona's avatar
d.arizona committed
777 778 779
        const handleForecast = (tableMeta, periode, column) => {
            let total = 0
            total = handleValueFormula(dataTable2[tableMeta.rowIndex][column], tableMeta, column, periode, dataTable2[tableMeta.rowIndex][25])
d.arizona's avatar
d.arizona committed
780 781
            return total
        }
d.arizona's avatar
d.arizona committed
782

qorri_di's avatar
qorri_di committed
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824
        const handleFYTotal = (tableMeta) => {
            let total = 0
            // dataTable2[tableMeta.rowIndex].map((item, index) => {
            //     if (index == 18) {
            //         if (index >= 6 && index <= 17) {
            //             let valItem = item.value == undefined || item.value == "" ? 0 : item.value
            //             total += Number(valItem)
            //         }
            //     }

            // })

            dataTable2[tableMeta.rowIndex].map((item, index) => {
                if (index >= 7 && index <= 18) {
                    let valItem = item.value == undefined || item.value == "" ? 0 : item.value
                    total += Number(valItem)
                }
            })

            if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "cash at the beginning period") {
                let totalBeginning = dataTable2[tableMeta.rowIndex][19] = dataTable2[tableMeta.rowIndex][7].value
                return totalBeginning
            } else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "cash at the end of the period") {
                console.log(tableMeta.rowIndex);
                let value = Number(dataTable2[tableMeta.rowIndex - 1][19]) + Number(dataTable2[tableMeta.rowIndex - 2][19])
                return R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
            } else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "control (should be nil)") {
                let cashOfTheEndFy = Number(dataTable2[tableMeta.rowIndex - 3][19]) + Number(dataTable2[tableMeta.rowIndex - 4][19])
                let cahsOfTheEndDec = Number(dataTable2[tableMeta.rowIndex - 2][19])
                // console.log(cashOfTheEndFy);
                // console.log(cahsOfTheEndDec);
                let value = Number(cashOfTheEndFy) - Number(cahsOfTheEndDec);
                console.log(dataTable2[tableMeta.rowIndex - 2][19]);
                return R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
            } else {
                dataTable2[tableMeta.rowIndex][19] = total
                return total
            }

            // console.log(total);
        }

d.arizona's avatar
d.arizona committed
825 826
        let columns = [
            {
Deni Rinaldi's avatar
Deni Rinaldi committed
827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
d.arizona's avatar
d.arizona committed
852 853 854
                name: "(In Rupiah million)",
                options: {
                    customHeadRender: (columnMeta) => (
d.arizona's avatar
d.arizona committed
855
                        <TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 103, backgroundColor: '#1c71b8', width: 300 }}>
d.arizona's avatar
d.arizona committed
856 857 858 859 860 861 862
                            <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'left' }}>{columnMeta.name}</Typography>
                        </TableCell>
                    ),
                    setCellProps: () => ({ style }),
                    customBodyRender: (val, tableMeta) => {
                        return (
                            <div style={{ width: 300 }}>
d.arizona's avatar
d.arizona committed
863 864
                                {tableMeta.rowData[26] ?
                                    tableMeta.rowData[26].length > 0 ?
d.arizona's avatar
d.arizona committed
865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884
                                        <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
                                            <LightTooltip title={"Report Items Not Registered"} arrow>
                                                <span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
                                            </LightTooltip>
                                        </div>
                                        :
                                        tableMeta.rowData[4] == 0 ?
                                            <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
                                            :
                                            <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
                                                <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
                                            </div>
                                    :
                                    tableMeta.rowData[4] == 0 ?
                                        <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
                                        :
                                        <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
                                            <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
                                        </div>
                                }
d.arizona's avatar
d.arizona committed
885 886 887 888 889
                            </div>
                        )
                    }
                }
            },
d.arizona's avatar
d.arizona committed
890
            {
Riri Novita's avatar
Riri Novita committed
891
                name: `MB ${this.props.periode}`,
d.arizona's avatar
d.arizona committed
892 893
                options: {
                    customHeadRender: (columnMeta) => (
Deni Rinaldi's avatar
Deni Rinaldi committed
894
                        <th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
d.arizona's avatar
d.arizona committed
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926
                            {/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
                                <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
                            </TableCell> */}
                            <div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
                            <div className="grid grid-3x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
                                <div className="column-1 grid grid-4x" style={{ placeSelf: 'center', textAlign: 'center', backgroundColor: '#07a7d0' }}>
                                    <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"1"}</span>
                                    </div>
                                    <div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"2"}</span>
                                    </div>
                                    <div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"3"}</span>
                                    </div>
                                    <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"4"}</span>
                                    </div>
                                </div>
                                <div className="column-2 grid grid-4x" style={{ placeSelf: 'center', textAlign: 'center', backgroundColor: '#07a7d0' }}>
                                    <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"5"}</span>
                                    </div>
                                    <div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"6"}</span>
                                    </div>
                                    <div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"7"}</span>
                                    </div>
                                    <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"8"}</span>
                                    </div>
Deni Rinaldi's avatar
Deni Rinaldi committed
927

d.arizona's avatar
d.arizona committed
928 929 930 931 932 933 934 935 936 937 938 939 940 941 942
                                </div>
                                <div className="column-3 grid grid-4x" style={{ placeSelf: 'center', textAlign: 'center', backgroundColor: '#07a7d0' }}>
                                    <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"9"}</span>
                                    </div>
                                    <div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"10"}</span>
                                    </div>
                                    <div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
                                        <span>{"11"}</span>
                                    </div>
                                    <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#07a7d0' }}>
                                        <span>{"12"}</span>
                                    </div>
                                </div>
Deni Rinaldi's avatar
Deni Rinaldi committed
943

d.arizona's avatar
d.arizona committed
944 945 946 947 948 949 950 951 952 953
                            </div>
                        </th>
                    ),
                    setCellProps: () => ({ style2 }),
                    customBodyRender: (val, tableMeta, updateValue) => {
                        return (
                            <div>
                                <div className="grid grid-3x content-center">
                                    <div className="grid grid-4x content-center">
                                        <div className="col-1">
Deni Rinaldi's avatar
Deni Rinaldi committed
954
                                            {
d.arizona's avatar
d.arizona committed
955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[7]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[7]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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]).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
                                                //                         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]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[7]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[7]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
qorri_di's avatar
qorri_di committed
1010
                                                //             </span> 
d.arizona's avatar
d.arizona committed
1011
                                                //     :
d.arizona's avatar
d.arizona committed
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
1044 1045
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[7].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)), 1))}
                                                                // value={fixNumber(Number(tableMeta.rowData[7].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7].value), 1)}
d.arizona's avatar
d.arizona committed
1046 1047
                                                            />
                                                        </span>
Deni Rinaldi's avatar
Deni Rinaldi committed
1048
                                                        :
d.arizona's avatar
d.arizona committed
1049 1050 1051 1052
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
1053 1054 1055 1056 1057 1058
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1059 1060
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[7].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)), 1))}
                                                                    // value={fixNumber(Number(tableMeta.rowData[7].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7].value), 1)}
Deni Rinaldi's avatar
Deni Rinaldi committed
1061 1062
                                                                />
                                                                :
d.arizona's avatar
d.arizona committed
1063 1064
                                                                tableMeta.rowData[0] === 1 ?
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
1065
                                                                    :
d.arizona's avatar
d.arizona committed
1066
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081
                                                                        (Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                thousandSeparator={true}
                                                                                style={{
                                                                                    fontSize: 12,
                                                                                    textAlign: 'right',
                                                                                    borderColor: 'transparent',
                                                                                    margin: 0,
                                                                                    width: 96,
                                                                                    backgroundColor: 'transparent',
                                                                                    color: 'black'
                                                                                }}
                                                                                type="text"
                                                                                placeholder=""
                                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
1082 1083
                                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[7].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)), 1))}
                                                                                // value={fixNumber(Number(tableMeta.rowData[7].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7].value), 1)}
Riri Novita's avatar
Riri Novita committed
1084 1085
                                                                            /> :
                                                                            <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
1086 1087 1088 1089 1090 1091 1092 1093 1094
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
1095
                                                                                        color: 'red'
1096 1097 1098 1099
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1100 1101
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[7].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[7], tableMeta, 7)), 1))}
                                                                                    // value={fixNumber(Number(tableMeta.rowData[7].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[7].value), 1)}
Riri Novita's avatar
Riri Novita committed
1102 1103
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
1104 1105
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
1106 1107 1108
                                            }
                                        </div>
                                        <div className="col-2">
Deni Rinaldi's avatar
Deni Rinaldi committed
1109
                                            {
d.arizona's avatar
d.arizona committed
1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[8]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[8]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[8]).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
                                                //                         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[8]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[8]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[8]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
1191
                                                        // null
d.arizona's avatar
d.arizona committed
1192 1193 1194 1195 1196 1197 1198
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
1199
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[8].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[8].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)), 1))}
d.arizona's avatar
d.arizona committed
1200 1201 1202 1203 1204 1205 1206 1207
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
1208 1209 1210 1211 1212 1213
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1214
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[8].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[8].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
1215
                                                                />
d.arizona's avatar
d.arizona committed
1216
                                                                :
d.arizona's avatar
d.arizona committed
1217 1218
                                                                tableMeta.rowData[0] === 1 ?
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
1219
                                                                    :
d.arizona's avatar
d.arizona committed
1220
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238
                                                                        (Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[8].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[8].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
1239 1240 1241 1242 1243 1244 1245 1246 1247
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
1248
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
1249 1250 1251 1252
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1253 1254 1255
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[8].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[8].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[8], tableMeta, 8)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
1256 1257
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
1258 1259 1260
                                            }
                                        </div>
                                        <div className="col-3">
Deni Rinaldi's avatar
Deni Rinaldi committed
1261
                                            {
d.arizona's avatar
d.arizona committed
1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[9]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[9]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[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
                                                //                         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[9]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[9]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[9]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
1343
                                                        // null
d.arizona's avatar
d.arizona committed
1344 1345 1346 1347 1348 1349 1350
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
1351
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[9].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[9].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)), 1))}
d.arizona's avatar
d.arizona committed
1352 1353 1354 1355 1356 1357 1358 1359
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
1360 1361 1362 1363 1364 1365
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1366
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[9].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[9].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
1367
                                                                />
d.arizona's avatar
d.arizona committed
1368
                                                                :
d.arizona's avatar
d.arizona committed
1369 1370
                                                                tableMeta.rowData[0] === 1 ?
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
1371
                                                                    :
d.arizona's avatar
d.arizona committed
1372
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390
                                                                        (Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[9].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[9].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
1391 1392 1393 1394 1395 1396 1397 1398 1399
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
1400
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
1401 1402 1403 1404
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1405 1406 1407
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[9].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[9].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[9], tableMeta, 9)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
1408 1409
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
1410 1411 1412
                                            }
                                        </div>
                                        <div className="col-4">
Deni Rinaldi's avatar
Deni Rinaldi committed
1413
                                            {
d.arizona's avatar
d.arizona committed
1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[10]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[10]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[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
                                                //                         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[10]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[10]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[10]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
1495
                                                        // null
d.arizona's avatar
d.arizona committed
1496 1497 1498 1499 1500 1501 1502
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
1503
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[10].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[10].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)), 1))}
d.arizona's avatar
d.arizona committed
1504 1505 1506 1507 1508 1509 1510 1511
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
1512 1513 1514 1515 1516 1517
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1518
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[10].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[10].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
1519
                                                                />
d.arizona's avatar
d.arizona committed
1520
                                                                :
d.arizona's avatar
d.arizona committed
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532
                                                                tableMeta.rowData[0] === 1 ?
                                                                    // value === "" ?
                                                                    //     null :
                                                                    //     <NumberFormat
                                                                    //         thousandSeparator={true}
                                                                    //         style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    //         type="text"
                                                                    //         placeholder=""
                                                                    //         disabled={true}
                                                                    //         value={Number(value)}
                                                                    //     />
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
1533
                                                                    :
d.arizona's avatar
d.arizona committed
1534
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552
                                                                        (Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[10].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[10].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
1553 1554 1555 1556 1557 1558 1559 1560 1561
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
1562
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
1563 1564 1565 1566
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1567 1568 1569
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[10].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[10].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[10], tableMeta, 10)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
1570 1571
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
1572 1573 1574 1575 1576
                                            }
                                        </div>
                                    </div>
                                    <div className="grid grid-4x content-center">
                                        <div className="col-1">
Deni Rinaldi's avatar
Deni Rinaldi committed
1577
                                            {
d.arizona's avatar
d.arizona committed
1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[11]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[11]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[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
                                                //                         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[11]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[11]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[11]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
1659
                                                        // null
d.arizona's avatar
d.arizona committed
1660 1661 1662 1663 1664 1665 1666
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
1667
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[11].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[11].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)), 1))}
d.arizona's avatar
d.arizona committed
1668 1669 1670 1671 1672 1673 1674 1675
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
1676 1677 1678 1679 1680 1681
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1682
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[11].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[11].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
1683
                                                                />
d.arizona's avatar
d.arizona committed
1684
                                                                :
d.arizona's avatar
d.arizona committed
1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696
                                                                tableMeta.rowData[0] === 1 ?
                                                                    // value === "" ?
                                                                    //     null :
                                                                    //     <NumberFormat
                                                                    //         thousandSeparator={true}
                                                                    //         style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    //         type="text"
                                                                    //         placeholder=""
                                                                    //         disabled={true}
                                                                    //         value={Number(value)}
                                                                    //     />
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
1697
                                                                    :
d.arizona's avatar
d.arizona committed
1698
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716
                                                                        (Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[11].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[11].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
1717 1718 1719 1720 1721 1722 1723 1724 1725
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
1726
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
1727 1728 1729 1730
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1731 1732 1733
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[11].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[11].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[11], tableMeta, 11)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
1734 1735
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
1736 1737 1738
                                            }
                                        </div>
                                        <div className="col-2">
Deni Rinaldi's avatar
Deni Rinaldi committed
1739
                                            {
d.arizona's avatar
d.arizona committed
1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[12]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[12]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[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
                                                //                         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[12]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[12]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[12]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
1821
                                                        // null
d.arizona's avatar
d.arizona committed
1822 1823 1824 1825 1826 1827 1828
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
1829
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[12].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[12].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)), 1))}
d.arizona's avatar
d.arizona committed
1830 1831 1832 1833 1834 1835 1836 1837
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
1838 1839 1840 1841 1842 1843
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1844
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[12].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[12].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
1845
                                                                />
d.arizona's avatar
d.arizona committed
1846
                                                                :
d.arizona's avatar
d.arizona committed
1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858
                                                                tableMeta.rowData[0] === 1 ?
                                                                    // value === "" ?
                                                                    //     null :
                                                                    //     <NumberFormat
                                                                    //         thousandSeparator={true}
                                                                    //         style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    //         type="text"
                                                                    //         placeholder=""
                                                                    //         disabled={true}
                                                                    //         value={Number(value)}
                                                                    //     />
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
1859
                                                                    :
d.arizona's avatar
d.arizona committed
1860
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878
                                                                        (Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[12].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[12].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
1879 1880 1881 1882 1883 1884 1885 1886 1887
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
1888
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
1889 1890 1891 1892
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
1893 1894 1895
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[12].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[12].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[12], tableMeta, 12)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
1896 1897
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
1898 1899 1900
                                            }
                                        </div>
                                        <div className="col-3">
Deni Rinaldi's avatar
Deni Rinaldi committed
1901
                                            {
d.arizona's avatar
d.arizona committed
1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[13]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[13]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[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
                                                //                         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[13]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[13]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[13]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
1983
                                                        // null
d.arizona's avatar
d.arizona committed
1984 1985 1986 1987 1988 1989 1990
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
1991
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[13].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[13].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)), 1))}
d.arizona's avatar
d.arizona committed
1992 1993 1994 1995 1996 1997 1998 1999
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
2000 2001 2002 2003 2004 2005
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2006
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[13].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[13].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
2007
                                                                />
d.arizona's avatar
d.arizona committed
2008
                                                                :
d.arizona's avatar
d.arizona committed
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
                                                                tableMeta.rowData[0] === 1 ?
                                                                    // value === "" ?
                                                                    //     null :
                                                                    //     <NumberFormat
                                                                    //         thousandSeparator={true}
                                                                    //         style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    //         type="text"
                                                                    //         placeholder=""
                                                                    //         disabled={true}
                                                                    //         value={Number(value)}
                                                                    //     />
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
2021
                                                                    :
d.arizona's avatar
d.arizona committed
2022
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040
                                                                        (Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[13].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[13].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
2041 2042 2043 2044 2045 2046 2047 2048 2049
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
2050
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
2051 2052 2053 2054
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2055 2056 2057
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[13].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[13].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[13], tableMeta, 13)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
2058 2059
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
2060 2061 2062
                                            }
                                        </div>
                                        <div className="col-4">
Deni Rinaldi's avatar
Deni Rinaldi committed
2063
                                            {
d.arizona's avatar
d.arizona committed
2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[14]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[14]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[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
                                                //                         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[14]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[14]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[14]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
2145
                                                        // null
d.arizona's avatar
d.arizona committed
2146 2147 2148 2149 2150 2151 2152
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
2153
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[14].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[14].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)), 1))}
d.arizona's avatar
d.arizona committed
2154 2155 2156 2157 2158 2159 2160 2161
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
2162 2163 2164 2165 2166 2167
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2168
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[14].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[14].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
2169
                                                                />
d.arizona's avatar
d.arizona committed
2170
                                                                :
d.arizona's avatar
d.arizona committed
2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182
                                                                tableMeta.rowData[0] === 1 ?
                                                                    // value === "" ?
                                                                    //     null :
                                                                    //     <NumberFormat
                                                                    //         thousandSeparator={true}
                                                                    //         style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    //         type="text"
                                                                    //         placeholder=""
                                                                    //         disabled={true}
                                                                    //         value={Number(value)}
                                                                    //     />
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
2183
                                                                    :
d.arizona's avatar
d.arizona committed
2184
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202
                                                                        (Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[14].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[14].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
2203 2204 2205 2206 2207 2208 2209 2210 2211
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
2212
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
2213 2214 2215 2216
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2217 2218 2219
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[14].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[14].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[14], tableMeta, 14)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
2220 2221
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
2222 2223
                                            }
                                        </div>
Deni Rinaldi's avatar
Deni Rinaldi committed
2224
                                    </div>
d.arizona's avatar
d.arizona committed
2225 2226
                                    <div className="grid grid-4x content-center">
                                        <div className="col-1">
Deni Rinaldi's avatar
Deni Rinaldi committed
2227
                                            {
d.arizona's avatar
d.arizona committed
2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[15]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[15]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[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>
                                                //                     <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[15]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[15]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[15]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
2309
                                                        // null
d.arizona's avatar
d.arizona committed
2310 2311 2312 2313 2314 2315 2316
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
2317
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[15].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[15].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)), 1))}
d.arizona's avatar
d.arizona committed
2318 2319 2320 2321 2322 2323 2324 2325
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
2326 2327 2328 2329 2330 2331
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2332
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[15].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[15].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
2333
                                                                />
d.arizona's avatar
d.arizona committed
2334
                                                                :
d.arizona's avatar
d.arizona committed
2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346
                                                                tableMeta.rowData[0] === 1 ?
                                                                    // value === "" ?
                                                                    //     null :
                                                                    //     <NumberFormat
                                                                    //         thousandSeparator={true}
                                                                    //         style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    //         type="text"
                                                                    //         placeholder=""
                                                                    //         disabled={true}
                                                                    //         value={Number(value)}
                                                                    //     />
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
2347
                                                                    :
d.arizona's avatar
d.arizona committed
2348
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366
                                                                        (Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[15].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[15].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
2367 2368 2369 2370 2371 2372 2373 2374 2375
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
2376
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
2377 2378 2379 2380
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2381 2382 2383
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[15].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[15].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
2384 2385
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
2386 2387 2388
                                            }
                                        </div>
                                        <div className="col-2">
Deni Rinaldi's avatar
Deni Rinaldi committed
2389
                                            {
d.arizona's avatar
d.arizona committed
2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[16]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[16]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[16]).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
                                                //                         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[16]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={val}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[16]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
2471
                                                        // null
d.arizona's avatar
d.arizona committed
2472 2473 2474 2475 2476 2477 2478
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
2479
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[16].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[16].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)), 1))}
d.arizona's avatar
d.arizona committed
2480 2481 2482 2483 2484 2485 2486 2487
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
2488 2489 2490 2491 2492 2493
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2494
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[16].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[16].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
2495
                                                                />
d.arizona's avatar
d.arizona committed
2496
                                                                :
d.arizona's avatar
d.arizona committed
2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508
                                                                tableMeta.rowData[0] === 1 ?
                                                                    // value === "" ?
                                                                    //     null :
                                                                    //     <NumberFormat
                                                                    //         thousandSeparator={true}
                                                                    //         style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    //         type="text"
                                                                    //         placeholder=""
                                                                    //         disabled={true}
                                                                    //         value={Number(value)}
                                                                    //     />
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
2509
                                                                    :
d.arizona's avatar
d.arizona committed
2510
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528
                                                                        (Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[16].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[16].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
2529 2530 2531 2532 2533 2534 2535 2536 2537
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
2538
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
2539 2540 2541 2542
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2543 2544 2545
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[16].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[16].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
2546 2547
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
2548 2549 2550
                                            }
                                        </div>
                                        <div className="col-3">
Deni Rinaldi's avatar
Deni Rinaldi committed
2551
                                            {
d.arizona's avatar
d.arizona committed
2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[17]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[17]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[17]).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
                                                //                         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[17]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[17]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[17]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
2633
                                                        // null
d.arizona's avatar
d.arizona committed
2634 2635 2636 2637 2638 2639 2640
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
2641
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[17].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[17].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)), 1))}
d.arizona's avatar
d.arizona committed
2642 2643 2644 2645 2646 2647 2648 2649
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
2650 2651 2652 2653 2654 2655
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2656
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[17].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[17].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
2657
                                                                />
d.arizona's avatar
d.arizona committed
2658
                                                                :
d.arizona's avatar
d.arizona committed
2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670
                                                                tableMeta.rowData[0] === 1 ?
                                                                    // value === "" ?
                                                                    //     null :
                                                                    //     <NumberFormat
                                                                    //         thousandSeparator={true}
                                                                    //         style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    //         type="text"
                                                                    //         placeholder=""
                                                                    //         disabled={true}
                                                                    //         value={Number(value)}
                                                                    //     />
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
2671
                                                                    :
d.arizona's avatar
d.arizona committed
2672
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690
                                                                        (Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[17].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[17].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
2691 2692 2693 2694 2695 2696 2697 2698 2699
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
2700
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
2701 2702 2703 2704
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2705 2706 2707
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[17].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[17].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
2708 2709
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
2710 2711 2712
                                            }
                                        </div>
                                        <div className="col-4">
Deni Rinaldi's avatar
Deni Rinaldi committed
2713
                                            {
d.arizona's avatar
d.arizona committed
2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769
                                                // this.props.status === 'CLOSED' ?
                                                //     tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                                //         null :
                                                //         tableMeta.rowData[0] === 7 ?
                                                //             (Number(tableMeta.rowData[18]).toFixed(1) >= Number(this.state.minValue) && Number(tableMeta.rowData[18]).toFixed(1) <= Number(this.state.maxValue)) ?
                                                //                 <NumberFormat
                                                //                     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[18]).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
                                                //                         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[18]).toFixed(1)}
                                                //                     />
                                                //                 </LightTooltip>
                                                //             :
                                                //             <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                //                 <FormControlLabel
                                                //                     style={{ margin: 0 }}
                                                //                     value={Number(tableMeta.rowData[18]).toFixed(1)}
                                                //                     control={
                                                //                         <NumberFormat
                                                //                             thousandSeparator={true}
                                                //                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
                                                //                             type="text"
                                                //                             placeholder=""
                                                //                             disabled={true}
                                                //                             value={Number(tableMeta.rowData[18]).toFixed(1)}
                                                //                         />
                                                //                     }
                                                //                 />
                                                //             </span> :
d.arizona's avatar
d.arizona committed
2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794
                                                tableMeta.rowData[0] === 3 ?
                                                    null
                                                    // <div style={{ flex: 1 }}>
                                                    //     <FormControlLabel
                                                    //         style={{ margin: 0 }}
                                                    //         value={value}
                                                    //         control={
                                                    //             <NumberFormat
                                                    //                 thousandSeparator={true}
                                                    //                 style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    //                 type="text"
                                                    //                 placeholder=""
                                                    //                 disabled={true}
                                                    //                 value={Number(tableMeta).toFixed(1)}
                                                    //                 onBlur={(event) => {
                                                    //                     handleChange(event.target.value, tableMeta)
                                                    //                     console.log(dataTable2)
                                                    //                 }}
                                                    //             />
                                                    //         }
                                                    //     />
                                                    // </div>
                                                    :
                                                    // null
                                                    tableMeta.rowData[0] === 5 ?
Deni Rinaldi's avatar
Deni Rinaldi committed
2795
                                                        // null
d.arizona's avatar
d.arizona committed
2796 2797 2798 2799 2800 2801 2802
                                                        <span style={{ fontSize: 12, textAlign: 'right' }}>
                                                            <NumberFormat
                                                                thousandSeparator={true}
                                                                style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                type="text"
                                                                placeholder=""
                                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
2803
                                                                value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[18].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[18].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)), 1))}
d.arizona's avatar
d.arizona committed
2804 2805 2806 2807 2808 2809 2810 2811
                                                            />
                                                        </span>
                                                        :
                                                        tableMeta.rowData[0] === 4 ?
                                                            null
                                                            :
                                                            tableMeta.rowData[0] === 6 ?
                                                                // null
Deni Rinaldi's avatar
Deni Rinaldi committed
2812 2813 2814 2815 2816 2817
                                                                <NumberFormat
                                                                    thousandSeparator={true}
                                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    type="text"
                                                                    placeholder=""
                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2818
                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[18].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[18].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)), 1))}
Deni Rinaldi's avatar
Deni Rinaldi committed
2819
                                                                />
d.arizona's avatar
d.arizona committed
2820
                                                                :
d.arizona's avatar
d.arizona committed
2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832
                                                                tableMeta.rowData[0] === 1 ?
                                                                    // value === "" ?
                                                                    //     null :
                                                                    //     <NumberFormat
                                                                    //         thousandSeparator={true}
                                                                    //         style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                                    //         type="text"
                                                                    //         placeholder=""
                                                                    //         disabled={true}
                                                                    //         value={Number(value)}
                                                                    //     />
                                                                    null
Deni Rinaldi's avatar
Deni Rinaldi committed
2833
                                                                    :
d.arizona's avatar
d.arizona committed
2834
                                                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852
                                                                        (Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)).toFixed(1) <= Number(this.state.maxValue)) ?
                                                                            <NumberFormat
                                                                                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 ? (fixNumber(Number(tableMeta.rowData[18].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[18].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)), 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>
Deni Rinaldi's avatar
Deni Rinaldi committed
2853 2854 2855 2856 2857 2858 2859 2860 2861
                                                                                <NumberFormat
                                                                                    thousandSeparator={true}
                                                                                    style={{
                                                                                        fontSize: 12,
                                                                                        textAlign: 'right',
                                                                                        borderColor: 'transparent',
                                                                                        margin: 0,
                                                                                        width: 96,
                                                                                        backgroundColor: 'transparent',
Riri Novita's avatar
Riri Novita committed
2862
                                                                                        color: 'red'
Deni Rinaldi's avatar
Deni Rinaldi committed
2863 2864 2865 2866
                                                                                    }}
                                                                                    type="text"
                                                                                    placeholder=""
                                                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
2867 2868 2869
                                                                                    value={this.props.PLBSFAMSubmitted ? (fixNumber(Number(tableMeta.rowData[18].value), 1) == 0 ? "0.0" : fixNumber(Number(tableMeta.rowData[18].value), 1)) : (fixNumber(Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)), 1) == 0 ? "0.0" : fixNumber(Number(handleValueFormula(tableMeta.rowData[18], tableMeta, 18)), 1))}
                                                                                />
                                                                            </LightTooltip>
d.arizona's avatar
d.arizona committed
2870 2871
                                                                        :
                                                                        null
d.arizona's avatar
d.arizona committed
2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939
                                            }
                                        </div>
                                    </div>
                                </div>
                            </div>
                        )
                    }
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
Riri Novita's avatar
Riri Novita committed
2940
            },
qorri_di's avatar
qorri_di committed
2941 2942 2943 2944 2945
            // {
            //     name: "",
            //     options: {
            //         display: false
            //     }
qorri_di's avatar
qorri_di committed
2946
            // }, 
qorri_di's avatar
qorri_di committed
2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027
            // {
            //     name: "",
            //     options: {
            //         display: false,
            //         customHeadRender: (columnMeta) => (
            //             <th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
            //                 {/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
            //                     <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
            //                 </TableCell> */}
            //                 <div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
            //                 <div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
            //                     <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#07a7d0' }}>
            //                         <span>{"ForeCast"}</span>
            //                     </div>
            //                 </div>
            //             </th>
            //         ),
            //         setCellProps: () => ({ style2 }),
            //         customBodyRender: (value, tableMeta, updateValue) => {
            //             return (
            //                 <div style={{ textAlign: 'right' }}>
            //                     {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
            //                         null
            //                         :
            //                         tableMeta.rowData[0] === 7 ?
            //                             (Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1) >= Number(this.state.minValue) && Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1) <= Number(this.state.maxValue)) ?
            //                                 <NumberFormat
            //                                     thousandSeparator={true}
            //                                     style={{
            //                                         fontSize: 12,
            //                                         textAlign: 'right',
            //                                         borderColor: 'transparent',
            //                                         margin: 0,
            //                                         width: 96,
            //                                         backgroundColor: 'transparent',
            //                                         color: 'black'
            //                                     }}
            //                                     type="text"
            //                                     placeholder=""
            //                                     disabled={true}
            //                                     value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).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
            //                                         thousandSeparator={true}
            //                                         style={{
            //                                             fontSize: 12,
            //                                             textAlign: 'right',
            //                                             borderColor: 'transparent',
            //                                             margin: 0,
            //                                             width: 96,
            //                                             backgroundColor: 'transparent',
            //                                             color: 'red'
            //                                         }}
            //                                         type="text"
            //                                         placeholder=""
            //                                         disabled={true}
            //                                         value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
            //                                     />
            //                                 </LightTooltip>
            //                             :
            //                             <div style={{ flex: 1 }}>
            //                                 <FormControlLabel
            //                                     style={{ margin: 0 }}
            //                                     value={value}
            //                                     control={
            //                                         <NumberFormat
            //                                             thousandSeparator={true}
            //                                             style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
            //                                             type="text"
            //                                             placeholder=""
            //                                             disabled={true}
            //                                             value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
            //                                         />
            //                                     }
            //                                 />
            //                             </div>}
            //                 </div>
            //             )
            //         }
            //     }
qorri_di's avatar
qorri_di committed
3028
            // }, 
qorri_di's avatar
qorri_di committed
3029 3030
            {
                name: `Current`,
3031
                options: {
3032 3033 3034 3035 3036 3037 3038 3039
                    customHeadRender: (columnMeta) => (
                        <th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
                            {/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
                                <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
                            </TableCell> */}
                            <div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
                            <div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
                                <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#07a7d0' }}>
qorri_di's avatar
qorri_di committed
3040
                                    <span>{"Total"}</span>
3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051
                                </div>
                            </div>
                        </th>
                    ),
                    setCellProps: () => ({ style2 }),
                    customBodyRender: (value, tableMeta, updateValue) => {
                        return (
                            <div style={{ textAlign: 'right' }}>
                                {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                    null
                                    :
qorri_di's avatar
qorri_di committed
3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067
                                    // tableMeta.rowData[0] === 7 ?
                                    //     (Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) >= Number(this.state.minValue) && Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1) <= Number(this.state.maxValue)) ?
                                    //         <NumberFormat
                                    //             thousandSeparator={true}
                                    //             style={{
                                    //                 fontSize: 12,
                                    //                 textAlign: 'right',
                                    //                 borderColor: 'transparent',
                                    //                 margin: 0,
                                    //                 width: 96,
                                    //                 backgroundColor: 'transparent',
                                    //                 color: 'black'
                                    //             }}
                                    //             type="text"
                                    //             placeholder=""
                                    //             disabled={true}
3068
                                    //             value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1) :  Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20))}
qorri_di's avatar
qorri_di committed
3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084
                                    //         /> :
                                    //         <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}
3085
                                    //                 value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1) :  Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20))}
qorri_di's avatar
qorri_di committed
3086 3087 3088
                                    //             />
                                    //         </LightTooltip>
                                    //     :
Riri Novita's avatar
Riri Novita committed
3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100
                                    <div style={{ flex: 1 }}>
                                        <FormControlLabel
                                            style={{ margin: 0 }}
                                            value={value}
                                            control={
                                                <NumberFormat
                                                    thousandSeparator={true}
                                                    style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                    type="text"
                                                    placeholder=""
                                                    disabled={true}
                                                    // value={Number(handleFYTotal(tableMeta)).toFixed(1)}
3101
                                                    // value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1) :  Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20))}
Riri Novita's avatar
Riri Novita committed
3102
                                                    value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)}
Riri Novita's avatar
Riri Novita committed
3103 3104 3105 3106
                                                />
                                            }
                                        />
                                    </div>}
3107 3108 3109 3110
                            </div>
                        )
                    }
                }
qorri_di's avatar
qorri_di committed
3111 3112
            },
            {
d.arizona's avatar
d.arizona committed
3113
                name: `${Number(this.props.periode) + 1}`,
d.arizona's avatar
d.arizona committed
3114 3115
                options: {
                    customHeadRender: (columnMeta) => (
d.arizona's avatar
d.arizona committed
3116
                        <th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
d.arizona's avatar
d.arizona committed
3117 3118 3119 3120
                            {/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
                                <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
                            </TableCell> */}
                            <div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
d.arizona's avatar
d.arizona committed
3121 3122 3123
                            <div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
                                <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#07a7d0' }}>
                                    <span>{"ForeCast"}</span>
d.arizona's avatar
d.arizona committed
3124 3125 3126 3127 3128
                                </div>
                            </div>
                        </th>
                    ),
                    setCellProps: () => ({ style2 }),
d.arizona's avatar
d.arizona committed
3129
                    customBodyRender: (value, tableMeta, updateValue) => {
d.arizona's avatar
d.arizona committed
3130
                        return (
d.arizona's avatar
d.arizona committed
3131 3132 3133 3134
                            <div style={{ textAlign: 'right' }}>
                                {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                    null
                                    :
d.arizona's avatar
d.arizona committed
3135
                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
3136
                                        (fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1) <= Number(this.state.maxValue)) ?
Deni Rinaldi's avatar
Deni Rinaldi committed
3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150
                                            <NumberFormat
                                                thousandSeparator={true}
                                                style={{
                                                    fontSize: 12,
                                                    textAlign: 'right',
                                                    borderColor: 'transparent',
                                                    margin: 0,
                                                    width: 96,
                                                    backgroundColor: 'transparent',
                                                    color: 'black'
                                                }}
                                                type="text"
                                                placeholder=""
                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
3151
                                                value={fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1) == 0 ? "0.0" : fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1)}
Deni Rinaldi's avatar
Deni Rinaldi committed
3152
                                            /> :
Deni Rinaldi's avatar
Deni Rinaldi committed
3153
                                            <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
d.arizona's avatar
d.arizona committed
3154 3155
                                                <NumberFormat
                                                    thousandSeparator={true}
Deni Rinaldi's avatar
Deni Rinaldi committed
3156 3157 3158 3159 3160 3161 3162 3163 3164
                                                    style={{
                                                        fontSize: 12,
                                                        textAlign: 'right',
                                                        borderColor: 'transparent',
                                                        margin: 0,
                                                        width: 96,
                                                        backgroundColor: 'transparent',
                                                        color: 'red'
                                                    }}
d.arizona's avatar
d.arizona committed
3165 3166 3167
                                                    type="text"
                                                    placeholder=""
                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
3168
                                                    value={fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1) == 0 ? "0.0" : fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1)}
d.arizona's avatar
d.arizona committed
3169
                                                />
Deni Rinaldi's avatar
Deni Rinaldi committed
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182
                                            </LightTooltip>
                                        :
                                        <div style={{ flex: 1 }}>
                                            <FormControlLabel
                                                style={{ margin: 0 }}
                                                value={value}
                                                control={
                                                    <NumberFormat
                                                        thousandSeparator={true}
                                                        style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                        type="text"
                                                        placeholder=""
                                                        disabled={true}
Riri Novita's avatar
Riri Novita committed
3183
                                                        value={fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1) == 0 ? "0.0" : fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)), 1)}
Deni Rinaldi's avatar
Deni Rinaldi committed
3184 3185 3186 3187
                                                    />
                                                }
                                            />
                                        </div>}
d.arizona's avatar
d.arizona committed
3188 3189 3190 3191
                            </div>
                        )
                    }
                }
d.arizona's avatar
d.arizona committed
3192
            }, {
d.arizona's avatar
d.arizona committed
3193
                name: `${Number(this.props.periode) + 2}`,
d.arizona's avatar
d.arizona committed
3194 3195
                options: {
                    customHeadRender: (columnMeta) => (
d.arizona's avatar
d.arizona committed
3196
                        <th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
d.arizona's avatar
d.arizona committed
3197 3198 3199 3200
                            {/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
                                <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
                            </TableCell> */}
                            <div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
d.arizona's avatar
d.arizona committed
3201 3202 3203 3204
                            <div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
                                <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#07a7d0' }}>
                                    <span>{"ForeCast"}</span>
                                </div>
d.arizona's avatar
d.arizona committed
3205
                            </div>
d.arizona's avatar
d.arizona committed
3206
                        </th>
d.arizona's avatar
d.arizona committed
3207 3208
                    ),
                    setCellProps: () => ({ style2 }),
d.arizona's avatar
d.arizona committed
3209
                    customBodyRender: (value, tableMeta, updateValue) => {
d.arizona's avatar
d.arizona committed
3210
                        return (
d.arizona's avatar
d.arizona committed
3211 3212 3213 3214
                            <div style={{ textAlign: 'right' }}>
                                {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
                                    null
                                    :
d.arizona's avatar
d.arizona committed
3215
                                    tableMeta.rowData[0] === 7 ?
Riri Novita's avatar
Riri Novita committed
3216
                                        (fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)), 1) >= Number(this.state.minValue) && fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)), 1) <= Number(this.state.maxValue)) ?
Deni Rinaldi's avatar
Deni Rinaldi committed
3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230
                                            <NumberFormat
                                                thousandSeparator={true}
                                                style={{
                                                    fontSize: 12,
                                                    textAlign: 'right',
                                                    borderColor: 'transparent',
                                                    margin: 0,
                                                    width: 96,
                                                    backgroundColor: 'transparent',
                                                    color: 'black'
                                                }}
                                                type="text"
                                                placeholder=""
                                                disabled={true}
Riri Novita's avatar
Riri Novita committed
3231
                                                value={fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)), 1)}
Deni Rinaldi's avatar
Deni Rinaldi committed
3232
                                            /> :
Deni Rinaldi's avatar
Deni Rinaldi committed
3233
                                            <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
d.arizona's avatar
d.arizona committed
3234 3235
                                                <NumberFormat
                                                    thousandSeparator={true}
Deni Rinaldi's avatar
Deni Rinaldi committed
3236 3237 3238 3239 3240 3241 3242 3243 3244
                                                    style={{
                                                        fontSize: 12,
                                                        textAlign: 'right',
                                                        borderColor: 'transparent',
                                                        margin: 0,
                                                        width: 96,
                                                        backgroundColor: 'transparent',
                                                        color: 'red'
                                                    }}
d.arizona's avatar
d.arizona committed
3245 3246 3247
                                                    type="text"
                                                    placeholder=""
                                                    disabled={true}
Riri Novita's avatar
Riri Novita committed
3248
                                                    value={fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)), 1)}
d.arizona's avatar
d.arizona committed
3249
                                                />
Deni Rinaldi's avatar
Deni Rinaldi committed
3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262
                                            </LightTooltip>
                                        :
                                        <div style={{ flex: 1 }}>
                                            <FormControlLabel
                                                style={{ margin: 0 }}
                                                value={value}
                                                control={
                                                    <NumberFormat
                                                        thousandSeparator={true}
                                                        style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
                                                        type="text"
                                                        placeholder=""
                                                        disabled={true}
Riri Novita's avatar
Riri Novita committed
3263
                                                        value={fixNumber(Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`, 21)), 1)}
Deni Rinaldi's avatar
Deni Rinaldi committed
3264 3265 3266 3267
                                                    />
                                                }
                                            />
                                        </div>}
d.arizona's avatar
d.arizona committed
3268 3269 3270 3271
                            </div>
                        )
                    }
                }
d.arizona's avatar
d.arizona committed
3272 3273 3274 3275 3276
            }, {
                name: "",
                options: {
                    display: false
                }
d.arizona's avatar
d.arizona committed
3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287
            }, {
                name: "",
                options: {
                    display: false
                }
            }, {
                name: "",
                options: {
                    display: false
                }
            },
d.arizona's avatar
d.arizona committed
3288
        ]
d.arizona's avatar
d.arizona committed
3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300

        const loadingComponent = (
            <div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
                <PropagateLoader
                    // css={override}
                    size={20}
                    color={"#274B80"}
                    loading={this.state.loading}
                />
            </div>
        );

Deni Rinaldi's avatar
Deni Rinaldi committed
3301 3302 3303 3304 3305
        return (
            <div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}>
                <div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
                    <Typography style={{ fontSize: '16px', color: 'white' }}>Pengajuan Budget Tahunan</Typography>
                </div>
3306 3307 3308 3309 3310
                <Snackbar open={this.state.alert} autoHideDuration={3000} onClose={() => this.closeAlert()}>
                    <Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}>
                        {this.state.messageAlert}
                    </Alert>
                </Snackbar>
Deni Rinaldi's avatar
Deni Rinaldi committed
3311 3312 3313 3314 3315 3316
                <div style={{ flex: 1, padding: 20, width: '100%' }}>
                    <Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
                        <div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
                            <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Budget Tahunan - Cash Flow</Typography>
                        </div>
                        <div style={{ padding: 20 }}>
Deni Rinaldi's avatar
Deni Rinaldi committed
3317 3318 3319 3320
                            <div style={{ display: 'flex', justifyContent: 'space-between' }}>
                                <div>
                                    <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>
Riri Novita's avatar
Riri Novita committed
3321 3322 3323 3324 3325
                                    {this.props.defaultCurrency.id === 1 ?
                                        <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
                                        :
                                        <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
                                    }
Deni Rinaldi's avatar
Deni Rinaldi committed
3326
                                </div>
qorri_di's avatar
qorri_di committed
3327
                                {/* <div style={{ width: '50%' }}>
Deni Rinaldi's avatar
Deni Rinaldi committed
3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347
                                    <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
                                        <a data-tip={'Download'} data-for="download">
                                            <button
                                                style={{
                                                    backgroundColor: 'transparent',
                                                    cursor: 'pointer',
                                                    borderColor: 'transparent',
                                                    margin: 5
                                                }}
                                                onClick={() => this.setState({ loading: true }, () => {
                                                    this.downloadAllData()
                                                    // setTimeout(() => {
                                                    //     this.setState({loading: false})
                                                    // }, 500);
                                                })}
                                            >
                                                <img src={Images.download} />
                                            </button>
                                        </a>
                                        <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
Deni Rinaldi's avatar
Deni Rinaldi committed
3348
                                    </div>
qorri_di's avatar
qorri_di committed
3349
                                </div> */}
Deni Rinaldi's avatar
Deni Rinaldi committed
3350
                            </div>
Deni Rinaldi's avatar
Deni Rinaldi committed
3351

Deni Rinaldi's avatar
Deni Rinaldi committed
3352
                            <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
d.arizona's avatar
d.arizona committed
3353 3354
                                {loading || (this.state.loading && loadingComponent)}
                                {!loading && <MuiThemeProvider theme={getMuiTheme()}>
Deni Rinaldi's avatar
Deni Rinaldi committed
3355 3356 3357 3358 3359
                                    <MUIDataTable
                                        data={dataTable2}
                                        columns={columns}
                                        options={options}
                                    />
d.arizona's avatar
d.arizona committed
3360
                                </MuiThemeProvider>}
Deni Rinaldi's avatar
Deni Rinaldi committed
3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378
                            </div>
                            <div className="grid grid-2x" style={{ marginTop: 20 }}>
                                <div className="col-1">
                                    <button
                                        type="button"
                                        onClick={() => this.setState({ loading: true }, () => {
                                            setTimeout(() => {
                                                this.props.onClickClose()
                                            }, 100);
                                        })}
                                        style={{
                                            backgroundColor: 'transparent',
                                            cursor: 'pointer',
                                            borderColor: 'transparent',
                                            outline: 'none'
                                        }}
                                    >
                                        <div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
d.arizona's avatar
d.arizona committed
3379
                                            <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
Deni Rinaldi's avatar
Deni Rinaldi committed
3380 3381
                                        </div>
                                    </button>
d.arizona's avatar
d.arizona committed
3382
                                </div>
Riri Novita's avatar
Riri Novita committed
3383 3384 3385
                                <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
                                    {this.props.isApprover === true || dataTable2.length == 0 ? null :
                                        (!this.props.truelyApprover) && (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ?
d.arizona's avatar
d.arizona committed
3386 3387 3388 3389 3390 3391 3392
                                            <button
                                                type="button"
                                                // disabled={this.state.buttonError}
                                                onClick={() =>
                                                    // this.state.buttonError ?
                                                    //     this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
                                                    //     :
3393 3394
                                                    this.state.handleDoubleClick == 1 ? null :
                                                        this.setState({ handleDoubleClick: 1 }, () => {
d.arizona's avatar
d.arizona committed
3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407
                                                            this.olahDataCashFlow(dataTable2)
                                                        })}
                                                style={{
                                                    backgroundColor: 'transparent',
                                                    cursor: this.state.buttonError === true ? 'default' : 'pointer',
                                                    borderColor: 'transparent',
                                                    outline: 'none',
                                                }}
                                            >
                                                <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
                                                    <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
                                                </div>
                                            </button>
Riri Novita's avatar
Riri Novita committed
3408 3409
                                            : null}
                                </div>
Deni Rinaldi's avatar
Deni Rinaldi committed
3410
                            </div>
Deni Rinaldi's avatar
Deni Rinaldi committed
3411
                        </div>
Deni Rinaldi's avatar
Deni Rinaldi committed
3412 3413 3414 3415 3416 3417
                    </Paper>
                </div>
            </div>
        )
    }
}