Commit a265463e authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-DEV' into 'ENV-DEPLOYMENT'

Remark 2

See merge request !2205
parents 6198591f e5afd33a
...@@ -175,6 +175,7 @@ const create = (type = "") => { ...@@ -175,6 +175,7 @@ const create = (type = "") => {
const createAllItemReport = (body) => api.post('item_report/create_all_item_report', body) const createAllItemReport = (body) => api.post('item_report/create_all_item_report', body)
const deleteAllItemReport = (body) => api.post('/item_report/delete_all_item_report', body) const deleteAllItemReport = (body) => api.post('/item_report/delete_all_item_report', body)
const deleteAllItemReportLOCF = (body) => api.post('/item_report/delete_all_item_report_locf', body) const deleteAllItemReportLOCF = (body) => api.post('/item_report/delete_all_item_report_locf', body)
const getAllSettingBusinessBank = (body) => api.post('setting/get_all_setting_by_group_name', body)
//PARAMETER //PARAMETER
const getAllParameter = () => api.get('/setting/get_all_setting') const getAllParameter = () => api.get('/setting/get_all_setting')
...@@ -693,6 +694,7 @@ const create = (type = "") => { ...@@ -693,6 +694,7 @@ const create = (type = "") => {
createOpetaingInd, createOpetaingInd,
uploadMasterBudget, uploadMasterBudget,
getAllSettingByType, getAllSettingByType,
getAllSettingBusinessBank,
getOpetratingIndID, getOpetratingIndID,
createAllItemReport, createAllItemReport,
deleteAllItemReport, deleteAllItemReport,
......
...@@ -2522,7 +2522,7 @@ export default class BudgetTahunan extends Component { ...@@ -2522,7 +2522,7 @@ export default class BudgetTahunan extends Component {
"month": "", "month": "",
"quartal": "", "quartal": "",
"type_report_name": "Master Budget", "type_report_name": "Master Budget",
"currency_id" : defaultCurrency.id "currency_id": defaultCurrency.id
} }
// console.log(payload); // console.log(payload);
api.create().createDownloadFile(payload).then((response) => { api.create().createDownloadFile(payload).then((response) => {
...@@ -2570,34 +2570,43 @@ export default class BudgetTahunan extends Component { ...@@ -2570,34 +2570,43 @@ export default class BudgetTahunan 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 === 6) { if (items === 6) {
let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=${submissionID}&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&report_id=${report[4]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}` try {
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&report_id=${report[4]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}` let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=${submissionID}&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&report_id=${report[4]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=${company.company_id}&year=${periode.periode}&revision=${report[2]}&report_id=${report[4]}&download_file_report_id=${downloadedFileReportId}&currency_id=${defaultCurrency.id}`
let res = await fetch( let res = await fetch(
submissionID == null ? resNull : resReal submissionID == null ? resNull : resReal
) )
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
a.href = url; a.href = url;
} }
if (res.status === 200) { if (res.status === 200) {
result = [...result, res]; result = [...result, res];
}
} catch (error) {
alert(error)
} }
} else { } else {
let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=${submissionID}&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 resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_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 resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=${submissionID}&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 resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_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(
submissionID == null ? resNull : resReal submissionID == null ? resNull : resReal
) )
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
a.href = url; a.href = url;
} }
if (res.status === 200) { if (res.status === 200) {
result = [...result, res]; 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