Commit 2d6951d6 authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEV'

Update OLPA RO

See merge request !1836
parents 1194f7c4 08312e8a
......@@ -148,7 +148,8 @@ export default class BalanceSheetOLPA extends Component {
"revision": this.props.revision,
"get_for": this.state.get_for,
"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 => {
// console.log(response);
......
......@@ -708,6 +708,7 @@ export default class CorporateAnnualTargetRO extends Component {
"company_id": this.props.company.company_id,
// "rolling_outlook_id": this.props.rollingOutlookID,
"outlook_pa_id": this.props.outlook_pa_id,
"currency_id": this.props.defaultCurrency.id,
"quartal": 'q1'
}
api.create().getLastestUpdateOLPA(payload).then(response => {
......
......@@ -1591,23 +1591,33 @@ export default class OutlookPA extends Component {
let datas = data.findIndex((val) => val[4] == items)
let report = data[datas]
if (items === 38) {
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(
`${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}`
)
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 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}`
)
if (res.status === 200) {
result = [...result, res];
if (res.status === 200) {
result = [...result, res];
}
} catch (error) {
alert(error)
}
} else {
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(
`${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}`
)
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 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}`
)
if (res.status === 200) {
result = [...result, res];
if (res.status === 200) {
result = [...result, res];
}
} catch (error) {
alert(error)
}
}
}
......
This diff is collapsed.
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