Commit 7d5fa451 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'deni-dev(pc)' into 'master'

ceeeeeebbbbb

See merge request !465
parents 4d85feca 60a0f811
......@@ -230,6 +230,7 @@ const create = (type = "") => {
const getLastestUpdateOLPA = (body) => api.post('transaction/outlook_pa/get_latest_update', body)
const createReportOLPA = (body) => api.post('transaction/outlook_pa/create_outlook_report', body)
const checkUploadOLPA = (body) => api.post('transaction/outlook_pa/check_import', body)
const validateSubmitReportOLPA = (body) => api.post('transaction/outlook_pa/validate_save', body)
const uploadOLPA = (body) => api.post('transaction/outlook_pa/import_outlook_pa')
//Template
......@@ -399,7 +400,8 @@ const create = (type = "") => {
getLastestUpdateOLPA,
createReportOLPA,
checkUploadOLPA,
uploadOLPA
uploadOLPA,
validateSubmitReportOLPA
}
}
......
......@@ -113,6 +113,7 @@ export default class BalanceSheetOLPA extends Component {
item.balance_sheet.october,
item.balance_sheet.november,
item.balance_sheet.december,
item.balance_sheet.total_current_year,
item.order,
item.condition_it_should_be,
item.condition_if_wrong
......@@ -147,6 +148,7 @@ export default class BalanceSheetOLPA extends Component {
item.balance_sheet.october,
item.balance_sheet.november,
item.balance_sheet.december,
item.balance_sheet.total_current_year,
item.order,
item.condition_it_should_be,
item.condition_if_wrong
......@@ -183,6 +185,7 @@ export default class BalanceSheetOLPA extends Component {
october: String(Number(i[16]).toFixed(1)),
november: String(Number(i[17]).toFixed(1)),
december: String(Number(i[18]).toFixed(1)),
total_current_year: String(Number(i[19]).toFixed(1)),
})
})
let payload = {
......@@ -245,8 +248,6 @@ export default class BalanceSheetOLPA extends Component {
november: i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[13]).trim(),
december: i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim(),
total_current_year: i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[15]).trim(),
total_next_year: i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[16]).trim(),
total_more_year: i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim()
})
}
})
......@@ -290,6 +291,7 @@ export default class BalanceSheetOLPA extends Component {
item.october,
item.november,
item.december,
item.total_current_year,
item.orders,
item.condition_it_should_be,
item.condition_if_wrong,
......@@ -298,7 +300,7 @@ export default class BalanceSheetOLPA extends Component {
})
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => {
if (item[22].length > 0) {
if (item[23].length > 0) {
console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true })
}
......@@ -328,6 +330,7 @@ export default class BalanceSheetOLPA extends Component {
october: String(Number(i[16]).toFixed(1)),
november: String(Number(i[17]).toFixed(1)),
december: String(Number(i[18]).toFixed(1)),
total_current_year: String(Number(i[19]).toFixed(1)),
})
})
let body = {
......@@ -391,18 +394,19 @@ export default class BalanceSheetOLPA extends Component {
october: i[0] === 3 && i[16] === "" ? "0" : String(i[16]),
november: i[0] === 3 && i[17] === "" ? "0" : String(i[17]),
december: i[0] === 3 && i[18] === "" ? "0" : String(i[18]),
total_current_year: i[0] === 3 && i[19] === "" ? "0" : String(i[19]),
})
})
// console.log(JSON.stringify(data))
let payload = {
"submission_id": this.props.submissionID,
"outlook_pa_id": this.props.outlook_pa_id,
"company_id": this.props.company.company_id,
"periode": this.props.periode,
"report_id": this.props.report_id,
"balance_sheet": data,
"status": "submitted"
}
api.create().validateSubmitReport(payload).then((response) => {
api.create().validateSubmitReportOLPA(payload).then((response) => {
console.log(response)
if (response.data.data.result) {
this.setState({ loading: false, buttonError: false, editable: false })
......@@ -451,7 +455,7 @@ export default class BalanceSheetOLPA extends Component {
let arrayFormula = tableMeta.rowData[3].match(/[a-zA-Z]+|[0-9]+|[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]+(?:\.[0-9]+@|)/g)
let arrayJumlah = []
arrayFormula.map((item, indexs) => {
let index = dataTable2.findIndex((val) => val[19] == item)
let index = dataTable2.findIndex((val) => val[20] == item)
if (index > 0) {
arrayJumlah.push(dataTable2[index][tableMeta.columnIndex])
} else {
......@@ -496,7 +500,7 @@ export default class BalanceSheetOLPA extends Component {
let arrayFormula = tableMeta.rowData[3].match(/[a-zA-Z]+|[0-9]+|[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]+(?:\.[0-9]+@|)/g)
let arrayJumlah = []
arrayFormula.map((item, indexs) => {
let index = dataTable2.findIndex((val) => val[19] == item)
let index = dataTable2.findIndex((val) => val[20] == item)
if (index > 0) {
arrayJumlah.push(dataTable2[index][tableMeta.columnIndex])
} else {
......@@ -703,7 +707,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -719,8 +723,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -738,7 +742,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -846,7 +850,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -862,8 +866,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -881,7 +885,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -989,7 +993,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1005,8 +1009,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1024,7 +1028,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1132,7 +1136,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1148,8 +1152,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1167,7 +1171,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1275,7 +1279,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1291,8 +1295,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1310,7 +1314,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1418,7 +1422,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1434,8 +1438,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1453,7 +1457,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1561,7 +1565,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1577,8 +1581,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1596,7 +1600,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1704,7 +1708,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1720,8 +1724,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1739,7 +1743,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1847,7 +1851,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1863,8 +1867,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1882,7 +1886,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1990,7 +1994,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2006,8 +2010,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2025,7 +2029,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2133,7 +2137,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2149,8 +2153,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2168,7 +2172,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2276,7 +2280,150 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[20]).toFixed(1) ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<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(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} 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(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} 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(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
null
}
</div>
)
}
}
}, {
name: "Current Total",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
<Typography style={{ color: 'black', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 3 ?
<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={this.props.isApprover == true ? true : ((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') ? false : true)}
value={Number(value).toFixed(1)}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
console.log(dataTable2)
}}
/>
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
<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}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
tableMeta.rowData[0] === 4 ?
null
:
tableMeta.rowData[0] === 6 ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(value, tableMeta)).toFixed(1)}
/>
:
tableMeta.rowData[0] === 5 ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(value, tableMeta)).toFixed(1)}
/>
:
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
:
tableMeta.rowData[0] === 7 ?
Number(handleValidation(value, tableMeta)).toFixed(1) === Number(tableMeta.rowData[21]).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2292,8 +2439,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder=""
disabled={true}
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/> : tableMeta.rowData[21] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
/> : tableMeta.rowData[22] === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2311,7 +2458,7 @@ export default class BalanceSheetOLPA extends Component {
value={Number(handleValidation(value, tableMeta)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[20]}`} arrow>
<LightTooltip title={`Value Should be ${tableMeta.rowData[21]}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment