Commit 1cf38151 authored by Riri Novita's avatar Riri Novita

Update OLPA

parent 40f49e1c
...@@ -148,7 +148,8 @@ export default class BalanceSheetOLPA extends Component { ...@@ -148,7 +148,8 @@ export default class BalanceSheetOLPA extends Component {
"revision": this.props.revision, "revision": this.props.revision,
"get_for": this.state.get_for, "get_for": this.state.get_for,
"periode": this.props.periode, "periode": this.props.periode,
"company_id": this.props.company.company_id "company_id": this.props.company.company_id,
"currency_id": this.props.defaultCurrency.id
} }
api.create().getLastestUpdateOLPA(payload).then(response => { api.create().getLastestUpdateOLPA(payload).then(response => {
// console.log(response); // console.log(response);
......
...@@ -708,6 +708,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -708,6 +708,7 @@ export default class CorporateAnnualTargetRO extends Component {
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
// "rolling_outlook_id": this.props.rollingOutlookID, // "rolling_outlook_id": this.props.rollingOutlookID,
"outlook_pa_id": this.props.outlook_pa_id, "outlook_pa_id": this.props.outlook_pa_id,
"currency_id": this.props.defaultCurrency.id,
"quartal": 'q1' "quartal": 'q1'
} }
api.create().getLastestUpdateOLPA(payload).then(response => { api.create().getLastestUpdateOLPA(payload).then(response => {
......
...@@ -1591,6 +1591,7 @@ export default class OutlookPA extends Component { ...@@ -1591,6 +1591,7 @@ export default class OutlookPA extends Component {
let datas = data.findIndex((val) => val[4] == items) let datas = data.findIndex((val) => val[4] == items)
let report = data[datas] let report = data[datas]
if (items === 38) { if (items === 38) {
try {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/outlook_pa/export_outlook_pa?outlook_pa_id=${outlook_pa_id}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}` let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/outlook_pa/export_outlook_pa?outlook_pa_id=${outlook_pa_id}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/outlook_pa/export_outlook_pa?outlook_pa_id=${outlook_pa_id === null ? "" : outlook_pa_id}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/outlook_pa/export_outlook_pa?outlook_pa_id=${outlook_pa_id === null ? "" : outlook_pa_id}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
...@@ -1599,7 +1600,12 @@ export default class OutlookPA extends Component { ...@@ -1599,7 +1600,12 @@ export default class OutlookPA extends Component {
if (res.status === 200) { if (res.status === 200) {
result = [...result, res]; result = [...result, res];
} }
} catch (error) {
alert(error)
}
} else { } else {
try {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${outlook_pa_id}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}` let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${outlook_pa_id}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${outlook_pa_id === null ? "" : outlook_pa_id}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${outlook_pa_id === null ? "" : outlook_pa_id}&&report_id=${report[4]}&&company_id=${company.company_id}&&year=${periode.periode}&&revision=${report[2]}&&download_file_report_id=${downloadedFileReportId}&&currency_id=${defaultCurrency.id}`
...@@ -1608,6 +1614,10 @@ export default class OutlookPA extends Component { ...@@ -1608,6 +1614,10 @@ export default class OutlookPA extends Component {
if (res.status === 200) { if (res.status === 200) {
result = [...result, res]; result = [...result, res];
} }
} catch (error) {
alert(error)
}
} }
} }
......
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