Commit 355c8ed7 authored by rifkaki's avatar rifkaki

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

parents f892076a 03ef600b
......@@ -265,7 +265,7 @@ const create = (type = "") => {
const getHierarkiMontlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportFAM = (body) => api.post('transaction/monthly_report/fam/get_report_hierarki', body)
const getHierarkiMontlyReportCF = (body) => api.post('transaction/monthly_report_cf/get_report_hierarki', body)
const getHierarkiMontlyReportCF = (body) => api.post('transaction/cash_flow/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportCAT = (body) => api.post('/transaction/monthly_report/cat/get_report_hierarki', body)
const getLastPeriodMonthly = (idCompany) => api.get(`transaction/monthly_report/get_last_periode/${idCompany}`)
const checkApproverMonthly = () => api.get('transaction/monthly_report/is_approver')
......
......@@ -175,7 +175,7 @@ export default class MonthlyReport extends Component {
let dataTable = response.data.data.map((item, index) => {
return [
item.number,
item.report_name,
item.report_name == "CAT"? "Corporate Annual Target" : item.report_name,
item.revision,
item.current_status,
item.report_id,
......@@ -595,7 +595,7 @@ export default class MonthlyReport extends Component {
visibleLOCF: false,
visibleOI: false,
})
} else if (item === 'CAT') {
} else if (item === 'Corporate Annual Target') {
this.setState({
visibleMonthlyReport: false,
visibleBS: false,
......@@ -879,7 +879,7 @@ export default class MonthlyReport extends Component {
{this.state.visibleMonthlyReport && (
<div>
<div className={"main-color"} style={{ height: 78, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
<Typography style={{ fontSize: '16px', color: 'white' }}>Monthly Report</Typography>
<Typography style={{ fontSize: '16px', color: 'white' }}>Monthly Report Submission</Typography>
</div>
<div style={{ padding: 20, width: '100%' }}>
<Paper style={{ paddingTop: 10 }}>
......@@ -964,7 +964,7 @@ export default class MonthlyReport extends Component {
}
})}
disableClearable
style={{ width: 250, marginRight: 20 }}
style={{ minWidth: 250, marginRight: 20 }}
renderInput={(params) => <TextField {...params} label="Month" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.month}
/>
......
......@@ -118,10 +118,10 @@ export default class CashFlowMR extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/monthly_report_cf/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/monthly_report/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/monthly_report_cf/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/monthly_report/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
)
res = await res.blob()
this.setState({ loading: false })
......@@ -374,7 +374,7 @@ export default class CashFlowMR extends Component {
}
}),
customBodyRender: (value, tableMeta, updateValue) => {
console.log(tableMeta);
// console.log(tableMeta);
return (
<div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ||tableMeta.rowData[0] === 7 ?
......
......@@ -127,9 +127,9 @@ export default class FixedAssetsMovementMR extends Component {
item.fixed_asset_movement.mtd_mb === "" ? "0.0" : item.fixed_asset_movement.mtd_mb,
item.fixed_asset_movement.mtd_rb === "" ? "0.0" : item.fixed_asset_movement.mtd_rb,
item.fixed_asset_movement.mtd_actual === "" ? "0.0" : item.fixed_asset_movement.mtd_actual,
item.fixed_asset_movement.act_previous_month === "" ? "0.0" : item.fixed_asset_movement.act_previous_month,
item.fixed_asset_movement.act_vs_prev_month_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_amount,
item.fixed_asset_movement.act_vs_prev_month_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_percent,
// item.fixed_asset_movement.act_previous_month === "" ? "0.0" : item.fixed_asset_movement.act_previous_month,
// item.fixed_asset_movement.act_vs_prev_month_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_amount,
// item.fixed_asset_movement.act_vs_prev_month_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_percent,
item.fixed_asset_movement.act_vs_mb_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_mb_amount,
item.fixed_asset_movement.act_vs_mb_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_mb_percent,
item.fixed_asset_movement.act_vs_rb_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_rb_amount,
......@@ -157,9 +157,9 @@ export default class FixedAssetsMovementMR extends Component {
item.fixed_asset_movement.mtd_mb === "" ? "0.0" : item.fixed_asset_movement.mtd_mb,
item.fixed_asset_movement.mtd_rb === "" ? "0.0" : item.fixed_asset_movement.mtd_rb,
item.fixed_asset_movement.mtd_actual === "" ? "0.0" : item.fixed_asset_movement.mtd_actual,
item.fixed_asset_movement.act_previous_month === "" ? "0.0" : item.fixed_asset_movement.act_previous_month,
item.fixed_asset_movement.act_vs_prev_month_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_amount,
item.fixed_asset_movement.act_vs_prev_month_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_percent,
// item.fixed_asset_movement.act_previous_month === "" ? "0.0" : item.fixed_asset_movement.act_previous_month,
// item.fixed_asset_movement.act_vs_prev_month_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_amount,
// item.fixed_asset_movement.act_vs_prev_month_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_percent,
item.fixed_asset_movement.act_vs_mb_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_mb_amount,
item.fixed_asset_movement.act_vs_mb_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_mb_percent,
item.fixed_asset_movement.act_vs_rb_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_rb_amount,
......@@ -277,9 +277,9 @@ export default class FixedAssetsMovementMR extends Component {
item.mtd_mb,
item.mtd_rb,
item.mtd_actual,
item.act_previous_month,
item.act_vs_prev_month_amount,
item.act_vs_prev_month_percent,
// item.act_previous_month,
// item.act_vs_prev_month_amount,
// item.act_vs_prev_month_percent,
item.act_vs_mb_amount,
item.act_vs_mb_percent,
item.act_vs_rb_amount,
......@@ -313,13 +313,13 @@ export default class FixedAssetsMovementMR extends Component {
mtd_mb: i[0] === 5 || i[0] === 6 ? String(Number(i[6]).toFixed(1)) : i[0] === 3 && i[6] === "" ? "0.0" : String(Number(i[6]).toFixed(1)),
mtd_rb: i[0] === 5 || i[0] === 6 ? String(Number(i[7]).toFixed(1)) : i[0] === 3 && i[7] === "" ? "0.0" : String(Number(i[7]).toFixed(1)),
mtd_actual: i[0] === 5 || i[0] === 6 ? String(Number(i[8]).toFixed(1)) : i[0] === 3 && i[8] === "" ? "0.0" : String(Number(i[8]).toFixed(1)),
act_previous_month: i[0] === 5 || i[0] === 6 ? String(Number(i[9]).toFixed(1)) : i[0] === 3 && i[9] === "" ? "0.0" : String(Number(i[9]).toFixed(1)),
act_vs_prev_month_amount: i[0] === 5 || i[0] === 6 ? String(Number(i[10]).toFixed(1)) : i[0] === 3 && i[10] === "" ? "0.0" : String(Number(i[10]).toFixed(1)),
act_vs_prev_month_percent: i[0] === 5 || i[0] === 6 ? String(Number(i[11]).toFixed(1)) : i[0] === 3 && i[11] === "" ? "0.0" : String(Number(i[11]).toFixed(1)),
act_vs_mb_amount: i[0] === 5 || i[0] === 6 ? String(Number(i[12]).toFixed(1)) : i[0] === 3 && i[12] === "" ? "0.0" : String(Number(i[12]).toFixed(1)),
act_vs_mb_percent: i[0] === 5 || i[0] === 6 ? String(Number(i[13]).toFixed(1)) : i[0] === 3 && i[13] === "" ? "0.0" : String(Number(i[13]).toFixed(1)),
act_vs_rb_amount: i[0] === 5 || i[0] === 6 ? String(Number(i[14]).toFixed(1)) : i[0] === 3 && i[14] === "" ? "0.0" : String(Number(i[14]).toFixed(1)),
act_vs_rb_percent: i[0] === 5 || i[0] === 6 ? String(Number(i[15]).toFixed(1)) : i[0] === 3 && i[15] === "" ? "0.0" : String(Number(i[15]).toFixed(1)),
// act_previous_month: i[0] === 5 || i[0] === 6 ? String(Number(i[9]).toFixed(1)) : i[0] === 3 && i[9] === "" ? "0.0" : String(Number(i[9]).toFixed(1)),
// act_vs_prev_month_amount: i[0] === 5 || i[0] === 6 ? String(Number(i[10]).toFixed(1)) : i[0] === 3 && i[10] === "" ? "0.0" : String(Number(i[10]).toFixed(1)),
// act_vs_prev_month_percent: i[0] === 5 || i[0] === 6 ? String(Number(i[11]).toFixed(1)) : i[0] === 3 && i[11] === "" ? "0.0" : String(Number(i[11]).toFixed(1)),
act_vs_mb_amount: i[0] === 5 || i[0] === 6 ? String(Number(i[9]).toFixed(1)) : i[0] === 3 && i[9] === "" ? "0.0" : String(Number(i[9]).toFixed(1)),
act_vs_mb_percent: i[0] === 5 || i[0] === 6 ? String(Number(i[10]).toFixed(1)) : i[0] === 3 && i[10] === "" ? "0.0" : String(Number(i[10]).toFixed(1)),
act_vs_rb_amount: i[0] === 5 || i[0] === 6 ? String(Number(i[11]).toFixed(1)) : i[0] === 3 && i[11] === "" ? "0.0" : String(Number(i[11]).toFixed(1)),
act_vs_rb_percent: i[0] === 5 || i[0] === 6 ? String(Number(i[12]).toFixed(1)) : i[0] === 3 && i[12] === "" ? "0.0" : String(Number(i[12]).toFixed(1)),
})
})
let body = {
......@@ -364,13 +364,13 @@ export default class FixedAssetsMovementMR extends Component {
"mtd_mb": i[6],
"mtd_rb": i[7],
"mtd_actual": i[8],
"act_previous_month": i[9],
"act_vs_prev_month_amount": String(i[10]) === 'NaN' || String(i[10]) === 'Infinity' || String(i[10]) === '-Infinity' ? '0.0' : String(i[10]) ,
"act_vs_prev_month_percent": String(i[11]) === 'NaN' || String(i[11]) === 'Infinity' || String(i[11]) === '-Infinity' ? '0.0' : String(i[11]),
"act_vs_mb_amount": String(i[12]) === 'NaN' || String(i[12]) === 'Infinity' || String(i[12]) === '-Infinity' ? '0.0' : String(i[12]),
"act_vs_mb_percent": String(i[13]) === 'NaN' || String(i[13]) === 'Infinity' || String(i[13]) === '-Infinity' ? '0.0' : String(i[13]),
"act_vs_rb_amount": String(i[14]) === 'NaN' || String(i[14]) === 'Infinity' || String(i[14]) === '-Infinity' ? '0.0' : String(i[14]),
"act_vs_rb_percent": String(i[15]) === 'NaN' || String(i[15]) === 'Infinity' || String(i[15]) === '-Infinity' ? '0.0' : String(i[15])
// "act_previous_month": i[9],
// "act_vs_prev_month_amount": String(i[10]) === 'NaN' || String(i[10]) === 'Infinity' || String(i[10]) === '-Infinity' ? '0.0' : String(i[10]) ,
// "act_vs_prev_month_percent": String(i[11]) === 'NaN' || String(i[11]) === 'Infinity' || String(i[11]) === '-Infinity' ? '0.0' : String(i[11]),
"act_vs_mb_amount": String(i[9]) === 'NaN' || String(i[9]) === 'Infinity' || String(i[9]) === '-Infinity' ? '0.0' : String(i[9]),
"act_vs_mb_percent": String(i[10]) === 'NaN' || String(i[10]) === 'Infinity' || String(i[10]) === '-Infinity' ? '0.0' : String(i[10]),
"act_vs_rb_amount": String(i[11]) === 'NaN' || String(i[11]) === 'Infinity' || String(i[11]) === '-Infinity' ? '0.0' : String(i[11]),
"act_vs_rb_percent": String(i[12]) === 'NaN' || String(i[12]) === 'Infinity' || String(i[12]) === '-Infinity' ? '0.0' : String(i[12])
})
})
let payload = {
......@@ -453,16 +453,16 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(dataTable2[tableMeta.rowIndex]);
// console.log(tableMeta);
console.log(tst);
let indexID = dataTable2[tableMeta.rowIndex][16].findIndex((val) => val.item_formula == tst)
let indexID = dataTable2[tableMeta.rowIndex][13].findIndex((val) => val.item_formula == tst)
// console.log(indexID);
if (indexID !== -1) {
let valuezz = dataTable2[tableMeta.rowIndex][16][indexID].value
let valuezz = dataTable2[tableMeta.rowIndex][13][indexID].value
anjay.push(valuezz == "" ? 0 : valuezz)
// console.log(valuezz);
}
} else {
let data = tableMeta.rowData[16] == null? [] : tableMeta.rowData[16]
let data = tableMeta.rowData[13] == null? [] : tableMeta.rowData[13]
let indexID = data.findIndex((val) => val.item_formula == String(`@${item}`))
if (indexID !== -1) {
let valuezz = data[indexID].value
......@@ -472,13 +472,13 @@ export default class FixedAssetsMovementMR extends Component {
} else {
if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[M-1]', '')
let indexID = dataTable2.findIndex((val) => val[17] == tst)
let indexID = dataTable2.findIndex((val) => val[14] == tst)
if (indexID !== -1) {
let valuezz = dataTable2[indexID][8]
anjay.push(valuezz == "" ? 0 : valuezz)
}
} else {
let indexID = dataTable2.findIndex((val) => val[17] == item)
let indexID = dataTable2.findIndex((val) => val[14] == item)
if (item == 'X-1') {
anjay.push(-1)
} else if (tambahan) {
......@@ -651,13 +651,13 @@ export default class FixedAssetsMovementMR extends Component {
const handleVariance = (tableMeta, dex, type) => {
let total = 0
if (dex === 1) {
total = Number(tableMeta.rowData[8]) - Number(tableMeta.rowData[9]) == NaN? "0.0" : Number(tableMeta.rowData[8]) - Number(tableMeta.rowData[9])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
// if (dex === 1) {
// total = Number(tableMeta.rowData[8]) - Number(tableMeta.rowData[9]) == NaN? "0.0" : Number(tableMeta.rowData[8]) - Number(tableMeta.rowData[9])
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
// console.log(tableMeta.rowData[8]);
// console.log(tableMeta.rowData[9]);
// console.log(total)
} else if (dex === 2) {
if (dex === 2) {
total = Number(tableMeta.rowData[8]) - Number(tableMeta.rowData[6]) == NaN? "0.0" : Number(tableMeta.rowData[8]) - Number(tableMeta.rowData[6])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
// console.log(tableMeta.rowData[8]);
......@@ -681,19 +681,19 @@ export default class FixedAssetsMovementMR extends Component {
// }
// value={Number(handleVariancePercent(tableMeta, 1, 3)).toFixed(1)}
// dataTable2[5][11]
if (dex === 1) {
total = R.equals((Number(dataTable2[tableMeta.rowIndex][10]) / Number(dataTable2[tableMeta.rowIndex][9])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][10]) / Number(dataTable2[tableMeta.rowIndex][9])), Infinity) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][10]) / Number(dataTable2[tableMeta.rowIndex][9])), -Infinity) ? "0" : Number(dataTable2[tableMeta.rowIndex][10]) / Number(dataTable2[tableMeta.rowIndex][9])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
// if (dex === 1) {
// total = R.equals((Number(dataTable2[tableMeta.rowIndex][10]) / Number(dataTable2[tableMeta.rowIndex][9])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][10]) / Number(dataTable2[tableMeta.rowIndex][9])), Infinity) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][10]) / Number(dataTable2[tableMeta.rowIndex][9])), -Infinity) ? "0" : Number(dataTable2[tableMeta.rowIndex][10]) / Number(dataTable2[tableMeta.rowIndex][9])
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
// if (tableMeta.rowData[5] === "Cash and cash equivalent") {
// console.log(total);
// console.log(Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][10]));
// console.log(dataTable2[tableMeta.rowIndex]);
// }
} else if (dex === 2) {
total = R.equals((Number(dataTable2[tableMeta.rowIndex][12]) / Number(dataTable2[tableMeta.rowIndex][6])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][12]) / Number(dataTable2[tableMeta.rowIndex][6])), Infinity) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][12]) / Number(dataTable2[tableMeta.rowIndex][6])), -Infinity) ? "0" : Number(dataTable2[tableMeta.rowIndex][12]) / Number(dataTable2[tableMeta.rowIndex][6])
if (dex === 2) {
total = R.equals((Number(dataTable2[tableMeta.rowIndex][9]) / Number(dataTable2[tableMeta.rowIndex][6])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][9]) / Number(dataTable2[tableMeta.rowIndex][6])), Infinity) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][9]) / Number(dataTable2[tableMeta.rowIndex][6])), -Infinity) ? "0" : Number(dataTable2[tableMeta.rowIndex][9]) / Number(dataTable2[tableMeta.rowIndex][6])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
} else if (dex === 3) {
total = R.equals((Number(dataTable2[tableMeta.rowIndex][14]) / Number(dataTable2[tableMeta.rowIndex][7])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][14]) / Number(dataTable2[tableMeta.rowIndex][7])), Infinity) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][14]) / Number(dataTable2[tableMeta.rowIndex][7])), -Infinity) ? "0" : Number(dataTable2[tableMeta.rowIndex][14]) / Number(dataTable2[tableMeta.rowIndex][7])
total = R.equals((Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][7])), NaN) ? '0' : R.equals((Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][7])), Infinity) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][7])), -Infinity) ? "0" : Number(dataTable2[tableMeta.rowIndex][11]) / Number(dataTable2[tableMeta.rowIndex][7])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
// console.log(total);
}
......@@ -921,90 +921,14 @@ export default class FixedAssetsMovementMR extends Component {
)
}
}
}, {
name: "Actual Previous Month",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right', width: 90 }}>
{
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ?
null :
this.state.get_for == 'view'?
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 90, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1)}
/>
}
/>
:
// tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
// <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(handleValueFormula(tableMeta, 9)).toFixed(1)}
// />
// </span> :
<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(tableMeta.rowData[9]).toFixed(1)}
/>
}
/>
</div>
}
</div>
)
}
}
}, {
name: `Variance`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ borderLeft: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, height: 45, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>{columnMeta.name}</div>
<div className="grid grid-3x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', border: '1px #fff solid', backgroundColor: '#37b5e6', borderBottom: '1px solid #37b5e6' }}>
<div style={{ borderBottom: '1px #fff solid', padding: 2.5, backgroundColor: '#37b5e6' }}>
<span>{"Act vs Previous Month"}</span>
</div>
<div className="grid grid-2x">
<div className="column-1" style={{ borderRight: '1px #fff solid', padding: 2.5, backgroundColor: '#37b5e6' }}>
<span>{"Amount"}</span>
</div>
<div className="column-2" style={{ padding: 2.5, backgroundColor: '#37b5e6' }}>
<span>{"%"}</span>
</div>
</div>
</div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', border: '1px #fff solid', backgroundColor: '#07a7d0', borderBottom: '1px solid #37b5e6' }}>
<div className="grid grid-2x" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', border: '1px #fff solid', backgroundColor: '#07a7d0', borderBottom: '1px solid #37b5e6' }}>
<div style={{ borderBottom: '1px #fff solid', padding: 2.5, backgroundColor: '#37b5e6' }}>
<span>{"Act vs MB"}</span>
</div>
......@@ -1017,7 +941,7 @@ export default class FixedAssetsMovementMR extends Component {
</div>
</div>
</div>
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', border: '1px #fff solid', backgroundColor: '#07a7d0', borderBottom: '1px solid #37b5e6' }}>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', border: '1px #fff solid', backgroundColor: '#07a7d0', borderBottom: '1px solid #37b5e6' }}>
<div style={{ borderBottom: '1px #fff solid', padding: 2.5, backgroundColor: '#37b5e6' }}>
<span>{"Act vs RB"}</span>
</div>
......@@ -1043,91 +967,8 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(tableMeta);
return (
<div>
<div className="grid grid-3x content-center">
<div className="column-1">
<div className="grid grid-2x content-center">
<div className="column-1">
<div style={{ textAlign: 'right', width: 120 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 ?
null :
this.state.get_for == 'view'?
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 90, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10]).toFixed(1)}
/>
}
/>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleVariance(tableMeta, 1, 2)).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
<div className="column-2">
<div style={{ textAlign: 'right', width: 120 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ?
null :
this.state.get_for == 'view'?
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 90, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(Number(tableMeta.rowData[11]) * 100).toFixed(1)}
/>
}
/>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
suffix={'%'}
disabled={true}
value={Number(handleVariancePercent(tableMeta, 1, 3)).toFixed(1)}
/>
}
/>
</div>
}
</div>
</div>
</div>
</div>
<div className="column-2">
<div className="grid grid-2x content-center">
<div className="column-1">
<div style={{ textAlign: 'right', width: 120 }}>
......@@ -1144,7 +985,7 @@ export default class FixedAssetsMovementMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(Number(tableMeta.rowData[12]) * 100).toFixed(1)}
value={Number(tableMeta.rowData[9]).toFixed(1)}
/>
}
/>
......@@ -1160,7 +1001,7 @@ export default class FixedAssetsMovementMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleVariance(tableMeta, 2, 4)).toFixed(1)}
value={Number(handleVariance(tableMeta, 2, 2)).toFixed(1)}
/>
}
/>
......@@ -1183,7 +1024,8 @@ export default class FixedAssetsMovementMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(Number(tableMeta.rowData[13]) * 100).toFixed(1)}
suffix={'%'}
value={Number(Number(tableMeta.rowData[10]) * 100).toFixed(1)}
/>
}
/>
......@@ -1210,7 +1052,7 @@ export default class FixedAssetsMovementMR extends Component {
</div>
</div>
</div>
<div className="column-3">
<div className="column-2">
<div className="grid grid-2x content-center">
<div className="column-1">
<div style={{ textAlign: 'right', width: 120 }}>
......@@ -1227,7 +1069,7 @@ export default class FixedAssetsMovementMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)}
value={Number(tableMeta.rowData[11]).toFixed(1)}
/>
}
/>
......@@ -1243,7 +1085,7 @@ export default class FixedAssetsMovementMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleVariance(tableMeta, 3, 6)).toFixed(1)}
value={Number(handleVariance(tableMeta, 3, 4)).toFixed(1)}
/>
}
/>
......@@ -1266,7 +1108,8 @@ export default class FixedAssetsMovementMR extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(1)}
suffix={'%'}
value={Number(Number(tableMeta.rowData[10]) * 100).toFixed(1)}
/>
}
/>
......@@ -1333,21 +1176,6 @@ export default class FixedAssetsMovementMR extends Component {
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}]
const loadingComponent = (
......
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