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
163094f4
Commit
163094f4
authored
Oct 19, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_+_
parent
b5d3e6b9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
index.js
src/api/index.js
+1
-1
SubHolding.js
src/container/Laporan/SubHolding.js
+18
-5
No files found.
src/api/index.js
View file @
163094f4
...
...
@@ -223,7 +223,7 @@ const create = (type = "") => {
const
uploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/import_operating_indicator'
,
body
)
const
getLastestUpdateOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_update'
,
body
)
const
getLastPeriodeOI
=
(
idCompany
)
=>
api
.
post
(
`transaction/master_budget/get_last_periode/
${
idCompany
}
`
)
const
getReportHierarkiPL
=
(
body
)
=>
api
.
post
(
'transaction/
pl
_detail/get_report_hierarki'
,
body
)
const
getReportHierarkiPL
=
(
body
)
=>
api
.
post
(
'transaction/
db_report
_detail/get_report_hierarki'
,
body
)
//CASH FLOW
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/get_report_hierarki'
,
body
)
...
...
src/container/Laporan/SubHolding.js
View file @
163094f4
...
...
@@ -454,7 +454,7 @@ export default class SubHolding extends Component {
async
downloadAllData
()
{
if
(
this
.
state
.
report
.
value
===
1
)
{
let
res
=
await
fetch
(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
master_budge
t/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
}
`
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
db_repor
t/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
})
...
...
@@ -462,12 +462,12 @@ export default class SubHolding extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'
Master Budget
Balance Sheet.xlsx'
;
a
.
download
=
'
Report DB
Balance Sheet.xlsx'
;
a
.
click
();
}
}
else
if
(
this
.
state
.
report
.
value
===
2
)
{
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
master_budge
t/export_master_budget?submission_id=
${
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
}
`
let
sub_null
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
master_budge
t/export_master_budget?submission_id=&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
lastRevision
}
`
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
db_repor
t/export_master_budget?submission_id=
${
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
}
`
let
sub_null
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
db_repor
t/export_master_budget?submission_id=&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
lastRevision
}
`
// console.log(url);
let
res
=
await
fetch
(
this
.
state
.
submissionID
==
null
?
sub_null
:
url
...
...
@@ -478,7 +478,20 @@ export default class SubHolding extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Master Budget Profit & Loss.xlsx'
;
a
.
download
=
'Report DB Profit & Loss Detail.xlsx'
;
a
.
click
();
}
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
let
res
=
await
fetch
(
`https://tia.eksad.com/tia-reporting-dev/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
();
}
}
else
{
...
...
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