Commit fa202cc2 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

push banyak

See merge request !935
parents ebf07473 99d74bb3
......@@ -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
)
......
This diff is collapsed.
......@@ -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 })
......
This diff is collapsed.
......@@ -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