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

Upload Simulasi MB BS

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