Commit d38c5bc1 authored by Riri Novita's avatar Riri Novita

banyak

parent acdf1e07
...@@ -223,17 +223,17 @@ const create = (type = "") => { ...@@ -223,17 +223,17 @@ const create = (type = "") => {
const getSubmitOI = (body) => api.post('transaction/operating_indicator/get_latest_periode_submit', body) const getSubmitOI = (body) => api.post('transaction/operating_indicator/get_latest_periode_submit', body)
const getLastPeriodOI = (idCompany) => api.get(`transaction/operating_indicator/get_last_periode/${idCompany}`) const getLastPeriodOI = (idCompany) => api.get(`transaction/operating_indicator/get_last_periode/${idCompany}`)
const getAllOperatingInd = (body) => api.post('transaction/operating_indicator/get_all_report', body) const getAllOperatingInd = (body) => api.post('transaction/operating_indicator/get_all_report', body)
const getOperatingIndDetail = (body) => api.post('transaction/operating_indicator/get_report_hierarki', body) const getOperatingIndDetail = (body) => api.post('transaction/operating_indicator/master_budget/get_report_hierarki', body)
const createOpetaingInd = (body) => api.post('transaction/operating_indicator/create_operating_indicator_report', body) const createOpetaingInd = (body) => api.post('transaction/operating_indicator/master_budget/create_submission_report', body)
const checkUploadOperatingInd = (body) => api.post('transaction/operating_indicator/check_import', body) const checkUploadOperatingInd = (body) => api.post('transaction/operating_indicator/master_budget/check_import', body)
const uploadOperatingInd = (body) => api.post('transaction/operating_indicator/import_operating_indicator', body) const uploadOperatingInd = (body) => api.post('transaction/operating_indicator/master_budget/import_master_budget', body)
const getLastestUpdateOI = (body) => api.post('transaction/operating_indicator/get_latest_update', body) const getLastestUpdateOI = (body) => api.post('transaction/operating_indicator/get_latest_update', body)
const getLastPeriodeOI = (idCompany) => api.post(`transaction/master_budget/get_last_periode/${idCompany}`) const getLastPeriodeOI = (idCompany) => api.post(`transaction/master_budget/get_last_periode/${idCompany}`)
const getReportHierarkiPL = (body) => api.post('transaction/db_report_detail/get_report_hierarki', body) const getReportHierarkiPL = (body) => api.post('transaction/db_profit_loss_detail/get_report_hierarki', body)
const getLastestUpdateMROI = (body) => api.post('transaction/monthly_report_oi/get_latest_update', body) const getLastestUpdateMROI = (body) => api.post('transaction/operating_indicator/monthly_report/get_latest_update', body)
//CASH FLOW //CASH FLOW
const getDetailReportCF = (body) => api.post('/transaction/cash_flow/get_report_hierarki', body) const getDetailReportCF = (body) => api.post('/transaction/cash_flow/master_budget/get_report_hierarki', body)
//OUTLOOK PA //OUTLOOK PA
const getOutlookPAID = (body) => api.post('transaction/outlook_pa/get_outlook_pa_id', body) const getOutlookPAID = (body) => api.post('transaction/outlook_pa/get_outlook_pa_id', body)
...@@ -258,11 +258,11 @@ const create = (type = "") => { ...@@ -258,11 +258,11 @@ const create = (type = "") => {
// Monthly // Monthly
const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body) const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body)
const getMonthlyOI = (body) => api.post('transaction/monthly_report_oi/get_operating_indicator_id', body) const getMonthlyOI = (body) => api.post('transaction/operating_indicator/monthly_report/get_operating_indicator_id', body)
const getMonthlyReportID = (body) => api.post('transaction/monthly_report/get_monthly_report_id', body) const getMonthlyReportID = (body) => api.post('transaction/monthly_report/get_monthly_report_id', body)
// const getHierarkiMontlyReportBS = (body) => api.post('transaction/monthly_report_bs/get_report_hierarki', body) // const getHierarkiMontlyReportBS = (body) => api.post('transaction/monthly_report_bs/get_report_hierarki', body)
const getHierarkiMontlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/get_report_hierarki', body) const getHierarkiMontlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportOI = (body) => api.post('transaction/monthly_report_oi/get_report_hierarki', body) const getHierarkiMontlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/get_report_hierarki', body)
const getLastestUpdateMR = (body) => api.post('/transaction/monthly_report/get_latest_update', body) const getLastestUpdateMR = (body) => api.post('/transaction/monthly_report/get_latest_update', body)
// const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body) // const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body)
const getHierarkiMontlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/get_report_hierarki', body) const getHierarkiMontlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/get_report_hierarki', body)
...@@ -283,21 +283,21 @@ const create = (type = "") => { ...@@ -283,21 +283,21 @@ const create = (type = "") => {
// const createMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/create_monthly_report', body) // const createMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/create_monthly_report', body)
const createMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/create_monthly_report', body) const createMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/create_monthly_report', body)
const createMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/create_monthly_report', body) const createMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/create_monthly_report', body)
const createMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/create_monthly_report', body) const createMonthlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/create_monthly_report', body)
const createMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/create_monthly_report', body) const createMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/create_monthly_report', body)
// const checkUploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/check_import', body) // const checkUploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/check_import', body)
const checkUploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/check_import', body) const checkUploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/check_import', body)
const checkUploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/check_import', body) const checkUploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/check_import', body)
// const checkUploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/check_import', body) // const checkUploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/check_import', body)
const checkUploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/check_import', body) const checkUploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/check_import', body)
const checkUploadMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/check_import', body) const checkUploadMonthlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/check_import', body)
const checkUploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/check_import', body) const checkUploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/check_import', body)
// const uploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/import_monthly_report', body) // const uploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/import_monthly_report', body)
const uploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/import_monthly_report', body) const uploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/import_monthly_report', body)
const uploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/import_monthly_report', body) const uploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/import_monthly_report', body)
// const uploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/import_monthly_report', body) // const uploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/import_monthly_report', body)
const uploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/import_monthly_report', body) const uploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/import_monthly_report', body)
const uploadMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/import_monthly_report', body) const uploadMonthlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/import_monthly_report', body)
const uploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/import_monthly_report', body) const uploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/import_monthly_report', body)
// const validateSubmitReportBS = (body) => api.post('transaction/monthly_report_bs/validate_save', body) // const validateSubmitReportBS = (body) => api.post('transaction/monthly_report_bs/validate_save', body)
const validateSubmitReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/validate_save', body) const validateSubmitReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/validate_save', body)
...@@ -307,7 +307,7 @@ const create = (type = "") => { ...@@ -307,7 +307,7 @@ const create = (type = "") => {
const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_per_bs', body) const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_per_bs', body)
const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/check_import', body) const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/check_import', body)
const uploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/import_monthly_report', body) const uploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/import_monthly_report', body)
const validateSubmitReportOI = (body) => api.post('transaction/monthly_report_oi/validate_save', body) const validateSubmitReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/validate_save', body)
// MonthlyPL // MonthlyPL
// const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body) // const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body)
......
...@@ -287,8 +287,8 @@ export default class CashFlow extends Component { ...@@ -287,8 +287,8 @@ export default class CashFlow extends Component {
async downloadAllData() { async downloadAllData() {
// let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` // let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url); // console.log(url);
let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/export_master_budget?submission_id=${this.props.submissionID}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}` let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}`
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/export_master_budget?submission_id=&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}` let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}`
let res = await fetch( let res = await fetch(
this.props.submissionID == null ? resNull : resReal this.props.submissionID == null ? resNull : resReal
) )
......
...@@ -791,6 +791,7 @@ export default class ProfitLoss extends Component { ...@@ -791,6 +791,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -830,6 +831,7 @@ export default class ProfitLoss extends Component { ...@@ -830,6 +831,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -846,6 +848,7 @@ export default class ProfitLoss extends Component { ...@@ -846,6 +848,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -864,6 +867,7 @@ export default class ProfitLoss extends Component { ...@@ -864,6 +867,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
}} }}
...@@ -880,6 +884,7 @@ export default class ProfitLoss extends Component { ...@@ -880,6 +884,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
decimalScale={1}
/> />
</span> </span>
: :
...@@ -894,6 +899,7 @@ export default class ProfitLoss extends Component { ...@@ -894,6 +899,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(value, tableMeta, 1)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/> />
// null // null
: :
...@@ -904,6 +910,7 @@ export default class ProfitLoss extends Component { ...@@ -904,6 +910,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 1)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 1)).toFixed(1)}
/> />
// null // null
...@@ -947,6 +954,7 @@ export default class ProfitLoss extends Component { ...@@ -947,6 +954,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -963,6 +971,7 @@ export default class ProfitLoss extends Component { ...@@ -963,6 +971,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -981,6 +990,7 @@ export default class ProfitLoss extends Component { ...@@ -981,6 +990,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -998,6 +1008,7 @@ export default class ProfitLoss extends Component { ...@@ -998,6 +1008,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -1012,6 +1023,7 @@ export default class ProfitLoss extends Component { ...@@ -1012,6 +1023,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 2)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 2)).toFixed(1)}
/> />
// null // null
...@@ -1023,6 +1035,7 @@ export default class ProfitLoss extends Component { ...@@ -1023,6 +1035,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 2)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 2)).toFixed(1)}
/> />
// null // null
...@@ -1075,6 +1088,7 @@ export default class ProfitLoss extends Component { ...@@ -1075,6 +1088,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1091,6 +1105,7 @@ export default class ProfitLoss extends Component { ...@@ -1091,6 +1105,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1110,6 +1125,7 @@ export default class ProfitLoss extends Component { ...@@ -1110,6 +1125,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1127,6 +1143,7 @@ export default class ProfitLoss extends Component { ...@@ -1127,6 +1143,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -1141,6 +1158,7 @@ export default class ProfitLoss extends Component { ...@@ -1141,6 +1158,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 3)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 3)).toFixed(1)}
/> />
// null // null
...@@ -1152,6 +1170,7 @@ export default class ProfitLoss extends Component { ...@@ -1152,6 +1170,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 3)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 3)).toFixed(1)}
/> />
// null // null
...@@ -1204,6 +1223,7 @@ export default class ProfitLoss extends Component { ...@@ -1204,6 +1223,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1220,6 +1240,7 @@ export default class ProfitLoss extends Component { ...@@ -1220,6 +1240,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1239,6 +1260,7 @@ export default class ProfitLoss extends Component { ...@@ -1239,6 +1260,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1256,6 +1278,7 @@ export default class ProfitLoss extends Component { ...@@ -1256,6 +1278,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -1270,6 +1293,7 @@ export default class ProfitLoss extends Component { ...@@ -1270,6 +1293,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 4)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 4)).toFixed(1)}
/> />
// null // null
...@@ -1281,6 +1305,7 @@ export default class ProfitLoss extends Component { ...@@ -1281,6 +1305,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 4)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 4)).toFixed(1)}
/> />
// null // null
...@@ -1333,6 +1358,7 @@ export default class ProfitLoss extends Component { ...@@ -1333,6 +1358,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1349,6 +1375,7 @@ export default class ProfitLoss extends Component { ...@@ -1349,6 +1375,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1368,6 +1395,7 @@ export default class ProfitLoss extends Component { ...@@ -1368,6 +1395,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1385,6 +1413,7 @@ export default class ProfitLoss extends Component { ...@@ -1385,6 +1413,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -1399,6 +1428,7 @@ export default class ProfitLoss extends Component { ...@@ -1399,6 +1428,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 5)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 5)).toFixed(1)}
/> />
// null // null
...@@ -1410,6 +1440,7 @@ export default class ProfitLoss extends Component { ...@@ -1410,6 +1440,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 5)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 5)).toFixed(1)}
/> />
// null // null
...@@ -1462,6 +1493,7 @@ export default class ProfitLoss extends Component { ...@@ -1462,6 +1493,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1478,6 +1510,7 @@ export default class ProfitLoss extends Component { ...@@ -1478,6 +1510,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1497,6 +1530,7 @@ export default class ProfitLoss extends Component { ...@@ -1497,6 +1530,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1514,6 +1548,7 @@ export default class ProfitLoss extends Component { ...@@ -1514,6 +1548,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -1528,6 +1563,7 @@ export default class ProfitLoss extends Component { ...@@ -1528,6 +1563,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 6)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 6)).toFixed(1)}
/> />
// null // null
...@@ -1539,6 +1575,7 @@ export default class ProfitLoss extends Component { ...@@ -1539,6 +1575,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 6)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 6)).toFixed(1)}
/> />
// null // null
...@@ -1591,6 +1628,7 @@ export default class ProfitLoss extends Component { ...@@ -1591,6 +1628,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1607,6 +1645,7 @@ export default class ProfitLoss extends Component { ...@@ -1607,6 +1645,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1626,6 +1665,7 @@ export default class ProfitLoss extends Component { ...@@ -1626,6 +1665,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1643,6 +1683,7 @@ export default class ProfitLoss extends Component { ...@@ -1643,6 +1683,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -1657,6 +1698,7 @@ export default class ProfitLoss extends Component { ...@@ -1657,6 +1698,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 7)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 7)).toFixed(1)}
/> />
// null // null
...@@ -1668,6 +1710,7 @@ export default class ProfitLoss extends Component { ...@@ -1668,6 +1710,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 7)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 7)).toFixed(1)}
/> />
// null // null
...@@ -1720,6 +1763,7 @@ export default class ProfitLoss extends Component { ...@@ -1720,6 +1763,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1736,6 +1780,7 @@ export default class ProfitLoss extends Component { ...@@ -1736,6 +1780,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1755,6 +1800,7 @@ export default class ProfitLoss extends Component { ...@@ -1755,6 +1800,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1772,6 +1818,7 @@ export default class ProfitLoss extends Component { ...@@ -1772,6 +1818,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -1786,6 +1833,7 @@ export default class ProfitLoss extends Component { ...@@ -1786,6 +1833,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 8)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 8)).toFixed(1)}
/> />
// null // null
...@@ -1797,6 +1845,7 @@ export default class ProfitLoss extends Component { ...@@ -1797,6 +1845,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 8)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 8)).toFixed(1)}
/> />
// null // null
...@@ -1849,6 +1898,7 @@ export default class ProfitLoss extends Component { ...@@ -1849,6 +1898,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1865,6 +1915,7 @@ export default class ProfitLoss extends Component { ...@@ -1865,6 +1915,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1884,6 +1935,7 @@ export default class ProfitLoss extends Component { ...@@ -1884,6 +1935,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -1901,6 +1953,7 @@ export default class ProfitLoss extends Component { ...@@ -1901,6 +1953,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -1915,6 +1968,7 @@ export default class ProfitLoss extends Component { ...@@ -1915,6 +1968,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 9)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 9)).toFixed(1)}
/> />
// null // null
...@@ -1926,6 +1980,7 @@ export default class ProfitLoss extends Component { ...@@ -1926,6 +1980,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 9)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 9)).toFixed(1)}
/> />
// null // null
...@@ -1978,6 +2033,7 @@ export default class ProfitLoss extends Component { ...@@ -1978,6 +2033,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -1994,6 +2050,7 @@ export default class ProfitLoss extends Component { ...@@ -1994,6 +2050,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2013,6 +2070,7 @@ export default class ProfitLoss extends Component { ...@@ -2013,6 +2070,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2030,6 +2088,7 @@ export default class ProfitLoss extends Component { ...@@ -2030,6 +2088,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -2044,6 +2103,7 @@ export default class ProfitLoss extends Component { ...@@ -2044,6 +2103,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 10)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 10)).toFixed(1)}
/> />
// null // null
...@@ -2055,6 +2115,7 @@ export default class ProfitLoss extends Component { ...@@ -2055,6 +2115,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 10)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 10)).toFixed(1)}
/> />
// null // null
...@@ -2107,6 +2168,7 @@ export default class ProfitLoss extends Component { ...@@ -2107,6 +2168,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2123,6 +2185,7 @@ export default class ProfitLoss extends Component { ...@@ -2123,6 +2185,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2142,6 +2205,7 @@ export default class ProfitLoss extends Component { ...@@ -2142,6 +2205,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2159,6 +2223,7 @@ export default class ProfitLoss extends Component { ...@@ -2159,6 +2223,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -2173,6 +2238,7 @@ export default class ProfitLoss extends Component { ...@@ -2173,6 +2238,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 11)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 11)).toFixed(1)}
/> />
// null // null
...@@ -2184,6 +2250,7 @@ export default class ProfitLoss extends Component { ...@@ -2184,6 +2250,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 11)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 11)).toFixed(1)}
/> />
// null // null
...@@ -2236,6 +2303,7 @@ export default class ProfitLoss extends Component { ...@@ -2236,6 +2303,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2252,6 +2320,7 @@ export default class ProfitLoss extends Component { ...@@ -2252,6 +2320,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2271,6 +2340,7 @@ export default class ProfitLoss extends Component { ...@@ -2271,6 +2340,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2288,6 +2358,7 @@ export default class ProfitLoss extends Component { ...@@ -2288,6 +2358,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -2302,6 +2373,7 @@ export default class ProfitLoss extends Component { ...@@ -2302,6 +2373,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 12)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 12)).toFixed(1)}
/> />
// null // null
...@@ -2313,6 +2385,7 @@ export default class ProfitLoss extends Component { ...@@ -2313,6 +2385,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 12)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 12)).toFixed(1)}
/> />
// null // null
...@@ -2365,6 +2438,7 @@ export default class ProfitLoss extends Component { ...@@ -2365,6 +2438,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2381,6 +2455,7 @@ export default class ProfitLoss extends Component { ...@@ -2381,6 +2455,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2396,6 +2471,7 @@ export default class ProfitLoss extends Component { ...@@ -2396,6 +2471,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> : </span> :
...@@ -2415,6 +2491,7 @@ export default class ProfitLoss extends Component { ...@@ -2415,6 +2491,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleTotal(tableMeta)).toFixed(1)} value={Number(handleTotal(tableMeta)).toFixed(1)}
/> />
</span>} </span>}
...@@ -2451,6 +2528,7 @@ export default class ProfitLoss extends Component { ...@@ -2451,6 +2528,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2467,6 +2545,7 @@ export default class ProfitLoss extends Component { ...@@ -2467,6 +2545,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2486,6 +2565,7 @@ export default class ProfitLoss extends Component { ...@@ -2486,6 +2565,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2503,6 +2583,7 @@ export default class ProfitLoss extends Component { ...@@ -2503,6 +2583,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -2517,6 +2598,7 @@ export default class ProfitLoss extends Component { ...@@ -2517,6 +2598,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 13)).toFixed(1)} ue={handleFormula(value, tableMeta)} value={Number(handleFormula(value, tableMeta, 13)).toFixed(1)} ue={handleFormula(value, tableMeta)}
/> />
// null // null
...@@ -2528,6 +2610,7 @@ export default class ProfitLoss extends Component { ...@@ -2528,6 +2610,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 13)).toFixed(1)} ue={handleFormula(value, tableMeta)} value={Number(handleFormula(value, tableMeta, 13)).toFixed(1)} ue={handleFormula(value, tableMeta)}
/> />
// null // null
...@@ -2580,6 +2663,7 @@ export default class ProfitLoss extends Component { ...@@ -2580,6 +2663,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2596,6 +2680,7 @@ export default class ProfitLoss extends Component { ...@@ -2596,6 +2680,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
/> />
} }
...@@ -2615,6 +2700,7 @@ export default class ProfitLoss extends Component { ...@@ -2615,6 +2700,7 @@ export default class ProfitLoss extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover ? 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)} disabled={this.props.isApprover ? 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)} value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
...@@ -2632,6 +2718,7 @@ export default class ProfitLoss extends Component { ...@@ -2632,6 +2718,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)} value={Number(handleValue(value, tableMeta)).toFixed(1)}
/> />
</span> </span>
...@@ -2646,6 +2733,7 @@ export default class ProfitLoss extends Component { ...@@ -2646,6 +2733,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 14)).toFixed(1)} ue={handleFormula(value, tableMeta)} value={Number(handleFormula(value, tableMeta, 14)).toFixed(1)} ue={handleFormula(value, tableMeta)}
/> />
// null // null
...@@ -2657,6 +2745,7 @@ export default class ProfitLoss extends Component { ...@@ -2657,6 +2745,7 @@ export default class ProfitLoss extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 14)).toFixed(1)} ue={handleFormula(value, tableMeta)} value={Number(handleFormula(value, tableMeta, 14)).toFixed(1)} ue={handleFormula(value, tableMeta)}
/> />
// null // null
......
...@@ -606,7 +606,7 @@ export default class SubHolding extends Component { ...@@ -606,7 +606,7 @@ export default class SubHolding extends Component {
async downloadAllData() { async downloadAllData() {
if (this.state.report.value === 1) { if (this.state.report.value === 1) {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -619,7 +619,7 @@ export default class SubHolding extends Component { ...@@ -619,7 +619,7 @@ export default class SubHolding extends Component {
} }
} else if (this.state.report.value === 2) { } else if (this.state.report.value === 2) {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -632,7 +632,7 @@ export default class SubHolding extends Component { ...@@ -632,7 +632,7 @@ export default class SubHolding extends Component {
} }
} else if (this.state.report.value === 3) { } else if (this.state.report.value === 3) {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report_detail/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_profit_loss_detail/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -644,10 +644,10 @@ export default class SubHolding extends Component { ...@@ -644,10 +644,10 @@ export default class SubHolding extends Component {
a.click(); a.click();
} }
} else if (this.state.report.value === 4) { } else if (this.state.report.value === 4) {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_ratio/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_ratio/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
console.log(url); console.log(url);
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_ratio/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_ratio/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
......
...@@ -166,8 +166,9 @@ export default class OperatingIndicatorMR extends Component { ...@@ -166,8 +166,9 @@ export default class OperatingIndicatorMR extends Component {
"periode": this.props.data.periode, "periode": this.props.data.periode,
"months": this.props.months "months": this.props.months
} }
console.log(payload);
api.create().getMonthlyOI(payload).then(response => { api.create().getMonthlyOI(payload).then(response => {
// console.log(response); console.log(response);
if (response) { if (response) {
if (response.data.data) { if (response.data.data) {
this.setState({ operatingIndIDMonthly: response.data.data.operating_indicator_id } , () => { this.setState({ operatingIndIDMonthly: response.data.data.operating_indicator_id } , () => {
...@@ -298,7 +299,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -298,7 +299,7 @@ export default class OperatingIndicatorMR extends Component {
downloadTemplate = async () => { downloadTemplate = async () => {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/monthly_report_oi/download_template?report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/monthly_report/download_template?report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}`
) )
res = await res.blob() res = await res.blob()
// // console.log(res) // // console.log(res)
...@@ -313,10 +314,10 @@ export default class OperatingIndicatorMR extends Component { ...@@ -313,10 +314,10 @@ export default class OperatingIndicatorMR extends Component {
async downloadAllData() { async downloadAllData() {
// console.log(this.props.months); // console.log(this.props.months);
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/monthly_report_oi/export_monthly_report?operating_indicator_id=${this.props.data.operatingIndID == null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}&&months=${this.props.months}` let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/monthly_report/export_monthly_report?operating_indicator_id=${this.props.data.operatingIndID == null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}&&months=${this.props.months}`
console.log(url); console.log(url);
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/monthly_report_oi/export_monthly_report?operating_indicator_id=${this.props.data.operatingIndID === null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}&&months=${this.props.months}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/monthly_report/export_monthly_report?operating_indicator_id=${this.props.data.operatingIndID === null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}&&months=${this.props.months}`
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -358,7 +359,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -358,7 +359,7 @@ export default class OperatingIndicatorMR extends Component {
} }
console.log(payload); console.log(payload);
// // console.log('=========================') // // console.log('=========================')
// // console.log(JSON.stringify(payload)) console.log(JSON.stringify(payload))
this.props.saveMonthlyOI(payload) this.props.saveMonthlyOI(payload)
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -393,6 +394,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -393,6 +394,7 @@ export default class OperatingIndicatorMR extends Component {
periode: this.props.data.periode, periode: this.props.data.periode,
report_id: this.props.data.report_id, report_id: this.props.data.report_id,
months: this.props.months, months: this.props.months,
status: 'submitted',
monthly_report: payload monthly_report: payload
} }
console.log(body) console.log(body)
...@@ -833,6 +835,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -833,6 +835,7 @@ export default class OperatingIndicatorMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
...@@ -844,6 +847,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -844,6 +847,7 @@ export default class OperatingIndicatorMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(tableMeta, 0)).toFixed(1)} value={Number(handleValue(tableMeta, 0)).toFixed(1)}
/> />
</span> : </span> :
...@@ -852,6 +856,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -852,6 +856,7 @@ export default class OperatingIndicatorMR extends Component {
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={tableMeta.rowData[7]} value={tableMeta.rowData[7]}
decimalScale={1}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -877,6 +882,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -877,6 +882,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -932,6 +938,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -932,6 +938,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1) } value={Number(tableMeta.rowData[8]).toFixed(1) }
decimalScale={1}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -943,6 +950,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -943,6 +950,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)} value={Number(handleValue(tableMeta, 0)).toFixed(1)}
decimalScale={1}
/> />
</span> </span>
: :
...@@ -959,6 +967,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -959,6 +967,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)} value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -976,6 +985,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -976,6 +985,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1)} value={Number(tableMeta.rowData[8]).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -995,6 +1005,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -995,6 +1005,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1) } value={Number(tableMeta.rowData[9]).toFixed(1) }
decimalScale={1}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1006,6 +1017,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1006,6 +1017,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta, 1)).toFixed(1)} value={Number(handleValue(tableMeta, 1)).toFixed(1)}
decimalScale={1}
/> />
</span> </span>
: :
...@@ -1022,6 +1034,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1022,6 +1034,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)} value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1039,6 +1052,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1039,6 +1052,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={ Number(tableMeta.rowData[9]).toFixed(1)} value={ Number(tableMeta.rowData[9]).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1059,6 +1073,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1059,6 +1073,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[10]).toFixed(1) } value={Number(tableMeta.rowData[10]).toFixed(1) }
decimalScale={1}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1070,6 +1085,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1070,6 +1085,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta, 2)).toFixed(1)} value={Number(handleValue(tableMeta, 2)).toFixed(1)}
decimalScale={1}
/> />
</span> </span>
: :
...@@ -1084,8 +1100,11 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1084,8 +1100,11 @@ export default class OperatingIndicatorMR extends Component {
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
decimalScale={1}
fixedDecimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit || this.state.get_for == 'view'} disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit || this.state.get_for == 'view'}
value={Number(tableMeta.rowData[10]).toFixed(1)} value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
}} }}
...@@ -1106,7 +1125,9 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1106,7 +1125,9 @@ export default class OperatingIndicatorMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)} value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1123,6 +1144,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1123,6 +1144,7 @@ export default class OperatingIndicatorMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
value={Number(tableMeta.rowData[10]).toFixed(1)} value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1209,6 +1231,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1209,6 +1231,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[11]).toFixed(1)} value={Number(tableMeta.rowData[11]).toFixed(1)}
decimalScale={1}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1223,6 +1246,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1223,6 +1246,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleVariance(tableMeta, 1, 0)).toFixed(1)} value={Number(handleVariance(tableMeta, 1, 0)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1244,6 +1268,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1244,6 +1268,7 @@ export default class OperatingIndicatorMR extends Component {
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)} value={Number(tableMeta.rowData[12]).toFixed(1)}
decimalScale={1}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1259,6 +1284,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1259,6 +1284,7 @@ export default class OperatingIndicatorMR extends Component {
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={Number(handleVariancePercent(tableMeta, 1, 1)).toFixed(1)} value={Number(handleVariancePercent(tableMeta, 1, 1)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1283,6 +1309,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1283,6 +1309,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(1)} value={Number(tableMeta.rowData[13]).toFixed(1)}
decimalScale={1}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1297,6 +1324,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1297,6 +1324,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleVariance(tableMeta, 2, 2)).toFixed(1)} value={Number(handleVariance(tableMeta, 2, 2)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1318,6 +1346,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1318,6 +1346,7 @@ export default class OperatingIndicatorMR extends Component {
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)} value={Number(tableMeta.rowData[14]).toFixed(1)}
decimalScale={1}
/> />
: :
<div style={{ flex: 1, width: 120 }}> <div style={{ flex: 1, width: 120 }}>
...@@ -1333,6 +1362,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1333,6 +1362,7 @@ export default class OperatingIndicatorMR extends Component {
disabled={true} disabled={true}
suffix={'%'} suffix={'%'}
value={Number(handleVariancePercent(tableMeta, 2, 3)).toFixed(1)} value={Number(handleVariancePercent(tableMeta, 2, 3)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1704,7 +1734,7 @@ export default class OperatingIndicatorMR extends Component { ...@@ -1704,7 +1734,7 @@ export default class OperatingIndicatorMR extends Component {
</button> </button>
</div> </div>
{!this.state.emptyData && (this.props.permission.create || this.props.permission.edit) && this.props.isSubmit && <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 2 }}> {!this.state.emptyData && (this.props.permission.create || this.props.permission.edit) && this.props.isSubmit && <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 2 }}>
{this.state.get_for == 'view' && this.state.viewOnly && <button {this.state.get_for == 'view' && <button
type="button" type="button"
onClick={() => { onClick={() => {
this.setState({loading: true}, () => { this.setState({loading: true}, () => {
......
...@@ -455,6 +455,7 @@ export default class ProfitLossMR extends Component { ...@@ -455,6 +455,7 @@ export default class ProfitLossMR extends Component {
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
months: this.props.month.month_id, months: this.props.month.month_id,
status: 'submitted',
profit_loss: payload profit_loss: payload
} }
console.log(body) console.log(body)
...@@ -973,6 +974,7 @@ export default class ProfitLossMR extends Component { ...@@ -973,6 +974,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(1)} value={Number(tableMeta.rowData[7]).toFixed(1)}
decimalScale={1}
/> />
: :
tableMeta.rowData[0] === 6 ? tableMeta.rowData[0] === 6 ?
...@@ -988,6 +990,7 @@ export default class ProfitLossMR extends Component { ...@@ -988,6 +990,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(val, tableMeta, 0)).toFixed(1)} value={Number(handleFormula(val, tableMeta, 0)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1005,6 +1008,7 @@ export default class ProfitLossMR extends Component { ...@@ -1005,6 +1008,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(1)} value={Number(tableMeta.rowData[7]).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1060,6 +1064,7 @@ export default class ProfitLossMR extends Component { ...@@ -1060,6 +1064,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1) } value={Number(tableMeta.rowData[8]).toFixed(1) }
decimalScale={1}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1071,6 +1076,7 @@ export default class ProfitLossMR extends Component { ...@@ -1071,6 +1076,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)} value={Number(handleValue(tableMeta, 0)).toFixed(1)}
decimalScale={1}
/> />
</span> </span>
: :
...@@ -1087,6 +1093,7 @@ export default class ProfitLossMR extends Component { ...@@ -1087,6 +1093,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(value, tableMeta, 0)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 0)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1104,6 +1111,7 @@ export default class ProfitLossMR extends Component { ...@@ -1104,6 +1111,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1)} value={Number(tableMeta.rowData[8]).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1123,6 +1131,7 @@ export default class ProfitLossMR extends Component { ...@@ -1123,6 +1131,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1) } value={Number(tableMeta.rowData[9]).toFixed(1) }
decimalScale={1}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1134,6 +1143,7 @@ export default class ProfitLossMR extends Component { ...@@ -1134,6 +1143,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta, 1)).toFixed(1)} value={Number(handleValue(tableMeta, 1)).toFixed(1)}
decimalScale={1}
/> />
</span> : </span> :
tableMeta.rowData[0] === 6 ? tableMeta.rowData[0] === 6 ?
...@@ -1149,6 +1159,7 @@ export default class ProfitLossMR extends Component { ...@@ -1149,6 +1159,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(value, tableMeta, 1)).toFixed(1)} value={Number(handleFormula(value, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1166,6 +1177,7 @@ export default class ProfitLossMR extends Component { ...@@ -1166,6 +1177,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1)} value={Number(tableMeta.rowData[9]).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1184,7 +1196,9 @@ export default class ProfitLossMR extends Component { ...@@ -1184,7 +1196,9 @@ export default class ProfitLossMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(tableMeta.rowData[10]).toFixed(1) } value={Number(tableMeta.rowData[10]).toFixed(1) }
decimalScale={1}
/> />
: :
tableMeta.rowData[0] === 3 ? tableMeta.rowData[0] === 3 ?
...@@ -1200,6 +1214,8 @@ export default class ProfitLossMR extends Component { ...@@ -1200,6 +1214,8 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
value={Number(tableMeta.rowData[10]).toFixed(1)} value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
fixedDecimalScale={1}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, "actual") handleChange(event.target.value, tableMeta, "actual")
}} }}
...@@ -1215,6 +1231,7 @@ export default class ProfitLossMR extends Component { ...@@ -1215,6 +1231,7 @@ export default class ProfitLossMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
decimalScale={1}
value={Number(handleValue(tableMeta, 2)).toFixed(1)} value={Number(handleValue(tableMeta, 2)).toFixed(1)}
/> />
</span> : </span> :
...@@ -1223,6 +1240,7 @@ export default class ProfitLossMR extends Component { ...@@ -1223,6 +1240,7 @@ export default class ProfitLossMR extends Component {
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={tableMeta.rowData[10]} value={tableMeta.rowData[10]}
decimalScale={1}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1247,6 +1265,7 @@ export default class ProfitLossMR extends Component { ...@@ -1247,6 +1265,7 @@ export default class ProfitLossMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
value={Number(tableMeta.rowData[10]).toFixed(1)} value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1294,6 +1313,7 @@ export default class ProfitLossMR extends Component { ...@@ -1294,6 +1313,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[23]).toFixed(1) } value={Number(tableMeta.rowData[23]).toFixed(1) }
decimalScale={1}
/> />
: :
// tableMeta.rowData[0] === 2 ? // tableMeta.rowData[0] === 2 ?
...@@ -1338,6 +1358,7 @@ export default class ProfitLossMR extends Component { ...@@ -1338,6 +1358,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleTotal(tableMeta.rowData[11], tableMeta)).toFixed(1)} value={Number(handleTotal(tableMeta.rowData[11], tableMeta)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1370,6 +1391,7 @@ export default class ProfitLossMR extends Component { ...@@ -1370,6 +1391,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1) } value={Number(tableMeta.rowData[12]).toFixed(1) }
decimalScale={1}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1381,6 +1403,7 @@ export default class ProfitLossMR extends Component { ...@@ -1381,6 +1403,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)} value={Number(handleValue(tableMeta, 0)).toFixed(1)}
decimalScale={1}
/> />
</span> </span>
: :
...@@ -1397,6 +1420,7 @@ export default class ProfitLossMR extends Component { ...@@ -1397,6 +1420,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(val, tableMeta, 0)).toFixed(1)} value={Number(handleFormula(val, tableMeta, 0)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1414,6 +1438,7 @@ export default class ProfitLossMR extends Component { ...@@ -1414,6 +1438,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)} value={Number(tableMeta.rowData[12]).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1499,6 +1524,7 @@ export default class ProfitLossMR extends Component { ...@@ -1499,6 +1524,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(1) } value={Number(tableMeta.rowData[13]).toFixed(1) }
decimalScale={1}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1513,6 +1539,7 @@ export default class ProfitLossMR extends Component { ...@@ -1513,6 +1539,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleVariance(tableMeta, 1, 0)).toFixed(1)} value={Number(handleVariance(tableMeta, 1, 0)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1534,6 +1561,7 @@ export default class ProfitLossMR extends Component { ...@@ -1534,6 +1561,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1) } value={Number(tableMeta.rowData[14]).toFixed(1) }
decimalScale={1}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1549,6 +1577,7 @@ export default class ProfitLossMR extends Component { ...@@ -1549,6 +1577,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={Number(handleVariancePercent(tableMeta, 1, 1)).toFixed(1)} value={Number(handleVariancePercent(tableMeta, 1, 1)).toFixed(1)}
decimalScale={1}
// value={11} // value={11}
/> />
} }
...@@ -1574,6 +1603,7 @@ export default class ProfitLossMR extends Component { ...@@ -1574,6 +1603,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(1) } value={Number(tableMeta.rowData[15]).toFixed(1) }
decimalScale={1}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1588,6 +1618,7 @@ export default class ProfitLossMR extends Component { ...@@ -1588,6 +1618,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleVariance(tableMeta, 2, 2)).toFixed(1)} value={Number(handleVariance(tableMeta, 2, 2)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1609,6 +1640,7 @@ export default class ProfitLossMR extends Component { ...@@ -1609,6 +1640,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={Number(tableMeta.rowData[16]).toFixed(1) } value={Number(tableMeta.rowData[16]).toFixed(1) }
decimalScale={1}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1624,6 +1656,7 @@ export default class ProfitLossMR extends Component { ...@@ -1624,6 +1656,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleVariancePercent(tableMeta, 2, 3)).toFixed(1)} value={Number(handleVariancePercent(tableMeta, 2, 3)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1648,6 +1681,7 @@ export default class ProfitLossMR extends Component { ...@@ -1648,6 +1681,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[17]).toFixed(1) } value={Number(tableMeta.rowData[17]).toFixed(1) }
decimalScale={1}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1662,6 +1696,7 @@ export default class ProfitLossMR extends Component { ...@@ -1662,6 +1696,7 @@ export default class ProfitLossMR extends Component {
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleVariance(tableMeta, 3, 4)).toFixed(1)} value={Number(handleVariance(tableMeta, 3, 4)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
...@@ -1683,6 +1718,7 @@ export default class ProfitLossMR extends Component { ...@@ -1683,6 +1718,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={Number(tableMeta.rowData[18]).toFixed(1) } value={Number(tableMeta.rowData[18]).toFixed(1) }
decimalScale={1}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1699,6 +1735,7 @@ export default class ProfitLossMR extends Component { ...@@ -1699,6 +1735,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'} suffix={'%'}
disabled={true} disabled={true}
value={Number(handleVariancePercent(tableMeta, 3, 5)).toFixed(1)} value={Number(handleVariancePercent(tableMeta, 3, 5)).toFixed(1)}
decimalScale={1}
/> />
} }
/> />
......
...@@ -262,6 +262,7 @@ export default class OperatingIndicator extends Component { ...@@ -262,6 +262,7 @@ export default class OperatingIndicator extends Component {
"periode": this.state.periode.periode "periode": this.state.periode.periode
} }
api.create().getOpetratingIndID(payload).then(response => { api.create().getOpetratingIndID(payload).then(response => {
console.log(response);
if (response) { if (response) {
// console.log(response.data.data) // console.log(response.data.data)
this.getLatestPeriodSubmit() this.getLatestPeriodSubmit()
...@@ -390,6 +391,7 @@ export default class OperatingIndicator extends Component { ...@@ -390,6 +391,7 @@ export default class OperatingIndicator extends Component {
saveOperatingInd(payload) { saveOperatingInd(payload) {
api.create().createOpetaingInd(payload).then((response) => { api.create().createOpetaingInd(payload).then((response) => {
console.log(response);
this.getReport() this.getReport()
this.getOperatingID() this.getOperatingID()
}) })
...@@ -397,6 +399,7 @@ export default class OperatingIndicator extends Component { ...@@ -397,6 +399,7 @@ export default class OperatingIndicator extends Component {
saveMonthlyOI(payload) { saveMonthlyOI(payload) {
api.create().createMonthlyReportOI(payload).then((response) => { api.create().createMonthlyReportOI(payload).then((response) => {
console.log(response);
this.getReport() this.getReport()
this.getOperatingID() this.getOperatingID()
}) })
......
...@@ -97,7 +97,7 @@ export default class BalanceSheet extends Component { ...@@ -97,7 +97,7 @@ export default class BalanceSheet extends Component {
"company_id": this.props.data.company.company_id, "company_id": this.props.data.company.company_id,
"periode": this.props.data.periode "periode": this.props.data.periode
} }
// // console.log(payload) console.log(payload)
api.create().getOperatingIndDetail(payload).then(response => { api.create().getOperatingIndDetail(payload).then(response => {
// console.log(response) // console.log(response)
let dataTable = [] let dataTable = []
...@@ -177,6 +177,7 @@ export default class BalanceSheet extends Component { ...@@ -177,6 +177,7 @@ export default class BalanceSheet extends Component {
this.setState({ emptyData: true }) this.setState({ emptyData: true })
} }
}) })
console.log(dataTable);
}) })
} }
...@@ -210,8 +211,9 @@ export default class BalanceSheet extends Component { ...@@ -210,8 +211,9 @@ export default class BalanceSheet extends Component {
"status": type, "status": type,
"master_budget": payloadMB "master_budget": payloadMB
} }
console.log(payload);
// // console.log('=========================') // // console.log('=========================')
// // console.log(JSON.stringify(payload)) // console.log(JSON.stringify(payload))
this.props.saveOperatingInd(payload) this.props.saveOperatingInd(payload)
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -281,7 +283,7 @@ export default class BalanceSheet extends Component { ...@@ -281,7 +283,7 @@ export default class BalanceSheet extends Component {
downloadTemplate = async () => { downloadTemplate = async () => {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/download_template?report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/master_budget/download_template?report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}`
) )
res = await res.blob() res = await res.blob()
// // console.log(res) // // console.log(res)
...@@ -299,7 +301,7 @@ export default class BalanceSheet extends Component { ...@@ -299,7 +301,7 @@ export default class BalanceSheet extends Component {
let bram = [this.props.data.operatingIndID, this.props.report_id, this.props.data.company.company_id, this.props.data.periode] let bram = [this.props.data.operatingIndID, this.props.report_id, this.props.data.company.company_id, this.props.data.periode]
// // console.log(bram) // // console.log(bram)
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/export_operating_indicator?operating_indicator_id=${this.props.data.operatingIndID == null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/master_budget/export_master_budget?operating_indicator_id=${this.props.data.operatingIndID == null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}`
) )
res = await res.blob() res = await res.blob()
...@@ -354,9 +356,10 @@ export default class BalanceSheet extends Component { ...@@ -354,9 +356,10 @@ export default class BalanceSheet extends Component {
company_id: this.props.data.company.company_id, company_id: this.props.data.company.company_id,
periode: this.props.data.periode, periode: this.props.data.periode,
report_id: this.props.data.report_id, report_id: this.props.data.report_id,
master_budget: payload master_budget: payload,
status: 'submitted'
} }
// // console.log(resp.rows[1][0]) console.log(body)
this.setState({ payload: body, buttonError: false, judul: resp.rows[1][0] }) this.setState({ payload: body, buttonError: false, judul: resp.rows[1][0] })
} }
}); });
...@@ -367,7 +370,7 @@ export default class BalanceSheet extends Component { ...@@ -367,7 +370,7 @@ export default class BalanceSheet extends Component {
api.create().checkUploadOperatingInd(this.state.payload).then(response => { api.create().checkUploadOperatingInd(this.state.payload).then(response => {
// // // console.log(JSON.stringify(this.state.payload)); // // // console.log(JSON.stringify(this.state.payload));
// // console.log('===============') // // console.log('===============')
// console.log(response) console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleOI: false, loading: true }) this.setState({ visibleUpload: false, visibleOI: false, loading: true })
......
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