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
4c693f5c
Commit
4c693f5c
authored
Jan 26, 2021
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update!
parent
a0cb23e1
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
215 additions
and
123 deletions
+215
-123
index.js
src/api/index.js
+3
-1
CatPQ.js
src/container/Laporan/CatPQ.js
+20
-18
SubHolding.js
src/container/Laporan/SubHolding.js
+75
-87
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+117
-17
No files found.
src/api/index.js
View file @
4c693f5c
...
@@ -247,6 +247,7 @@ const create = (type = "") => {
...
@@ -247,6 +247,7 @@ const create = (type = "") => {
const
getReportCFSumaMB
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/master_budget/get_report_hierarki'
,
body
)
const
getReportCFSumaMB
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/master_budget/get_report_hierarki'
,
body
)
const
getReportCFSumaMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/monthly_report/get_report_hierarki'
,
body
)
const
getReportCFSumaMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/monthly_report/get_report_hierarki'
,
body
)
const
getReportCFSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/summary/get_report_hierarki'
,
body
)
const
getReportCFSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_cash_flow/summary/get_report_hierarki'
,
body
)
const
getReportBSSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary/balance_sheet/get_report_hierarki'
,
body
)
//CASH FLOW
//CASH FLOW
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/master_budget/get_report_hierarki'
,
body
)
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/master_budget/get_report_hierarki'
,
body
)
...
@@ -602,7 +603,8 @@ const create = (type = "") => {
...
@@ -602,7 +603,8 @@ const create = (type = "") => {
getReportCFSumaMB
,
getReportCFSumaMB
,
getReportCFSumaMR
,
getReportCFSumaMR
,
createReportCF
,
createReportCF
,
getReportCFSuma
getReportCFSuma
,
getReportBSSuma
}
}
}
}
...
...
src/container/Laporan/CatPQ.js
View file @
4c693f5c
This diff is collapsed.
Click to expand it.
src/container/Laporan/SubHolding.js
View file @
4c693f5c
...
@@ -1091,95 +1091,83 @@ export default class SubHolding extends Component {
...
@@ -1091,95 +1091,83 @@ export default class SubHolding extends Component {
}
}
})
})
}
else
if
(
this
.
state
.
report
.
value
===
7
)
{
}
else
if
(
this
.
state
.
report
.
value
===
7
)
{
api
.
create
().
getReportBSMB
(
payload
).
then
(
response
=>
{
let
payload
=
{
"report_id"
:
this
.
state
.
report
.
value
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"months"
:
"1"
}
api
.
create
().
getReportBSSuma
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
payload
);
console
.
log
(
response
);
console
.
log
(
response
);
// let dataTable = []
let
dataTable
=
[]
// if (response.data) {
if
(
response
.
data
)
{
// let res = response.data.data
let
res
=
response
.
data
.
data
// const handlePushChild = (item) => {
const
handlePushChild
=
(
item
)
=>
{
// let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
// if (indexIDzz === -1) {
if
(
indexIDzz
===
-
1
)
{
// dataTable.push([
dataTable
.
push
([
// item.type_report_id,
item
.
type_report_id
,
// item.id,
item
.
id
,
// item.parent,
item
.
parent
,
// item.formula,
item
.
formula
,
// item.level,
item
.
level
,
// item.description,
item
.
description
,
// item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before,
item
.
balance_sheet
.
last_month
,
// Number(item.balance_sheet.january).toFixed(1),
item
.
balance_sheet
.
actual
,
// Number(item.balance_sheet.february).toFixed(1),
item
.
balance_sheet
.
mb
,
// Number(item.balance_sheet.march).toFixed(1),
item
.
balance_sheet
.
percent_of_mb
,
// Number(item.balance_sheet.april).toFixed(1),
item
.
balance_sheet
.
ol
,
// Number(item.balance_sheet.may).toFixed(1),
item
.
balance_sheet
.
percent_of_ol
,
// Number(item.balance_sheet.june).toFixed(1),
item
.
balance_sheet
.
last_year
,
// Number(item.balance_sheet.july).toFixed(1),
item
.
balance_sheet
.
forecast_next_year
,
// Number(item.balance_sheet.august).toFixed(1),
item
.
balance_sheet
.
forecast_next_two_year
,
// Number(item.balance_sheet.september).toFixed(1),
item
.
order
// Number(item.balance_sheet.october).toFixed(1),
])
// Number(item.balance_sheet.november).toFixed(1),
}
// Number(item.balance_sheet.december).toFixed(1),
if
(
item
.
children
!==
null
)
{
// Number(item.balance_sheet.total_current_year).toFixed(1),
if
(
item
.
children
.
length
>
0
)
{
// Number(item.balance_sheet.total_next_year).toFixed(1),
item
.
children
.
map
((
items
,
indexs
)
=>
{
// Number(item.balance_sheet.total_more_year).toFixed(1),
handlePushChild
(
items
)
// item.order,
})
// item.condition_it_should_be,
}
// item.condition_if_wrong
}
// ])
}
// }
res
.
map
((
item
,
index
)
=>
{
// if (item.children !== null) {
dataTable
.
push
([
// if (item.children.length > 0) {
item
.
type_report_id
,
// item.children.map((items, indexs) => {
item
.
id
,
// handlePushChild(items)
item
.
parent
,
// })
item
.
formula
,
// }
item
.
level
,
// }
item
.
description
,
// }
item
.
balance_sheet
.
last_month
,
// res.map((item, index) => {
item
.
balance_sheet
.
actual
,
// dataTable.push([
item
.
balance_sheet
.
mb
,
// item.type_report_id,
item
.
balance_sheet
.
percent_of_mb
,
// item.id,
item
.
balance_sheet
.
ol
,
// item.parent,
item
.
balance_sheet
.
percent_of_ol
,
// item.formula,
item
.
balance_sheet
.
last_year
,
// item.level,
item
.
balance_sheet
.
forecast_next_year
,
// item.description,
item
.
balance_sheet
.
forecast_next_two_year
,
// item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before,
item
.
order
// Number(item.balance_sheet.january).toFixed(1),
])
// Number(item.balance_sheet.february).toFixed(1),
if
(
item
.
children
!==
null
)
{
// Number(item.balance_sheet.march).toFixed(1),
if
(
item
.
children
.
length
>
0
)
{
// Number(item.balance_sheet.april).toFixed(1),
item
.
children
.
map
((
items
,
indexs
)
=>
{
// Number(item.balance_sheet.may).toFixed(1),
handlePushChild
(
items
)
// Number(item.balance_sheet.june).toFixed(1),
})
// Number(item.balance_sheet.july).toFixed(1),
}
// Number(item.balance_sheet.august).toFixed(1),
}
// Number(item.balance_sheet.september).toFixed(1),
})
// Number(item.balance_sheet.october).toFixed(1),
// this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
// Number(item.balance_sheet.november).toFixed(1),
this
.
setState
({
dataTable
},
()
=>
{
// Number(item.balance_sheet.december).toFixed(1),
console
.
log
(
this
.
state
.
dataTable
)
// Number(item.balance_sheet.total_current_year).toFixed(1),
// this.getBalanceSheetMR(payload)
// Number(item.balance_sheet.total_next_year).toFixed(1),
})
// Number(item.balance_sheet.total_more_year).toFixed(1),
}
else
{
// item.order,
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
// item.condition_it_should_be,
}
// item.condition_if_wrong
// ])
// if (item.children !== null) {
// if (item.children.length > 0) {
// item.children.map((items, indexs) => {
// handlePushChild(items)
// })
// }
// }
// })
// // this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
// this.setState({ dataTable }, () => {
// console.log(this.state.dataTable)
// this.getBalanceSheetMR(payload)
// })
// } else {
// this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
// }
this
.
setState
({
previewTable
:
true
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
previewTable
:
true
,
loading
:
false
,
previewDownload
:
false
})
})
})
...
...
src/container/Laporan/TableSubHolding.js
View file @
4c693f5c
This diff is collapsed.
Click to expand it.
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