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
fded77b5
Commit
fded77b5
authored
Feb 01, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plid
parent
c19c236d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
190 additions
and
171 deletions
+190
-171
index.js
src/api/index.js
+3
-1
SubHolding.js
src/container/Laporan/SubHolding.js
+187
-170
No files found.
src/api/index.js
View file @
fded77b5
...
@@ -245,6 +245,7 @@ const create = (type = "") => {
...
@@ -245,6 +245,7 @@ const create = (type = "") => {
const
getHierarkiCreateReportPLMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/monthly_report/get_report_hierarki'
,
body
)
const
getHierarkiCreateReportPLMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/monthly_report/get_report_hierarki'
,
body
)
const
createReportPLMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/master_budget/create_submission_report'
,
body
)
const
createReportPLMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/master_budget/create_submission_report'
,
body
)
const
createReportPLMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/monthly_report/create_monthly_report'
,
body
)
const
createReportPLMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/monthly_report/create_monthly_report'
,
body
)
const
getPLID
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/get_profit_loss_id'
,
body
)
// const getReportPLMB = (body) => api.post('/transaction/db_profit_loss/get_report_hierarki', body)
// const getReportPLMB = (body) => api.post('/transaction/db_profit_loss/get_report_hierarki', body)
// const getReportPLMB = (body) => api.post('/transaction/db_profit_loss/get_report_hierarki', body)
// const getReportPLMB = (body) => api.post('/transaction/db_profit_loss/get_report_hierarki', body)
const
getReportPLMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/monthly_report/get_report_hierarki'
,
body
)
const
getReportPLMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/monthly_report/get_report_hierarki'
,
body
)
...
@@ -633,7 +634,8 @@ const create = (type = "") => {
...
@@ -633,7 +634,8 @@ const create = (type = "") => {
getHierarkiCreateReportPLMB
,
getHierarkiCreateReportPLMB
,
getHierarkiCreateReportPLMR
,
getHierarkiCreateReportPLMR
,
createReportPLMB
,
createReportPLMB
,
createReportPLMR
createReportPLMR
,
getPLID
}
}
}
}
...
...
src/container/Laporan/SubHolding.js
View file @
fded77b5
...
@@ -621,7 +621,22 @@ export default class SubHolding extends Component {
...
@@ -621,7 +621,22 @@ export default class SubHolding extends Component {
}
}
})
})
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
let
payloads
=
{...
payload
,
months
:
this
.
state
.
month
.
month_id
,
quarter
:
0
}
let
PLID
=
null
let
payloadID
=
{
"periode"
:
this
.
state
.
periode
.
periode
,
"company_id"
:
this
.
state
.
company
.
company_id
}
console
.
log
(
payloadID
);
api
.
create
().
getPLID
(
payloadID
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
)
{
PLID
=
response
.
data
.
data
==
null
?
null
:
response
.
data
.
data
.
profit_loss_id
}
else
{
PLID
=
null
}
this
.
setState
({
PLID
},
()
=>
{
let
payloads
=
{...
payload
,
submission_id
:
this
.
state
.
PLID
,
months
:
this
.
state
.
month
.
month_id
,
quarter
:
0
}
console
.
log
(
payloads
);
api
.
create
().
getReportPL
(
payloads
).
then
(
response
=>
{
api
.
create
().
getReportPL
(
payloads
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -796,6 +811,8 @@ export default class SubHolding extends Component {
...
@@ -796,6 +811,8 @@ export default class SubHolding extends Component {
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
}
}
})
})
})
})
}
else
if
(
this
.
state
.
report
.
value
===
4
)
{
}
else
if
(
this
.
state
.
report
.
value
===
4
)
{
api
.
create
().
getReportHierarkiFRMB
(
payload
).
then
(
response
=>
{
api
.
create
().
getReportHierarkiFRMB
(
payload
).
then
(
response
=>
{
// console.log(payload);
// console.log(payload);
...
@@ -2715,7 +2732,7 @@ export default class SubHolding extends Component {
...
@@ -2715,7 +2732,7 @@ export default class SubHolding extends Component {
}
}
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
let
res
=
await
fetch
(
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/db_profit_loss/export_report?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submission
ID
}
&&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/db_profit_loss/export_report?submission_id=
${
this
.
state
.
PLID
===
null
?
""
:
this
.
state
.
PL
ID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
)
)
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
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