Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
1eebc7c5
Commit
1eebc7c5
authored
Nov 30, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
4809610e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
25 deletions
+34
-25
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+34
-25
No files found.
src/container/BudgetTahunan/BudgetTahunan.js
View file @
1eebc7c5
...
...
@@ -2522,7 +2522,7 @@ export default class BudgetTahunan extends Component {
"month"
:
""
,
"quartal"
:
""
,
"type_report_name"
:
"Master Budget"
,
"currency_id"
:
defaultCurrency
.
id
"currency_id"
:
defaultCurrency
.
id
}
// console.log(payload);
api
.
create
().
createDownloadFile
(
payload
).
then
((
response
)
=>
{
...
...
@@ -2570,34 +2570,43 @@ export default class BudgetTahunan extends Component {
let
datas
=
data
.
findIndex
((
val
)
=>
val
[
4
]
==
items
)
let
report
=
data
[
datas
]
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
}
¤cy_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
}
¤cy_id=
${
defaultCurrency
.
id
}
`
try
{
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
}
¤cy_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
}
¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
submissionID
==
null
?
resNull
:
resReal
)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
}
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
let
res
=
await
fetch
(
submissionID
==
null
?
resNull
:
resReal
)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
}
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
}
catch
(
error
)
{
alert
(
error
)
}
}
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
}
¤cy_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
}
¤cy_id=
${
defaultCurrency
.
id
}
`
try
{
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
}
¤cy_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
}
¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
submissionID
==
null
?
resNull
:
resReal
)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
}
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
let
res
=
await
fetch
(
submissionID
==
null
?
resNull
:
resReal
)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
}
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
}
catch
(
error
)
{
alert
(
error
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment