Commit 309ed182 authored by d.arizona's avatar d.arizona

update

parent badb54ab
......@@ -246,7 +246,8 @@ const create = (type = "") => {
const getReportOIMR = (body) => api.post('/transaction/db_operating_indicator/monthly_report/get_report_hierarki', body)
const getReportCFSumaMB = (body) => api.post('/transaction/summary_cash_flow/master_budget/get_report_hierarki', body)
const getReportCFSumaMR = (body) => api.post('/transaction/summary_cash_flow/monthly_report/get_report_hierarki', body)
const getReportCFSuma = (body) => api.post('/transaction/summary_cash_flow/summary/get_report_hierarki', body)
//CASH FLOW
const getDetailReportCF = (body) => api.post('/transaction/cash_flow/master_budget/get_report_hierarki', body)
const createReportCF = (body) => api.post('transaction/cash_flow/master_budget/create_submission_report', body)
......@@ -600,7 +601,8 @@ const create = (type = "") => {
getReportOIMR,
getReportCFSumaMB,
getReportCFSumaMR,
createReportCF
createReportCF,
getReportCFSuma
}
}
......
......@@ -289,7 +289,7 @@ export default class BudgetTahunan extends Component {
item.number,
item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name,
item.revision,
this.state.lastStatus === 'APPROVED' ? 'CLOSED' : this.state.isSubmit === false ? "CLOSED" : item.status_approv,
this.state.lastStatus === 'APPROVED' ? 'CLOSED' : this.state.isSubmit === false ? "CLOSED" : status_approv,
item.report_id,
Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload,
item.revision
......@@ -1046,15 +1046,15 @@ export default class BudgetTahunan extends Component {
// console.log(listCF)
this.setState({dbCF: listCF} , () => {
// if (this.state.company.company_id == '13467') {
// this.createCashFlow()
// }
if (type != undefined) {
if (type == 'BS' || type == 'FAM' || type == 'PL') {
console.log('tarik sis')
this.createCashFlow()
}
if (this.state.submissionID != null) {
this.createCashFlow()
}
// if (type != undefined) {
// if (type == 'BS' || type == 'FAM' || type == 'PL') {
// console.log('tarik sis')
// this.createCashFlow()
// }
// }
})
}
......
......@@ -9,6 +9,7 @@ import { PropagateLoader } from 'react-spinners'
import ReactTooltip from 'react-tooltip'
import Images from '../../assets/Images'
import MuiAlert from '@material-ui/lab/Alert';
import * as R from 'ramda'
const Alert = withStyles({
})((props) => <MuiAlert elevation={6} variant="filled" {...props} />);
......@@ -888,44 +889,49 @@ export default class SubHolding extends Component {
}
})
} else if (this.state.report.value === 6) {
api.create().getReportCFSumaMB(payload).then(response => {
// console.log(payload);
console.log(response);
let dataTable = []
let dbSumaCF = []
api.create().getReportCFSuma(payload).then(response => {
if (response.data) {
if (response.data.status === 'success') {
let res = response.data.data
console.log(res)
const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
let indexIDzz = dbSumaCF.findIndex((val) => val[1] === item.id)
if (indexIDzz === -1) {
dataTable.push([
item.type_report_id,
let mtd_actual = item.cash_flow.mtd_actual == ''? 0 : item.cash_flow.mtd_actual
let mtd = item.cash_flow.mtd == ''? 0 : item.cash_flow.mtd
let persenMtd = Number(mtd_actual/mtd)
let ytd_actual = item.cash_flow.ytd_actual == ''? 0 : item.cash_flow.ytd_actual
let ytd = item.cash_flow.ytd == ''? 0 : item.cash_flow.ytd
let persenYtd = Number(ytd_actual/ytd)
let quarter_actual = item.cash_flow.quarter_actual == ''? 0 : item.cash_flow.quarter_actual
let quarter = item.cash_flow.quarter == ''? 0 : item.cash_flow.quarter
let persenQuarter = Number(quarter_actual/quarter)
let fy_actual = item.cash_flow.fy_actual == ''? 0 : item.cash_flow.fy_actual
let fy = item.cash_flow.fy == ''? 0 : item.cash_flow.fy
let persenFy = Number(fy_actual/fy)
dbSumaCF.push([
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
item.cash_flow.mtd_actual,
item.cash_flow.mtd,
isNaN(persenMtd)? 0 : persenMtd * 100,
item.cash_flow.mtd_last_year,
item.cash_flow.ytd_actual,
item.cash_flow.ytd,
isNaN(persenYtd)? 0 : persenYtd * 100,
item.cash_flow.ytd_last_year,
item.cash_flow.quarter_actual,
item.cash_flow.quarter,
isNaN(persenQuarter)? 0 : persenQuarter * 100,
item.cash_flow.quarter_last_year,
item.cash_flow.fy_actual,
item.cash_flow.fy,
isNaN(persenFy)? 0 : persenFy * 100,
item.cash_flow.fy_last_year,
])
}
if (item.children !== null) {
......@@ -936,34 +942,41 @@ export default class SubHolding extends Component {
}
}
}
res.map((item, index) => {
dataTable.push([
item.type_report_id,
res.map((item,index) => {
let mtd_actual = item.cash_flow.mtd_actual == ''? 0 : item.cash_flow.mtd_actual
let mtd = item.cash_flow.mtd == ''? 0 : item.cash_flow.mtd
let persenMtd = Number(mtd_actual/mtd)
console.log(persenMtd)
let ytd_actual = item.cash_flow.ytd_actual == ''? 0 : item.cash_flow.ytd_actual
let ytd = item.cash_flow.ytd == ''? 0 : item.cash_flow.ytd
let persenYtd = Number(ytd_actual/ytd)
let quarter_actual = item.cash_flow.quarter_actual == ''? 0 : item.cash_flow.quarter_actual
let quarter = item.cash_flow.quarter == ''? 0 : item.cash_flow.quarter
let persenQuarter = Number(quarter_actual/quarter)
let fy_actual = item.cash_flow.fy_actual == ''? 0 : item.cash_flow.fy_actual
let fy = item.cash_flow.fy == ''? 0 : item.cash_flow.fy
let persenFy = Number(fy_actual/fy)
dbSumaCF.push([
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
item.cash_flow.mtd_actual,
item.cash_flow.mtd,
isNaN(persenMtd)? 0 : persenMtd * 100,
item.cash_flow.mtd_last_year,
item.cash_flow.ytd_actual,
item.cash_flow.ytd,
isNaN(persenYtd)? 0 : persenYtd * 100,
item.cash_flow.ytd_last_year,
item.cash_flow.quarter_actual,
item.cash_flow.quarter,
isNaN(persenQuarter)? 0 : persenQuarter * 100,
item.cash_flow.quarter_last_year,
item.cash_flow.fy_actual,
item.cash_flow.fy,
isNaN(persenFy)? 0 : persenFy * 100,
item.cash_flow.fy_last_year,
])
if (item.children !== null) {
if (item.children.length > 0) {
......@@ -973,9 +986,111 @@ export default class SubHolding extends Component {
}
}
})
this.setState({ dataTable}, () => {
console.log(this.state.dataTable)
this.getCFSumaMR(payload)
console.log(dbSumaCF)
this.setState({dbSumaCF}, () => {
api.create().getReportCFSumaMB(payload).then(response => {
// console.log(payload);
console.log(response);
let dataTable = []
if (response.data) {
if (response.data.status === 'success') {
let res = response.data.data
console.log(res)
const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
if (indexIDzz === -1) {
dataTable.push([
item.type_report_id,
item.id,
item.parent,
item.formula,
item.level,
item.description,
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)
})
}
}
}
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,
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 }, () => {
console.log(this.state.dataTable)
this.getCFSumaMR(payload, dbSumaCF)
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
})
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -986,7 +1101,7 @@ export default class SubHolding extends Component {
}, 1000);
}
})
}
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
}
......@@ -1307,7 +1422,7 @@ export default class SubHolding extends Component {
}
getCFSumaMR(payload) {
getCFSumaMR(payload, dbSumaCF) {
// let payloadOI = {...payload, "periode": Number(this.state.periode.periode) - 1}
let payloadLast = {
"report_id": this.state.report.value,
......@@ -1331,18 +1446,18 @@ export default class SubHolding extends Component {
// console.log(indexIDzz)
if (indexIDzz != -1) {
dataTable2.push([...dataTable[indexIDzz],
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.january, formula: items.cash_flow.january_formula } : items.cash_flow.january,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.february, formula: items.cash_flow.february_formula } : items.cash_flow.february,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.march, formula: items.cash_flow.march_formula } : items.cash_flow.march,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.april, formula: items.cash_flow.april_formula } : items.cash_flow.april,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.may, formula: items.cash_flow.may_formula } : items.cash_flow.may,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.june, formula: items.cash_flow.june_formula } : items.cash_flow.june,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.july, formula: items.cash_flow.july_formula } : items.cash_flow.july,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.august, formula: items.cash_flow.august_formula } : items.cash_flow.august,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.september, formula: items.cash_flow.september_formula } : items.cash_flow.september,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.october, formula: items.cash_flow.october_formula } : items.cash_flow.october,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.november, formula: items.cash_flow.november_formula } : items.cash_flow.november,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.december, formula: items.cash_flow.december_formula } : items.cash_flow.december,
items.cash_flow.january,
items.cash_flow.february,
items.cash_flow.march,
items.cash_flow.april,
items.cash_flow.may,
items.cash_flow.june,
items.cash_flow.july,
items.cash_flow.august,
items.cash_flow.september,
items.cash_flow.october,
items.cash_flow.november,
items.cash_flow.december,
])
}
if (items.children !== null) {
......@@ -1355,18 +1470,18 @@ export default class SubHolding extends Component {
}
dataTable2.push([...dataTable[indexID],
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.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,
])
if (item.children !== null) {
......@@ -1382,7 +1497,7 @@ export default class SubHolding extends Component {
})
this.setState({ dataTable2 }, () => {
// console.log(this.state.dataTable2)
this.getCFSumaLastMR(payloadLast)
this.getCFSumaLastMR(payloadLast, dbSumaCF)
})
console.log(dataTable2)
// this.setState({ dataTable: dataTable2, previewTable: true, loading: false, previewDownload: false })
......@@ -1392,7 +1507,7 @@ export default class SubHolding extends Component {
})
}
getCFSumaLastMR(payload) {
getCFSumaLastMR(payload, dbSumaCF) {
api.create().getReportCFSumaMR(payload).then(response => {
console.log(payload);
console.log(response);
......@@ -1402,24 +1517,26 @@ export default class SubHolding extends Component {
let res = response.data.data
res.map((item,index) => {
let indexID = dataTable2.findIndex((val) => val[1] == item.id)
let indexIDSuma = dbSumaCF.findIndex((val) => val[0] == item.id)
if (indexID != -1) {
const handlePushChild = (items) => {
let indexIDzz = dataTable2.findIndex((val) => val[1] === items.id)
// console.log(indexIDzz)
if (indexIDzz != -1) {
dataTable3.push([...dataTable2[indexIDzz],
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.january, formula: items.cash_flow.january_formula } : items.cash_flow.january,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.february, formula: items.cash_flow.february_formula } : items.cash_flow.february,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.march, formula: items.cash_flow.march_formula } : items.cash_flow.march,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.april, formula: items.cash_flow.april_formula } : items.cash_flow.april,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.may, formula: items.cash_flow.may_formula } : items.cash_flow.may,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.june, formula: items.cash_flow.june_formula } : items.cash_flow.june,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.july, formula: items.cash_flow.july_formula } : items.cash_flow.july,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.august, formula: items.cash_flow.august_formula } : items.cash_flow.august,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.september, formula: items.cash_flow.september_formula } : items.cash_flow.september,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.october, formula: items.cash_flow.october_formula } : items.cash_flow.october,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.november, formula: items.cash_flow.november_formula } : items.cash_flow.november,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.cash_flow.december, formula: items.cash_flow.december_formula } : items.cash_flow.december,
items.cash_flow.january,
items.cash_flow.february,
items.cash_flow.march,
items.cash_flow.april,
items.cash_flow.may,
items.cash_flow.june,
items.cash_flow.july,
items.cash_flow.august,
items.cash_flow.september,
items.cash_flow.october,
items.cash_flow.november,
items.cash_flow.december,
...dbSumaCF[indexIDSuma]
])
}
if (items.children !== null) {
......@@ -1432,18 +1549,19 @@ export default class SubHolding extends Component {
}
dataTable3.push([...dataTable2[indexID],
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.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,
...dbSumaCF[indexIDSuma]
])
if (item.children !== null) {
......
......@@ -11210,7 +11210,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[51]).toFixed(1)}
/>
}
/>
......@@ -11233,7 +11233,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[52]).toFixed(1)}
/>
}
/>
......@@ -11256,7 +11256,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
suffix={'%'}
value={Number(tableMeta.rowData[53]).toFixed(1)}
/>
}
/>
......@@ -11279,7 +11280,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[54]).toFixed(1)}
/>
}
/>
......@@ -11342,7 +11343,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[55]).toFixed(1)}
/>
}
/>
......@@ -11365,7 +11366,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[56]).toFixed(1)}
/>
}
/>
......@@ -11388,7 +11389,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
suffix={'%'}
value={Number(tableMeta.rowData[57]).toFixed(1)}
/>
}
/>
......@@ -11411,7 +11413,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[58]).toFixed(1)}
/>
}
/>
......@@ -11474,7 +11476,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[59]).toFixed(1)}
/>
}
/>
......@@ -11497,7 +11499,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[60]).toFixed(1)}
/>
}
/>
......@@ -11520,7 +11522,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
suffix={'%'}
value={Number(tableMeta.rowData[61]).toFixed(1)}
/>
}
/>
......@@ -11543,7 +11546,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[62]).toFixed(1)}
/>
}
/>
......@@ -11606,7 +11609,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[63]).toFixed(1)}
/>
}
/>
......@@ -11629,7 +11632,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[64]).toFixed(1)}
/>
}
/>
......@@ -11652,7 +11655,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[65]).toFixed(1)}
suffix={'%'}
/>
}
/>
......@@ -11675,7 +11679,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(0).toFixed(1)}
value={Number(tableMeta.rowData[66]).toFixed(1)}
/>
}
/>
......@@ -11768,7 +11772,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[7], tableMeta, 7)).toFixed(1)}
value={Number(tableMeta.rowData[7]).toFixed(1)}
/>
}
/>
......@@ -11791,7 +11795,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[8], tableMeta, 8)).toFixed(1)}
value={Number(tableMeta.rowData[8]).toFixed(1)}
/>
}
/>
......@@ -11814,7 +11818,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[9], tableMeta, 9)).toFixed(1)}
value={Number(tableMeta.rowData[9]).toFixed(1)}
/>
}
/>
......@@ -11837,7 +11841,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[10], tableMeta, 10)).toFixed(1)}
value={Number(tableMeta.rowData[10]).toFixed(1)}
/>
}
/>
......@@ -11862,7 +11866,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[11], tableMeta, 11)).toFixed(1)}
value={Number(tableMeta.rowData[11]).toFixed(1)}
/>
}
/>
......@@ -11885,7 +11889,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[12], tableMeta, 12)).toFixed(1)}
value={Number(tableMeta.rowData[12]).toFixed(1)}
/>
}
/>
......@@ -11908,7 +11912,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[13], tableMeta, 13)).toFixed(1)}
value={Number(tableMeta.rowData[13]).toFixed(1)}
/>
}
/>
......@@ -11931,7 +11935,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[14], tableMeta, 14)).toFixed(1)}
value={Number(tableMeta.rowData[14]).toFixed(1)}
/>
}
/>
......@@ -11956,7 +11960,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
value={Number(tableMeta.rowData[15]).toFixed(1)}
/>
}
/>
......@@ -11979,7 +11983,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
value={Number(tableMeta.rowData[16]).toFixed(1)}
/>
}
/>
......@@ -12002,7 +12006,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
value={Number(tableMeta.rowData[17]).toFixed(1)}
/>
}
/>
......@@ -12025,7 +12029,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormulaCF(tableMeta.rowData[18], tableMeta, 18)).toFixed(1)}
value={Number(tableMeta.rowData[18]).toFixed(1)}
/>
}
/>
......@@ -12042,7 +12046,7 @@ export default class TableSubHolding extends Component {
name: `${Number(this.props.periode) + 1}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<th style={{ ...style2, backgroundColor: '#1c71b8', zIndex: 102, color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, paddingTop: 8 }}>{columnMeta.name}</div>
{/* <div className="" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky", paddingBottom: 20 }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
......@@ -12070,7 +12074,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(2021).toFixed(1)}
value={Number(tableMeta.rowData[20]).toFixed(1)}
/>
}
/>
......@@ -12084,7 +12088,7 @@ export default class TableSubHolding extends Component {
name: `${Number(this.props.periode) + 2}`,
options: {
customHeadRender: (columnMeta) => (
<th style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<th style={{ ...style2, backgroundColor: '#1c71b8', zIndex: 102, color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
<div style={{ textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, paddingTop: 8 }}>{columnMeta.name}</div>
{/* <div className="" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky", paddingBottom: 20 }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
......@@ -12112,7 +12116,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(2021).toFixed(1)}
value={Number(tableMeta.rowData[21]).toFixed(1)}
/>
}
/>
......@@ -12202,7 +12206,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(1).toFixed(1)}
value={Number(tableMeta.rowData[26]).toFixed(1)}
/>
}
/>
......@@ -12225,7 +12229,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(2).toFixed(1)}
value={Number(tableMeta.rowData[27]).toFixed(1)}
/>
}
/>
......@@ -12248,7 +12252,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(3).toFixed(1)}
value={Number(tableMeta.rowData[28]).toFixed(1)}
/>
}
/>
......@@ -12271,7 +12275,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(4).toFixed(1)}
value={Number(tableMeta.rowData[29]).toFixed(1)}
/>
}
/>
......@@ -12296,7 +12300,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(5).toFixed(1)}
value={Number(tableMeta.rowData[30]).toFixed(1)}
/>
}
/>
......@@ -12319,7 +12323,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(6).toFixed(1)}
value={Number(tableMeta.rowData[31]).toFixed(1)}
/>
}
/>
......@@ -12342,7 +12346,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(7).toFixed(1)}
value={Number(tableMeta.rowData[32]).toFixed(1)}
/>
}
/>
......@@ -12365,7 +12369,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(8).toFixed(1)}
value={Number(tableMeta.rowData[33]).toFixed(1)}
/>
}
/>
......@@ -12390,7 +12394,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(9).toFixed(1)}
value={Number(tableMeta.rowData[34]).toFixed(1)}
/>
}
/>
......@@ -12413,7 +12417,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(10).toFixed(1)}
value={Number(tableMeta.rowData[35]).toFixed(1)}
/>
}
/>
......@@ -12436,7 +12440,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(11).toFixed(1)}
value={Number(tableMeta.rowData[36]).toFixed(1)}
/>
}
/>
......@@ -12459,7 +12463,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(12).toFixed(1)}
value={Number(tableMeta.rowData[37]).toFixed(1)}
/>
}
/>
......@@ -12552,7 +12556,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(1).toFixed(1)}
value={Number(tableMeta.rowData[38]).toFixed(1)}
/>
}
/>
......@@ -12575,7 +12579,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(2).toFixed(1)}
value={Number(tableMeta.rowData[39]).toFixed(1)}
/>
}
/>
......@@ -12598,7 +12602,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(3).toFixed(1)}
value={Number(tableMeta.rowData[40]).toFixed(1)}
/>
}
/>
......@@ -12621,7 +12625,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(4).toFixed(1)}
value={Number(tableMeta.rowData[41]).toFixed(1)}
/>
}
/>
......@@ -12646,7 +12650,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(5).toFixed(1)}
value={Number(tableMeta.rowData[42]).toFixed(1)}
/>
}
/>
......@@ -12669,7 +12673,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(6).toFixed(1)}
value={Number(tableMeta.rowData[43]).toFixed(1)}
/>
}
/>
......@@ -12692,7 +12696,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(7).toFixed(1)}
value={Number(tableMeta.rowData[44]).toFixed(1)}
/>
}
/>
......@@ -12715,7 +12719,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(8).toFixed(1)}
value={Number(tableMeta.rowData[45]).toFixed(1)}
/>
}
/>
......@@ -12740,7 +12744,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(9).toFixed(1)}
value={Number(tableMeta.rowData[46]).toFixed(1)}
/>
}
/>
......@@ -12763,7 +12767,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(10).toFixed(1)}
value={Number(tableMeta.rowData[47]).toFixed(1)}
/>
}
/>
......@@ -12786,7 +12790,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(11).toFixed(1)}
value={Number(tableMeta.rowData[48]).toFixed(1)}
/>
}
/>
......@@ -12809,7 +12813,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(12).toFixed(1)}
value={Number(tableMeta.rowData[49]).toFixed(1)}
/>
}
/>
......@@ -14514,6 +14518,241 @@ export default class TableSubHolding extends Component {
)
}
}
}, {
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
}
}, {
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
}
}, {
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
}
}, {
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
}
},
]
......@@ -228,7 +228,7 @@ export default class MonthlyReport extends Component {
item.number,
item.report_name == "CAT"? "Corporate Annual Target" : item.report_name,
item.revision,
this.state.isApprovedMB ? (this.state.lastStatus === 'APPROVED' ? 'CLOSED' : this.state.isSubmit === false ? "CLOSED" : item.status_approv) : "CLOSED",
this.state.isApprovedMB ? (this.state.lastStatus === 'APPROVED' ? 'CLOSED' : this.state.isSubmit === false ? "CLOSED" : status_approv) : "CLOSED",
item.report_id,
item.is_can_upload,
item.revision
......
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