Commit 766a84e8 authored by Riri Novita's avatar Riri Novita

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents daec33c9 a30d7997
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -807,19 +807,22 @@ export default class SummaryOfTriputra extends Component {
a.click();
}
} else if (this.state.report.value === 3) {
alert("Download CPSM Report Coming Soon")
// let res = await fetch(
// `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report_detail/export_master_budget?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.lastRevision}`
// )
// 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 Profit & Loss.xlsx';
// a.click();
// }
// alert("Download CPSM Report Coming Soon")
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cpsm/export_report?year=${this.state.periode.periode}&&months=${this.state.month.month_id}`
let sub_null = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cpsm/export_report?year=${this.state.periode.periode}&&months=${this.state.month.month_id}`
console.log(url);
let res = await fetch(
this.state.submissionID == null ? sub_null : url
)
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 CPSM.xlsx';
a.click();
}
} else if (this.state.report.value === 4) {
// alert("Download Historical Report Coming Soon")
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_historical/export_report?year=${this.state.periode.periode}`
......
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