Commit 65995098 authored by rifkaki's avatar rifkaki

subholding download dbtp

parent ab777c93
......@@ -2340,6 +2340,19 @@ export default class SubHolding extends Component {
a.download = 'Report DB Financial Ratio.xlsx';
a.click();
}
} else if (this.state.report.value === 5) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_tax_planning/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 })
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
a.download = 'Report DB Tax Planning.xlsx';
a.click();
}
} else if (this.state.report.value === 21) {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_operating_indicator/export_report?operating_indicator_id=${this.state.OPID === null ? "" : this.state.OPID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}`
console.log(url);
......
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