Commit 32a7858a authored by Riri Novita's avatar Riri Novita

Upload Simulasi MB BS

parent 3dae072c
......@@ -450,10 +450,11 @@ const create = (type = "") => {
const getRatioLOCF = (body) => api.get(`/transaction/cronjob/create_monthly_report/${body.report}/${body.monthlyReportId}/${body.companyId}/${body.months}/${body.periode}/${body.currency_id}`)
const triggerRatioFromLOCF = (body) => api.get(`/transaction/cronjob/create_monthly_report_company/${body.report}/${body.monthlyReportId}/${body.companyId}/${body.months}/${body.periode}/${body.currency_id}`)
const triggerRatioMB = (body) => api.get(`/transaction/cronjob/create_master_budget_company/${body.report}/${body.submissionId}/${body.companyId}/${body.periode}//${body.currency_id}`)
const triggerRatioMB = (body) => api.get(`/transaction/cronjob/create_master_budget_company/${body.report}/${body.submissionId}/${body.companyId}/${body.periode}/${body.currency_id}`)
const triggerRatioMBSimulasi = (body) => api.get(`/transaction/cronjob/create_master_budget_company/other_currency/${body.report}/${body.submissionId}/${body.companyId}/${body.periode}/${body.currency_id}`)
const triggerRatioRO = (body) => api.get(`/transaction/cronjob/create_rolling_outlook_company/${body.report}/${body.rollingOutlookId}/${body.companyId}/${body.quartal}/${body.periode}/${body.currency_id}`)
const triggerRatioOLPA = (body) => api.get(`/transaction/cronjob/create_outlook_pa_company/${body.report}/${body.outlookPaId}/${body.companyId}/${body.periode}//${body.currency_id}`)
const triggerHistoricalRatio = (body) => api.get(`/transaction/cronjob/create_historical_company/${body.report}/${body.companyId}/${body.periode}//${body.currency_id}`)
const triggerRatioOLPA = (body) => api.get(`/transaction/cronjob/create_outlook_pa_company/${body.report}/${body.outlookPaId}/${body.companyId}/${body.periode}/${body.currency_id}`)
const triggerHistoricalRatio = (body) => api.get(`/transaction/cronjob/create_historical_company/${body.report}/${body.companyId}/${body.periode}/${body.currency_id}`)
// MonthlyPL
// const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body)
......@@ -858,6 +859,7 @@ const create = (type = "") => {
getRatioLOCF,
triggerRatioFromLOCF,
triggerRatioMB,
triggerRatioMBSimulasi,
triggerRatioRO,
triggerRatioOLPA,
getMonitoringMB,
......
......@@ -515,18 +515,18 @@ export default class BalanceSheet extends Component {
if (response.ok) {
if (response.data.status === "success") {
this.props.onClickClose()
this.props.getReport('BS')
let bodyRatioBs = {
"report": 'ratio',
"submissionId": this.props.submissionID,
"periode": this.props.periode,
"companyId": this.props.company.company_id,
"currency_id": this.props.defaultCurrency.id,
}
api.create().triggerRatioMB(bodyRatioBs).then((res) => {
console.log(res)
this.setState({ loading: false })
})
this.props.getReport('BS', 'simulasiBS')
// let bodyRatioBs = {
// "report": 'ratio',
// "submissionId": this.props.submissionID,
// "periode": this.props.periode,
// "companyId": this.props.company.company_id,
// "currency_id": this.props.defaultCurrency.id,
// }
// api.create().triggerRatioMB(bodyRatioBs).then((res) => {
// console.log(res)
// this.setState({ loading: false })
// })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
}
......@@ -579,17 +579,17 @@ export default class BalanceSheet extends Component {
this.props.onClickClose()
if (type == 'submitted') {
this.props.getReport('BS')
let bodyRatioBs = {
"report": 'ratio',
"submissionId": this.props.submissionID,
"periode": this.props.periode,
"companyId": this.props.company.company_id,
"currency_id": this.props.defaultCurrency.id,
}
api.create().triggerRatioMB(bodyRatioBs).then((res) => {
console.log(res)
this.setState({ loading: false })
})
// let bodyRatioBs = {
// "report": 'ratio',
// "submissionId": this.props.submissionID,
// "periode": this.props.periode,
// "companyId": this.props.company.company_id,
// "currency_id": this.props.defaultCurrency.id,
// }
// api.create().triggerRatioMB(bodyRatioBs).then((res) => {
// console.log(res)
// this.setState({ loading: false })
// })
} else {
this.props.getReport()
}
......
......@@ -670,6 +670,20 @@ export default class BudgetTahunan extends Component {
// this.getCashFlow(type)
this.getPL(type, trigger)
} else if (type != undefined && type == 'BS') {
if (trigger === 'simulasiBS') {
let bodyRatioBs = {
"report": 'ratio',
"submissionId": this.state.submissionID,
"periode": this.state.periode.periode,
"companyId": this.state.company.company_id,
"currency_id": this.state.defaultCurrency.id,
}
// console.log(bodyRatioBs);
api.create().triggerRatioMBSimulasi(bodyRatioBs).then((res) => {
console.log(res)
this.setState({ loading: false })
})
} else {
let bodyRatioBs = {
"report": 'ratio',
"submissionId": this.state.submissionID,
......@@ -682,6 +696,7 @@ export default class BudgetTahunan extends Component {
console.log(res)
this.setState({ loading: false })
})
}
} else {
this.setState({ loading: false })
}
......
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