Commit d77a20aa authored by d.arizona's avatar d.arizona

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

parents cf700928 ad814fdb
......@@ -223,17 +223,17 @@ const create = (type = "") => {
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 getAllOperatingInd = (body) => api.post('transaction/operating_indicator/get_all_report', body)
const getOperatingIndDetail = (body) => api.post('transaction/operating_indicator/get_report_hierarki', body)
const createOpetaingInd = (body) => api.post('transaction/operating_indicator/create_operating_indicator_report', body)
const checkUploadOperatingInd = (body) => api.post('transaction/operating_indicator/check_import', body)
const uploadOperatingInd = (body) => api.post('transaction/operating_indicator/import_operating_indicator', body)
const getOperatingIndDetail = (body) => api.post('transaction/operating_indicator/master_budget/get_report_hierarki', body)
const createOpetaingInd = (body) => api.post('transaction/operating_indicator/master_budget/create_submission_report', body)
const checkUploadOperatingInd = (body) => api.post('transaction/operating_indicator/master_budget/check_import', 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 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 getLastestUpdateMROI = (body) => api.post('transaction/monthly_report_oi/get_latest_update', body)
const getReportHierarkiPL = (body) => api.post('transaction/db_profit_loss_detail/get_report_hierarki', body)
const getLastestUpdateMROI = (body) => api.post('transaction/operating_indicator/monthly_report/get_latest_update', body)
//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
const getOutlookPAID = (body) => api.post('transaction/outlook_pa/get_outlook_pa_id', body)
......@@ -258,11 +258,11 @@ const create = (type = "") => {
// Monthly
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 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 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 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)
......@@ -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/tax_planning/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 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 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/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 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 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/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 validateSubmitReportBS = (body) => api.post('transaction/monthly_report_bs/validate_save', body)
const validateSubmitReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/validate_save', body)
......@@ -307,7 +307,7 @@ const create = (type = "") => {
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 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
// const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body)
......
......@@ -287,8 +287,8 @@ export default class CashFlow extends Component {
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}`
// 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 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 resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}`
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}`
let res = await fetch(
this.props.submissionID == null ? resNull : resReal
)
......
......@@ -792,6 +792,7 @@ export default class ProfitLoss extends Component {
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -831,6 +832,7 @@ export default class ProfitLoss extends Component {
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -847,6 +849,7 @@ export default class ProfitLoss extends Component {
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -865,6 +868,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
......@@ -881,6 +885,7 @@ export default class ProfitLoss extends Component {
placeholder=""
disabled={true}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
decimalScale={1}
/>
</span>
:
......@@ -895,6 +900,7 @@ export default class ProfitLoss extends Component {
placeholder=""
disabled={true}
value={Number(handleFormula(value, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/>
// null
:
......@@ -905,6 +911,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 1)).toFixed(1)}
/>
// null
......@@ -948,6 +955,7 @@ export default class ProfitLoss extends Component {
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -964,6 +972,7 @@ export default class ProfitLoss extends Component {
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -982,6 +991,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -999,6 +1009,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -1013,6 +1024,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 2)).toFixed(1)}
/>
// null
......@@ -1024,6 +1036,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 2)).toFixed(1)}
/>
// null
......@@ -1076,6 +1089,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1092,6 +1106,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1111,6 +1126,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1128,6 +1144,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -1142,6 +1159,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 3)).toFixed(1)}
/>
// null
......@@ -1153,6 +1171,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 3)).toFixed(1)}
/>
// null
......@@ -1205,6 +1224,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1221,6 +1241,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1240,6 +1261,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1257,6 +1279,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -1271,6 +1294,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 4)).toFixed(1)}
/>
// null
......@@ -1282,6 +1306,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 4)).toFixed(1)}
/>
// null
......@@ -1334,6 +1359,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1350,6 +1376,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1369,6 +1396,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1386,6 +1414,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -1400,6 +1429,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 5)).toFixed(1)}
/>
// null
......@@ -1411,6 +1441,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 5)).toFixed(1)}
/>
// null
......@@ -1463,6 +1494,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1479,6 +1511,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1498,6 +1531,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1515,6 +1549,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -1529,6 +1564,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 6)).toFixed(1)}
/>
// null
......@@ -1540,6 +1576,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 6)).toFixed(1)}
/>
// null
......@@ -1592,6 +1629,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1608,6 +1646,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1627,6 +1666,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1644,6 +1684,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -1658,6 +1699,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 7)).toFixed(1)}
/>
// null
......@@ -1669,6 +1711,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 7)).toFixed(1)}
/>
// null
......@@ -1721,6 +1764,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1737,6 +1781,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1756,6 +1801,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1773,6 +1819,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -1787,6 +1834,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 8)).toFixed(1)}
/>
// null
......@@ -1798,6 +1846,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 8)).toFixed(1)}
/>
// null
......@@ -1850,6 +1899,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1866,6 +1916,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1885,6 +1936,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1902,6 +1954,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -1916,6 +1969,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 9)).toFixed(1)}
/>
// null
......@@ -1927,6 +1981,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 9)).toFixed(1)}
/>
// null
......@@ -1979,6 +2034,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -1995,6 +2051,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2014,6 +2071,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2031,6 +2089,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -2045,6 +2104,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 10)).toFixed(1)}
/>
// null
......@@ -2056,6 +2116,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 10)).toFixed(1)}
/>
// null
......@@ -2108,6 +2169,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2124,6 +2186,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2143,6 +2206,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2160,6 +2224,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -2174,6 +2239,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 11)).toFixed(1)}
/>
// null
......@@ -2185,6 +2251,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 11)).toFixed(1)}
/>
// null
......@@ -2237,6 +2304,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2253,6 +2321,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2272,6 +2341,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2289,6 +2359,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -2303,6 +2374,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 12)).toFixed(1)}
/>
// null
......@@ -2314,6 +2386,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 12)).toFixed(1)}
/>
// null
......@@ -2366,6 +2439,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2382,6 +2456,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2397,6 +2472,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span> :
......@@ -2416,6 +2492,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleTotal(tableMeta)).toFixed(1)}
/>
</span>}
......@@ -2452,6 +2529,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2468,6 +2546,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2487,6 +2566,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2504,6 +2584,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -2518,6 +2599,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 13)).toFixed(1)} ue={handleFormula(value, tableMeta)}
/>
// null
......@@ -2529,6 +2611,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 13)).toFixed(1)} ue={handleFormula(value, tableMeta)}
/>
// null
......@@ -2581,6 +2664,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2597,6 +2681,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(value).toFixed(1)}
/>
}
......@@ -2616,6 +2701,7 @@ export default class ProfitLoss extends Component {
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)}
value={Number(value).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -2633,6 +2719,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(value, tableMeta)).toFixed(1)}
/>
</span>
......@@ -2647,6 +2734,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 14)).toFixed(1)} ue={handleFormula(value, tableMeta)}
/>
// null
......@@ -2658,6 +2746,7 @@ export default class ProfitLoss extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(value, tableMeta, 14)).toFixed(1)} ue={handleFormula(value, tableMeta)}
/>
// null
......
......@@ -606,7 +606,7 @@ export default class SubHolding extends Component {
async downloadAllData() {
if (this.state.report.value === 1) {
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()
this.setState({ loading: false })
......@@ -619,7 +619,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 2) {
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()
this.setState({ loading: false })
......@@ -632,7 +632,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 3) {
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()
this.setState({ loading: false })
......@@ -644,10 +644,10 @@ export default class SubHolding extends Component {
a.click();
}
} 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);
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()
this.setState({ loading: false })
......
......@@ -130,7 +130,7 @@ export default class BalanceSheetMR extends Component {
getSettingControl() {
let body = {
group: 'THRESHOLD_VARIANCE',
group: 'THRESHOLD_CONTROL',
company_id: this.props.company.company_id,
type: 'BALANCE_SHEET'
}
......
......@@ -345,7 +345,8 @@ export default class CorporateAnnualTargetMR extends Component {
periode: this.props.periode,
report_id: this.props.report_id,
months: this.props.month.month_id,
corporate_annual_target: payload
corporate_annual_target: payload,
status: "submitted"
}
console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
......@@ -356,7 +357,7 @@ export default class CorporateAnnualTargetMR extends Component {
checkUpload() {
this.setState({loading: true})
api.create().checkUploadMonthlyReportCAT(this.state.payload).then(response => {
console.log(JSON.stringify(this.state.payload));
// console.log(JSON.stringify(this.state.payload));
console.log(this.state.payload)
console.log(response)
if (response.data) {
......@@ -428,7 +429,9 @@ export default class CorporateAnnualTargetMR extends Component {
"report_id": this.props.report_id,
"status": type,
"months": this.props.month.month_id,
"corporate_annual_target": data
"corporate_annual_target": data,
"total_score": this.state.totalScore,
"performance": this.state.perfomanceScore
}
console.log(JSON.stringify(body));
api.create('UPLOAD').uploadMonthlyReportCAT(body).then(response => {
......@@ -555,8 +558,8 @@ export default class CorporateAnnualTargetMR extends Component {
"jenis_kpi": i[8] == null ? "" : i[8],
"max_ach": i[9] == null ? "" : i[9],
"formula_ytd":i[10] == null ? "" : i[10],
"actual_monthly": i[11],
"target_monthly": i[12],
"actual_monthly": i[11] == null || i[11] == "" ? 0.0 : i[11],
"target_monthly": i[12] == null || i[12] == "" ? 0.0 : i[12],
"achivement_monthly": i[13],
"score": i[14],
"score_x_weight": i[15],
......@@ -570,9 +573,12 @@ export default class CorporateAnnualTargetMR extends Component {
"report_id": this.props.report_id,
"status": type,
"months": this.props.month.month_id,
"corporate_annual_target": data
"corporate_annual_target": data,
"total_score": this.state.totalScore,
"performance": this.state.perfomanceScore
}
console.log(JSON.stringify(payload));
// console.log(JSON.stringify(payload));
console.log(payload);
api.create('UPLOAD').createMonthlyReportCAT(payload).then(response => {
console.log(response);
......@@ -1573,7 +1579,7 @@ export default class CorporateAnnualTargetMR extends Component {
<ThemeProvider theme={theme}>
<Input
disableUnderline={true}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 150, backgroundColor: 'transparent' }}
type="text"
placeholder=""
multiline={true}
......
......@@ -166,8 +166,9 @@ export default class OperatingIndicatorMR extends Component {
"periode": this.props.data.periode,
"months": this.props.months
}
console.log(payload);
api.create().getMonthlyOI(payload).then(response => {
// console.log(response);
console.log(response);
if (response) {
if (response.data.data) {
this.setState({ operatingIndIDMonthly: response.data.data.operating_indicator_id } , () => {
......@@ -298,7 +299,7 @@ export default class OperatingIndicatorMR extends Component {
downloadTemplate = async () => {
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()
// // console.log(res)
......@@ -313,10 +314,10 @@ export default class OperatingIndicatorMR extends Component {
async downloadAllData() {
// 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);
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()
this.setState({ loading: false })
......@@ -358,7 +359,7 @@ export default class OperatingIndicatorMR extends Component {
}
console.log(payload);
// // console.log('=========================')
// // console.log(JSON.stringify(payload))
console.log(JSON.stringify(payload))
this.props.saveMonthlyOI(payload)
this.props.onClickClose()
}
......@@ -393,6 +394,7 @@ export default class OperatingIndicatorMR extends Component {
periode: this.props.data.periode,
report_id: this.props.data.report_id,
months: this.props.months,
status: 'submitted',
monthly_report: payload
}
console.log(body)
......@@ -438,14 +440,14 @@ export default class OperatingIndicatorMR extends Component {
item.master_budget,
item.rolling_budget,
item.actual,
0,
0,
0,
0,
// item.amount_act_vs_mb,
// item.percent_act_vs_mb,
// item.amount_act_vs_rb,
// item.percent_act_vs_rb,
// 0,
// 0,
// 0,
// 0,
item.amount_act_vs_mb,
item.percent_act_vs_mb,
item.amount_act_vs_rb,
item.percent_act_vs_rb,
item.mtd_vs_mb,
item.mtd_vs_rb,
item.order,
......@@ -833,6 +835,7 @@ export default class OperatingIndicatorMR extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(val).toFixed(1)}
/>
:
......@@ -844,6 +847,7 @@ export default class OperatingIndicatorMR extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
/>
</span> :
......@@ -852,6 +856,7 @@ export default class OperatingIndicatorMR extends Component {
<FormControlLabel
style={{ margin: 0 }}
value={tableMeta.rowData[7]}
decimalScale={1}
control={
<NumberFormat
thousandSeparator={true}
......@@ -877,6 +882,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -932,6 +938,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1) }
decimalScale={1}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -943,6 +950,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
decimalScale={1}
/>
</span>
:
......@@ -959,6 +967,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -976,6 +985,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -995,6 +1005,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1) }
decimalScale={1}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1006,6 +1017,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 1)).toFixed(1)}
decimalScale={1}
/>
</span>
:
......@@ -1022,6 +1034,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1039,6 +1052,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={ Number(tableMeta.rowData[9]).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1059,6 +1073,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[10]).toFixed(1) }
decimalScale={1}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1070,6 +1085,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 2)).toFixed(1)}
decimalScale={1}
/>
</span>
:
......@@ -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' }}
type="text"
placeholder=""
decimalScale={1}
fixedDecimalScale={1}
disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit || this.state.get_for == 'view'}
value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
......@@ -1106,7 +1125,9 @@ export default class OperatingIndicatorMR extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1123,6 +1144,7 @@ export default class OperatingIndicatorMR extends Component {
type="text"
placeholder=""
value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1209,6 +1231,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[11]).toFixed(1)}
decimalScale={1}
/>
:
<div style={{ flex: 1 }}>
......@@ -1223,6 +1246,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(handleVariance(tableMeta, 1, 0)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1244,6 +1268,7 @@ export default class OperatingIndicatorMR extends Component {
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
decimalScale={1}
/>
:
<div style={{ flex: 1 }}>
......@@ -1259,6 +1284,7 @@ export default class OperatingIndicatorMR extends Component {
suffix={'%'}
disabled={true}
value={Number(handleVariancePercent(tableMeta, 1, 1)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1283,6 +1309,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(1)}
decimalScale={1}
/>
:
<div style={{ flex: 1 }}>
......@@ -1297,6 +1324,7 @@ export default class OperatingIndicatorMR extends Component {
placeholder=""
disabled={true}
value={Number(handleVariance(tableMeta, 2, 2)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1318,6 +1346,7 @@ export default class OperatingIndicatorMR extends Component {
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)}
decimalScale={1}
/>
:
<div style={{ flex: 1, width: 120 }}>
......@@ -1333,6 +1362,7 @@ export default class OperatingIndicatorMR extends Component {
disabled={true}
suffix={'%'}
value={Number(handleVariancePercent(tableMeta, 2, 3)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1704,7 +1734,7 @@ export default class OperatingIndicatorMR extends Component {
</button>
</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.get_for == 'view' && this.state.viewOnly && <button
{this.state.get_for == 'view' && <button
type="button"
onClick={() => {
this.setState({loading: true}, () => {
......
......@@ -455,6 +455,7 @@ export default class ProfitLossMR extends Component {
periode: this.props.periode,
report_id: this.props.report_id,
months: this.props.month.month_id,
status: 'submitted',
profit_loss: payload
}
console.log(body)
......@@ -973,6 +974,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(1)}
decimalScale={1}
/>
:
tableMeta.rowData[0] === 6 ?
......@@ -988,6 +990,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 0)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1005,6 +1008,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1060,6 +1064,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1) }
decimalScale={1}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1071,6 +1076,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
decimalScale={1}
/>
</span>
:
......@@ -1087,6 +1093,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleFormula(value, tableMeta, 0)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1104,6 +1111,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1123,6 +1131,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1) }
decimalScale={1}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1134,6 +1143,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 1)).toFixed(1)}
decimalScale={1}
/>
</span> :
tableMeta.rowData[0] === 6 ?
......@@ -1149,6 +1159,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleFormula(value, tableMeta, 1)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1166,6 +1177,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1184,7 +1196,9 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(tableMeta.rowData[10]).toFixed(1) }
decimalScale={1}
/>
:
tableMeta.rowData[0] === 3 ?
......@@ -1200,6 +1214,8 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
fixedDecimalScale={1}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, "actual")
}}
......@@ -1215,6 +1231,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={true}
decimalScale={1}
value={Number(handleValue(tableMeta, 2)).toFixed(1)}
/>
</span> :
......@@ -1223,6 +1240,7 @@ export default class ProfitLossMR extends Component {
<FormControlLabel
style={{ margin: 0 }}
value={tableMeta.rowData[10]}
decimalScale={1}
control={
<NumberFormat
thousandSeparator={true}
......@@ -1247,6 +1265,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
value={Number(tableMeta.rowData[10]).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1294,6 +1313,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[23]).toFixed(1) }
decimalScale={1}
/>
:
// tableMeta.rowData[0] === 2 ?
......@@ -1338,6 +1358,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleTotal(tableMeta.rowData[11], tableMeta)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1370,6 +1391,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1) }
decimalScale={1}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1381,6 +1403,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
decimalScale={1}
/>
</span>
:
......@@ -1397,6 +1420,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 0)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1414,6 +1438,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1499,6 +1524,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(1) }
decimalScale={1}
/>
:
<div style={{ flex: 1 }}>
......@@ -1513,6 +1539,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleVariance(tableMeta, 1, 0)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1534,6 +1561,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1) }
decimalScale={1}
/>
:
<div style={{ flex: 1 }}>
......@@ -1549,6 +1577,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'}
disabled={true}
value={Number(handleVariancePercent(tableMeta, 1, 1)).toFixed(1)}
decimalScale={1}
// value={11}
/>
}
......@@ -1574,6 +1603,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(1) }
decimalScale={1}
/>
:
<div style={{ flex: 1 }}>
......@@ -1588,6 +1618,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleVariance(tableMeta, 2, 2)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1609,6 +1640,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[16]).toFixed(1) }
decimalScale={1}
/>
:
<div style={{ flex: 1 }}>
......@@ -1624,6 +1656,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleVariancePercent(tableMeta, 2, 3)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1648,6 +1681,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[17]).toFixed(1) }
decimalScale={1}
/>
:
<div style={{ flex: 1 }}>
......@@ -1662,6 +1696,7 @@ export default class ProfitLossMR extends Component {
placeholder=""
disabled={true}
value={Number(handleVariance(tableMeta, 3, 4)).toFixed(1)}
decimalScale={1}
/>
}
/>
......@@ -1683,6 +1718,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'}
disabled={true}
value={Number(tableMeta.rowData[18]).toFixed(1) }
decimalScale={1}
/>
:
<div style={{ flex: 1 }}>
......@@ -1699,6 +1735,7 @@ export default class ProfitLossMR extends Component {
suffix={'%'}
disabled={true}
value={Number(handleVariancePercent(tableMeta, 3, 5)).toFixed(1)}
decimalScale={1}
/>
}
/>
......
......@@ -359,7 +359,8 @@ export default class TaxPlanningMR extends Component {
periode: this.props.periode,
report_id: this.props.report_id,
months: this.props.month.month_id,
tax_planning: payload
tax_planning: payload,
status: "submitted"
}
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
// console.log(this.state.judulColumn)
......
......@@ -262,6 +262,7 @@ export default class OperatingIndicator extends Component {
"periode": this.state.periode.periode
}
api.create().getOpetratingIndID(payload).then(response => {
console.log(response);
if (response) {
// console.log(response.data.data)
this.getLatestPeriodSubmit()
......@@ -390,6 +391,7 @@ export default class OperatingIndicator extends Component {
saveOperatingInd(payload) {
api.create().createOpetaingInd(payload).then((response) => {
console.log(response);
this.getReport()
this.getOperatingID()
})
......@@ -397,6 +399,7 @@ export default class OperatingIndicator extends Component {
saveMonthlyOI(payload) {
api.create().createMonthlyReportOI(payload).then((response) => {
console.log(response);
this.getReport()
this.getOperatingID()
})
......
......@@ -97,7 +97,7 @@ export default class BalanceSheet extends Component {
"company_id": this.props.data.company.company_id,
"periode": this.props.data.periode
}
// // console.log(payload)
console.log(payload)
api.create().getOperatingIndDetail(payload).then(response => {
// console.log(response)
let dataTable = []
......@@ -177,6 +177,7 @@ export default class BalanceSheet extends Component {
this.setState({ emptyData: true })
}
})
console.log(dataTable);
})
}
......@@ -210,8 +211,9 @@ export default class BalanceSheet extends Component {
"status": type,
"master_budget": payloadMB
}
console.log(payload);
// // console.log('=========================')
// // console.log(JSON.stringify(payload))
// console.log(JSON.stringify(payload))
this.props.saveOperatingInd(payload)
this.props.onClickClose()
}
......@@ -281,7 +283,7 @@ export default class BalanceSheet extends Component {
downloadTemplate = async () => {
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()
// // console.log(res)
......@@ -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]
// // console.log(bram)
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()
......@@ -354,9 +356,10 @@ export default class BalanceSheet extends Component {
company_id: this.props.data.company.company_id,
periode: this.props.data.periode,
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] })
}
});
......@@ -367,7 +370,7 @@ export default class BalanceSheet extends Component {
api.create().checkUploadOperatingInd(this.state.payload).then(response => {
// // // console.log(JSON.stringify(this.state.payload));
// // console.log('===============')
// console.log(response)
console.log(response)
if (response.data) {
if (response.data.status === 'success') {
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