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
e7215029
Commit
e7215029
authored
Aug 04, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Download Subco
parent
3ed6a6f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
19 deletions
+26
-19
SubHolding.js
src/container/Reports/SubHolding.js
+26
-19
No files found.
src/container/Reports/SubHolding.js
View file @
e7215029
...
...
@@ -427,6 +427,7 @@ export default class SubHolding extends Component {
}
getReportType
()
{
console
.
log
(
this
.
state
.
defaultCurrency
);
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
...
...
@@ -4161,23 +4162,29 @@ export default class SubHolding extends Component {
a
.
click
();
}
}
else
if
(
this
.
state
.
report
.
value
===
6
)
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_cash_flow/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=6&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_cash_flow/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=6&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
)
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 Cash Flow - Summary
${
company
.
company_name
}
${
month
.
month_value
}
${
periode
.
periode
}
.xlsx`
;
a
.
click
();
try
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_cash_flow/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=6&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_cash_flow/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=6&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
)
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 Cash Flow - Summary
${
company
.
company_name
}
${
month
.
month_value
}
${
periode
.
periode
}
.xlsx`
;
a
.
click
();
}
}
catch
(
error
)
{
alert
(
error
)
this
.
setState
({
loading
:
false
})
}
}
else
if
(
this
.
state
.
report
.
value
===
7
)
{
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_balance_sheet/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=2&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_balance_sheet/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=2&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1
&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
...
...
@@ -4189,10 +4196,10 @@ export default class SubHolding extends Component {
a
.
click
();
}
}
else
if
(
this
.
state
.
report
.
value
===
8
)
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_profit_loss/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=28&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1`
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_profit_loss/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=28&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1
&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_profit_loss/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=28&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_profit_loss/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=28&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1
&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
...
...
@@ -4205,7 +4212,7 @@ export default class SubHolding extends Component {
}
}
else
if
(
this
.
state
.
report
.
value
===
9
)
{
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_ratio/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=1&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/summary_ratio/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=1&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
&&months=
${
this
.
state
.
month
.
month_id
}
&&quarter=1
&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
...
...
@@ -4218,7 +4225,7 @@ export default class SubHolding extends Component {
}
}
else
if
(
this
.
state
.
report
.
value
===
11
)
{
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/quarterly/export_report?report_id=10&&company_id=
${
this
.
state
.
company
.
company_id
}
&&periode=
${
this
.
state
.
periode
.
periode
}
&&quarter=
${
this
.
state
.
quarter
.
name
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/quarterly/export_report?report_id=10&&company_id=
${
this
.
state
.
company
.
company_id
}
&&periode=
${
this
.
state
.
periode
.
periode
}
&&quarter=
${
this
.
state
.
quarter
.
name
}
&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
)
console
.
log
(
res
);
res
=
await
res
.
blob
()
...
...
@@ -4232,7 +4239,7 @@ export default class SubHolding extends Component {
}
}
else
if
(
this
.
state
.
report
.
value
===
10
)
{
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/performance_appraisal/export?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
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cat/performance_appraisal/export?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
}
&¤cy_id=
${
this
.
state
.
defaultCurrency
.
id
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
...
...
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