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
43850742
Commit
43850742
authored
Feb 08, 2021
by
faisalhamdi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into faisal
parents
72095fa1
39af648c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
197 additions
and
359 deletions
+197
-359
index.js
src/api/index.js
+2
-2
BudgetTahunan.js
src/container/BudgetTahunan.js
+15
-15
MonthlyReport.js
src/container/MonthlyReport.js
+12
-12
SummaryOfTriputra.js
src/container/SummaryTriputra/SummaryOfTriputra.js
+157
-297
TableSummaryTriputra.js
src/container/SummaryTriputra/TableSummaryTriputra.js
+11
-33
No files found.
src/api/index.js
View file @
43850742
...
@@ -271,9 +271,9 @@ const create = (type = "") => {
...
@@ -271,9 +271,9 @@ const create = (type = "") => {
const
getReportFRLastMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/monthly_report_last_year/get_report_hierarki'
,
body
)
const
getReportFRLastMR
=
(
body
)
=>
api
.
post
(
'/transaction/summary_ratio/monthly_report_last_year/get_report_hierarki'
,
body
)
const
getReportBSSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_balance_sheet/summary/get_report_hierarki'
,
body
)
const
getReportBSSuma
=
(
body
)
=>
api
.
post
(
'/transaction/summary_balance_sheet/summary/get_report_hierarki'
,
body
)
const
getDashboardCAT
=
(
body
)
=>
api
.
post
(
'/dashboard/cat'
,
body
)
const
getDashboardCAT
=
(
body
)
=>
api
.
post
(
'/dashboard/cat'
,
body
)
const
getHierarkiReportYtd
=
(
body
)
=>
api
.
post
(
'/transaction/summary
/ytd
/get_report_hierarki'
,
body
)
const
getHierarkiReportYtd
=
(
body
)
=>
api
.
post
(
'/transaction/summary
_ytd/summary
/get_report_hierarki'
,
body
)
const
getHierarkiReportHistorical
=
(
body
)
=>
api
.
post
(
'/transaction/summary_historical/summary/get_report_hierarki'
,
body
)
const
getHierarkiReportHistorical
=
(
body
)
=>
api
.
post
(
'/transaction/summary_historical/summary/get_report_hierarki'
,
body
)
const
getHierarkiReportMTD
=
(
body
)
=>
api
.
post
(
'/transaction/summary
/mtd
/get_report_hierarki'
,
body
)
const
getHierarkiReportMTD
=
(
body
)
=>
api
.
post
(
'/transaction/summary
_mtd/summary
/get_report_hierarki'
,
body
)
const
getFullApproveMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_approved_submit'
,
body
)
const
getFullApproveMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_approved_submit'
,
body
)
const
getFullApproveMonthly
=
(
body
)
=>
api
.
post
(
'/transaction/monthly_report/get_approved_submit'
,
body
)
const
getFullApproveMonthly
=
(
body
)
=>
api
.
post
(
'/transaction/monthly_report/get_approved_submit'
,
body
)
...
...
src/container/BudgetTahunan.js
View file @
43850742
...
@@ -1794,21 +1794,21 @@ export default class BudgetTahunan extends Component {
...
@@ -1794,21 +1794,21 @@ export default class BudgetTahunan extends Component {
listFR
.
push
(
listFR
.
push
(
{
{
"item_report_id"
:
item
[
1
],
"item_report_id"
:
item
[
1
],
"january"
:
String
(
item
[
7
]
==
undefined
?
item
[
7
]
:
Number
(
item
[
7
]).
toFixed
(
2
)),
"january"
:
String
(
item
[
7
]
==
undefined
||
item
[
7
]
==
'Infinity'
||
item
[
7
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
7
]).
toFixed
(
2
)),
"february"
:
String
(
item
[
8
]
==
undefined
?
item
[
8
]
:
Number
(
item
[
8
]).
toFixed
(
2
)),
"february"
:
String
(
item
[
8
]
==
undefined
||
item
[
8
]
==
'Infinity'
||
item
[
8
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
8
]).
toFixed
(
2
)),
"march"
:
String
(
item
[
9
]
==
undefined
?
item
[
9
]
:
Number
(
item
[
9
]).
toFixed
(
2
)),
"march"
:
String
(
item
[
9
]
==
undefined
||
item
[
9
]
==
'Infinity'
||
item
[
9
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
9
]).
toFixed
(
2
)),
"april"
:
String
(
item
[
10
]
==
undefined
?
item
[
10
]
:
Number
(
item
[
10
]).
toFixed
(
2
)),
"april"
:
String
(
item
[
10
]
==
undefined
||
item
[
10
]
==
'Infinity'
||
item
[
10
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
10
]).
toFixed
(
2
)),
"may"
:
String
(
item
[
11
]
==
undefined
?
item
[
11
]
:
Number
(
item
[
11
]).
toFixed
(
2
)),
"may"
:
String
(
item
[
11
]
==
undefined
||
item
[
11
]
==
'Infinity'
||
item
[
11
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
11
]).
toFixed
(
2
)),
"june"
:
String
(
item
[
12
]
==
undefined
?
item
[
12
]
:
Number
(
item
[
12
]).
toFixed
(
2
)),
"june"
:
String
(
item
[
12
]
==
undefined
||
item
[
12
]
==
'Infinity'
||
item
[
12
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
12
]).
toFixed
(
2
)),
"july"
:
String
(
item
[
13
]
==
undefined
?
item
[
13
]
:
Number
(
item
[
13
]).
toFixed
(
2
)),
"july"
:
String
(
item
[
13
]
==
undefined
||
item
[
13
]
==
'Infinity'
||
item
[
13
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
13
]).
toFixed
(
2
)),
"august"
:
String
(
item
[
14
]
==
undefined
?
item
[
14
]
:
Number
(
item
[
14
]).
toFixed
(
2
)),
"august"
:
String
(
item
[
14
]
==
undefined
||
item
[
14
]
==
'Infinity'
||
item
[
14
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
14
]).
toFixed
(
2
)),
"september"
:
String
(
item
[
15
]
==
undefined
?
item
[
15
]
:
Number
(
item
[
15
]).
toFixed
(
2
)),
"september"
:
String
(
item
[
15
]
==
undefined
||
item
[
15
]
==
'Infinity'
||
item
[
15
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
15
]).
toFixed
(
2
)),
"october"
:
String
(
item
[
16
]
==
undefined
?
item
[
16
]
:
Number
(
item
[
16
]).
toFixed
(
2
)),
"october"
:
String
(
item
[
16
]
==
undefined
||
item
[
16
]
==
'Infinity'
||
item
[
16
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
16
]).
toFixed
(
2
)),
"november"
:
String
(
item
[
17
]
==
undefined
?
item
[
17
]
:
Number
(
item
[
17
]).
toFixed
(
2
)),
"november"
:
String
(
item
[
17
]
==
undefined
||
item
[
17
]
==
'Infinity'
||
item
[
17
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
17
]).
toFixed
(
2
)),
"december"
:
String
(
item
[
18
]
==
undefined
?
item
[
18
]
:
Number
(
item
[
18
]).
toFixed
(
2
)),
"december"
:
String
(
item
[
18
]
==
undefined
||
item
[
18
]
==
'Infinity'
||
item
[
18
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
18
]).
toFixed
(
2
)),
"total_current_year"
:
String
(
totalCY
==
undefined
?
totalCY
:
Number
(
totalCY
).
toFixed
(
2
)),
"total_current_year"
:
String
(
totalCY
==
undefined
||
totalCY
==
'Infinity'
||
totalCY
==
'-Infinity'
?
"0.0"
:
Number
(
totalCY
).
toFixed
(
2
)),
"total_next_year"
:
String
(
item
[
19
]
!=
''
?
Number
(
item
[
19
]).
toFixed
(
2
)
:
item
[
19
]),
"total_next_year"
:
String
(
item
[
19
]
!=
''
||
item
[
19
]
!=
'Infinity'
||
item
[
19
]
!=
'-Infinity'
?
Number
(
item
[
19
]).
toFixed
(
2
)
:
item
[
19
]),
"total_more_year"
:
String
(
item
[
20
]
!=
''
?
Number
(
item
[
20
]).
toFixed
(
2
)
:
item
[
20
]),
"total_more_year"
:
String
(
item
[
20
]
!=
''
||
item
[
20
]
!=
'Infinity'
||
item
[
20
]
!=
'-Infinity'
?
Number
(
item
[
20
]).
toFixed
(
2
)
:
item
[
20
]),
}
}
)
)
...
...
src/container/MonthlyReport.js
View file @
43850742
...
@@ -2006,28 +2006,28 @@ export default class MonthlyReport extends Component {
...
@@ -2006,28 +2006,28 @@ export default class MonthlyReport extends Component {
{
{
"item_report_id"
:
item
[
1
],
"item_report_id"
:
item
[
1
],
"actual"
:
this
.
state
.
month
.
month_id
==
1
?
"actual"
:
this
.
state
.
month
.
month_id
==
1
?
String
(
item
[
7
]
==
undefined
?
item
[
7
]
:
Number
(
item
[
7
]).
toFixed
(
2
))
:
String
(
item
[
7
]
==
undefined
||
item
[
7
]
==
'Infinity'
||
item
[
7
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
7
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
2
?
this
.
state
.
month
.
month_id
==
2
?
String
(
item
[
8
]
==
undefined
?
item
[
8
]
:
Number
(
item
[
8
]).
toFixed
(
2
))
:
String
(
item
[
8
]
==
undefined
||
item
[
8
]
==
'Infinity'
||
item
[
8
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
8
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
3
?
this
.
state
.
month
.
month_id
==
3
?
String
(
item
[
9
]
==
undefined
?
item
[
8
]
:
Number
(
item
[
9
]).
toFixed
(
2
))
:
String
(
item
[
9
]
==
undefined
||
item
[
9
]
==
'Infinity'
||
item
[
9
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
9
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
4
?
this
.
state
.
month
.
month_id
==
4
?
String
(
item
[
10
]
==
undefined
?
item
[
10
]
:
Number
(
item
[
10
]).
toFixed
(
2
))
:
String
(
item
[
10
]
==
undefined
||
item
[
10
]
==
'Infinity'
||
item
[
10
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
10
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
5
?
this
.
state
.
month
.
month_id
==
5
?
String
(
item
[
11
]
==
undefined
?
item
[
11
]
:
Number
(
item
[
11
]).
toFixed
(
2
))
:
String
(
item
[
11
]
==
undefined
||
item
[
11
]
==
'Infinity'
||
item
[
11
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
11
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
6
?
this
.
state
.
month
.
month_id
==
6
?
String
(
item
[
12
]
==
undefined
?
item
[
12
]
:
Number
(
item
[
12
]).
toFixed
(
2
))
:
String
(
item
[
12
]
==
undefined
||
item
[
12
]
==
'Infinity'
||
item
[
12
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
12
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
7
?
this
.
state
.
month
.
month_id
==
7
?
String
(
item
[
13
]
==
undefined
?
item
[
13
]
:
Number
(
item
[
13
]).
toFixed
(
2
))
:
String
(
item
[
13
]
==
undefined
||
item
[
13
]
==
'Infinity'
||
item
[
13
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
13
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
8
?
this
.
state
.
month
.
month_id
==
8
?
String
(
item
[
14
]
==
undefined
?
item
[
14
]
:
Number
(
item
[
14
]).
toFixed
(
2
))
:
String
(
item
[
14
]
==
undefined
||
item
[
14
]
==
'Infinity'
||
item
[
14
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
14
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
9
?
this
.
state
.
month
.
month_id
==
9
?
String
(
item
[
15
]
==
undefined
?
item
[
15
]
:
Number
(
item
[
15
]).
toFixed
(
2
))
:
String
(
item
[
15
]
==
undefined
||
item
[
15
]
==
'Infinity'
||
item
[
15
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
15
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
10
?
this
.
state
.
month
.
month_id
==
10
?
String
(
item
[
16
]
==
undefined
?
item
[
16
]
:
Number
(
item
[
16
]).
toFixed
(
2
))
:
String
(
item
[
16
]
==
undefined
||
item
[
16
]
==
'Infinity'
||
item
[
16
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
16
]).
toFixed
(
2
))
:
this
.
state
.
month
.
month_id
==
11
?
this
.
state
.
month
.
month_id
==
11
?
String
(
item
[
17
]
==
undefined
?
item
[
17
]
:
Number
(
item
[
17
]).
toFixed
(
2
))
:
String
(
item
[
17
]
==
undefined
||
item
[
17
]
==
'Infinity'
||
item
[
17
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
17
]).
toFixed
(
2
))
:
String
(
item
[
18
]
==
undefined
?
item
[
18
]
:
Number
(
item
[
18
]).
toFixed
(
2
))
String
(
item
[
18
]
==
undefined
||
item
[
18
]
==
'Infinity'
||
item
[
18
]
==
'-Infinity'
?
"0.0"
:
Number
(
item
[
18
]).
toFixed
(
2
))
// "january": String(item[7] == undefined? item[7] : Number(item[7]).toFixed(1)),
// "january": String(item[7] == undefined? item[7] : Number(item[7]).toFixed(1)),
// "february": String(item[8] == undefined? item[8] : Number(item[8]).toFixed(1)),
// "february": String(item[8] == undefined? item[8] : Number(item[8]).toFixed(1)),
// "march": String(item[9] == undefined? item[9] : Number(item[9]).toFixed(1)),
// "march": String(item[9] == undefined? item[9] : Number(item[9]).toFixed(1)),
...
...
src/container/SummaryTriputra/SummaryOfTriputra.js
View file @
43850742
...
@@ -23,10 +23,10 @@ export default class SummaryOfTriputra extends Component {
...
@@ -23,10 +23,10 @@ export default class SummaryOfTriputra extends Component {
listPeriode
:
null
,
listPeriode
:
null
,
periode
:
null
,
periode
:
null
,
reportType
:
[
reportType
:
[
{
value
:
1
,
label
:
'MTD Report'
},
{
value
:
1
,
label
:
'MTD Report'
,
key
:
"MTD"
},
{
value
:
2
,
label
:
'YTD Report'
},
{
value
:
2
,
label
:
'YTD Report'
,
key
:
"YTD"
},
{
value
:
3
,
label
:
'CPSM Report'
},
{
value
:
3
,
label
:
'CPSM Report'
,
key
:
"CPSM"
},
{
value
:
4
,
label
:
'Historical'
},
{
value
:
4
,
label
:
'Historical'
,
key
:
"historical"
},
],
],
report
:
null
,
report
:
null
,
loading
:
false
,
loading
:
false
,
...
@@ -196,7 +196,7 @@ export default class SummaryOfTriputra extends Component {
...
@@ -196,7 +196,7 @@ export default class SummaryOfTriputra extends Component {
getDataTable
()
{
getDataTable
()
{
let
payload
=
{
let
payload
=
{
"report_type"
:
this
.
state
.
report
.
value
,
"report_type"
:
this
.
state
.
report
.
key
,
"periode"
:
this
.
state
.
periode
.
periode
,
"periode"
:
this
.
state
.
periode
.
periode
,
"months"
:
this
.
state
.
month
.
month_id
"months"
:
this
.
state
.
month
.
month_id
}
}
...
@@ -205,126 +205,54 @@ export default class SummaryOfTriputra extends Component {
...
@@ -205,126 +205,54 @@ export default class SummaryOfTriputra extends Component {
"report_type"
:
"historical"
"report_type"
:
"historical"
}
}
if
(
this
.
state
.
report
.
value
===
1
)
{
if
(
this
.
state
.
report
.
value
===
1
)
{
let
dbMTD
=
[]
api
.
create
().
getHierarkiReportMTD
(
payload
).
then
(
response
=>
{
api
.
create
().
getHierarkiReportMTD
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
response
);
console
.
log
(
response
);
// console.log(payload)
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
=
d
bMTD
.
findIndex
((
val
)
=>
val
[
0
]
===
item
.
company_id
)
let
indexIDzz
=
d
ataTable
.
findIndex
((
val
)
=>
val
[
0
]
===
item
.
company_id
)
if
(
indexIDzz
===
-
1
)
{
if
(
indexIDzz
===
-
1
)
{
let
mtd_revenue_act
=
item
.
mtd_revenue_act
=
''
?
0
:
Number
(
item
.
mtd_revenue_act
)
dataTable
.
push
([
let
mtd_revenue_mb
=
item
.
mtd_revenue_mb
=
''
?
0
:
Number
(
item
.
mtd_revenue_mb
)
// item.company_id,
let
persenRevMB
=
0
0
,
if
(
mtd_revenue_mb
<
0
)
{
if
(
mtd_revenue_act
>=
mtd_revenue_mb
)
{
persenRevMB
=
(
mtd_revenue_mb
-
mtd_revenue_act
)
/
mtd_revenue_mb
+
1
}
else
{
persenRevMB
=
(
mtd_revenue_mb
-
mtd_revenue_act
)
/
mtd_revenue_mb
}
}
else
{
persenRevMB
=
mtd_revenue_act
/
mtd_revenue_mb
}
let
mtd_ebitda_act
=
item
.
mtd_ebitda_act
=
''
?
0
:
Number
(
item
.
mtd_ebitda_act
)
let
mtd_ebitda_mb
=
item
.
mtd_ebitda_mb
=
''
?
0
:
Number
(
item
.
mtd_ebitda_mb
)
let
persenEbitMB
=
0
if
(
mtd_ebitda_mb
<
0
)
{
if
(
mtd_ebitda_act
>=
mtd_ebitda_mb
)
{
persenEbitMB
=
(
mtd_ebitda_mb
-
mtd_ebitda_act
)
/
mtd_ebitda_mb
+
1
}
else
{
persenEbitMB
=
(
mtd_ebitda_mb
-
mtd_ebitda_act
)
/
mtd_ebitda_mb
}
}
else
{
persenEbitMB
=
mtd_ebitda_act
/
mtd_ebitda_mb
}
let
mtd_tpat_act
=
item
.
mtd_tpat_act
=
''
?
0
:
Number
(
item
.
mtd_tpat_act
)
let
mtd_tpat_mb
=
item
.
mtd_tpat_mb
=
''
?
0
:
Number
(
item
.
mtd_tpat_mb
)
let
persenTPATMB
=
0
if
(
mtd_tpat_mb
<
0
)
{
if
(
mtd_tpat_act
>=
mtd_tpat_mb
)
{
persenTPATMB
=
(
mtd_tpat_mb
-
mtd_tpat_act
)
/
mtd_tpat_mb
+
1
}
else
{
persenTPATMB
=
(
mtd_tpat_mb
-
mtd_tpat_act
)
/
mtd_tpat_mb
}
}
else
{
persenTPATMB
=
mtd_tpat_act
/
mtd_tpat_mb
}
let
mtd_npat_act
=
item
.
mtd_npat_act
=
''
?
0
:
Number
(
item
.
mtd_npat_act
)
let
mtd_npat_mb
=
item
.
mtd_npat_mb
=
''
?
0
:
Number
(
item
.
mtd_npat_mb
)
let
persenNPATMB
=
0
if
(
mtd_npat_mb
<
0
)
{
if
(
mtd_npat_act
>=
mtd_npat_mb
)
{
persenNPATMB
=
(
mtd_npat_mb
-
mtd_npat_act
)
/
mtd_npat_mb
+
1
}
else
{
persenNPATMB
=
(
mtd_npat_mb
-
mtd_npat_act
)
/
mtd_npat_mb
}
}
else
{
persenNPATMB
=
mtd_npat_act
/
mtd_npat_mb
}
let
mtd_cf_cfo
=
item
.
mtd_cf_cfo
=
''
?
0
:
Number
(
item
.
mtd_cf_cfo
)
let
mtd_cf_cfi
=
item
.
mtd_cf_cfi
=
''
?
0
:
Number
(
item
.
mtd_cf_cfi
)
let
mtd_cf_cff
=
item
.
mtd_cf_cff
=
''
?
0
:
Number
(
item
.
mtd_cf_cff
)
let
mtd_net_cf
=
mtd_cf_cfo
+
mtd_cf_cfi
+
mtd_cf_cff
let
mtd_os_bank_loan_ki
=
item
.
mtd_os_bank_loan_ki
=
''
?
0
:
Number
(
item
.
mtd_os_bank_loan_ki
)
let
mtd_os_bank_loan_wc
=
item
.
mtd_os_bank_loan_wc
=
''
?
0
:
Number
(
item
.
mtd_os_bank_loan_wc
)
let
mtd_os_bank_loan_others
=
item
.
mtd_os_bank_loan_others
=
''
?
0
:
Number
(
item
.
mtd_os_bank_loan_others
)
let
mtd_os_bank_loan_total
=
mtd_os_bank_loan_ki
+
mtd_os_bank_loan_wc
+
mtd_os_bank_loan_others
let
mtd_fr_ar_days
=
item
.
mtd_fr_ar_days
=
''
?
0
:
Number
(
item
.
mtd_fr_ar_days
)
let
mtd_fr_inv_days
=
item
.
mtd_fr_inv_days
=
''
?
0
:
Number
(
item
.
mtd_fr_inv_days
)
let
mtd_fr_ap_days
=
item
.
mtd_fr_ap_days
=
''
?
0
:
Number
(
item
.
mtd_fr_ap_days
)
let
mtd_fr_ccc
=
mtd_fr_ar_days
+
mtd_fr_inv_days
-
mtd_fr_ap_days
dbMTD
.
push
([
item
.
company_id
,
item
.
parent
,
item
.
parent
,
item
.
level
,
item
.
level
,
item
.
company
_name
,
item
.
item
_name
,
item
.
mtd_
revenue_act
,
item
.
revenue_act
,
item
.
mtd_
revenue_mb
,
item
.
revenue_mb
,
i
sNaN
(
persenRevMB
)
||
persenRevMB
==
'Infinity'
||
persenRevMB
==
'-Infinity'
?
(
item
.
mtd_revenue_mb
==
''
||
item
.
mtd_revenue_mb
==
0
?
-
0
:
0
)
:
(
item
.
mtd_revenue_mb
==
''
||
item
.
mtd_revenue_mb
==
0
?
persenRevMB
*
-
100
:
persenRevMB
*
100
)
,
i
tem
.
revenue_percent_of_mb
,
item
.
mtd_
ebitda_act
,
item
.
ebitda_act
,
item
.
mtd_
ebitda_mb
,
item
.
ebitda_mb
,
i
sNaN
(
persenEbitMB
)
||
persenEbitMB
==
'Infinity'
||
persenEbitMB
==
'-Infinity'
?
(
item
.
mtd_ebitda_mb
==
''
||
item
.
mtd_ebitda_mb
==
0
?
-
0
:
0
)
:
(
item
.
mtd_ebitda_mb
==
''
||
item
.
mtd_ebitda_mb
==
0
?
persenEbitMB
*
-
100
:
persenEbitMB
*
100
)
,
i
tem
.
ebitda_percent_of_mb
,
item
.
mtd_
tpat_act
,
item
.
tpat_act
,
item
.
mtd_
tpat_mb
,
item
.
tpat_mb
,
i
sNaN
(
persenTPATMB
)
||
persenTPATMB
==
'Infinity'
||
persenTPATMB
==
'-Infinity'
?
(
item
.
mtd_tpat_mb
==
''
||
item
.
mtd_tpat_mb
==
0
?
-
0
:
0
)
:
(
item
.
mtd_tpat_mb
==
''
||
item
.
mtd_tpat_mb
==
0
?
persenTPATMB
*
-
100
:
persenTPATMB
*
100
)
,
i
tem
.
tpat_percent_of_mb
,
item
.
mtd_
npat_act
,
item
.
npat_act
,
item
.
mtd_
npat_mb
,
item
.
npat_mb
,
i
sNaN
(
persenNPATMB
)
||
persenNPATMB
==
'Infinity'
||
persenNPATMB
==
'-Infinity'
?
(
item
.
mtd_npat_mb
==
''
||
item
.
mtd_npat_mb
==
0
?
-
0
:
0
)
:
(
item
.
mtd_npat_mb
==
''
||
item
.
mtd_npat_mb
==
0
?
persenNPATMB
*
-
100
:
persenNPATMB
*
100
)
,
i
tem
.
npat_percent_of_mb
,
item
.
mtd_cf
_cfo
,
item
.
cash_flow
_cfo
,
item
.
mtd_cf
_cfi
,
item
.
cash_flow
_cfi
,
item
.
mtd_cf
_cff
,
item
.
cash_flow
_cff
,
mtd_net
_cf
,
item
.
cash_flow
_cf
,
item
.
mtd_
os_bank_loan_ki
,
item
.
os_bank_loan_ki
,
item
.
mtd_
os_bank_loan_wc
,
item
.
os_bank_loan_wc
,
item
.
mtd_os_bank_loan_others
,
item
.
os_bank_loan_other
,
mtd_
os_bank_loan_total
,
item
.
os_bank_loan_total
,
item
.
mtd_
os_shl
,
item
.
os_shl
,
item
.
mtd_bs
_cash_bank
,
item
.
balance_sheet
_cash_bank
,
item
.
mtd_bs
_ca
,
item
.
balance_sheet
_ca
,
item
.
mtd_bs
_cl
,
item
.
balance_sheet
_cl
,
item
.
mtd_bs_equil
ity
,
item
.
balance_sheet_equ
ity
,
item
.
mtd_fr
_cr
,
item
.
ratio
_cr
,
item
.
mtd_fr
_der
,
item
.
ratio
_der
,
item
.
mtd_fr_debt
_ebitda
,
item
.
ratio_debt_to
_ebitda
,
item
.
mtd_fr
_interest
,
item
.
ratio_to
_interest
,
item
.
mtd_fr
_ar_days
,
item
.
ratio
_ar_days
,
item
.
mtd_fr
_inv_days
,
item
.
ratio
_inv_days
,
item
.
mtd_fr
_ap_days
,
item
.
ratio
_ap_days
,
mtd_fr
_ccc
,
item
.
ratio
_ccc
,
item
.
order
,
item
.
order
,
])
])
}
}
...
@@ -337,115 +265,45 @@ export default class SummaryOfTriputra extends Component {
...
@@ -337,115 +265,45 @@ export default class SummaryOfTriputra extends Component {
}
}
}
}
res
.
map
((
item
,
index
)
=>
{
res
.
map
((
item
,
index
)
=>
{
let
mtd_revenue_act
=
item
.
mtd_revenue_act
=
''
?
0
:
Number
(
item
.
mtd_revenue_act
)
dataTable
.
push
([
let
mtd_revenue_mb
=
item
.
mtd_revenue_mb
=
''
?
0
:
Number
(
item
.
mtd_revenue_mb
)
// item.company_id,
let
persenRevMB
=
0
0
,
if
(
mtd_revenue_mb
<
0
)
{
if
(
mtd_revenue_act
>=
mtd_revenue_mb
)
{
persenRevMB
=
(
mtd_revenue_mb
-
mtd_revenue_act
)
/
mtd_revenue_mb
+
1
}
else
{
persenRevMB
=
(
mtd_revenue_mb
-
mtd_revenue_act
)
/
mtd_revenue_mb
}
}
else
{
persenRevMB
=
mtd_revenue_act
/
mtd_revenue_mb
}
let
mtd_ebitda_act
=
item
.
mtd_ebitda_act
=
''
?
0
:
Number
(
item
.
mtd_ebitda_act
)
let
mtd_ebitda_mb
=
item
.
mtd_ebitda_mb
=
''
?
0
:
Number
(
item
.
mtd_ebitda_mb
)
let
persenEbitMB
=
0
if
(
mtd_ebitda_mb
<
0
)
{
if
(
mtd_ebitda_act
>=
mtd_ebitda_mb
)
{
persenEbitMB
=
(
mtd_ebitda_mb
-
mtd_ebitda_act
)
/
mtd_ebitda_mb
+
1
}
else
{
persenEbitMB
=
(
mtd_ebitda_mb
-
mtd_ebitda_act
)
/
mtd_ebitda_mb
}
}
else
{
persenEbitMB
=
mtd_ebitda_act
/
mtd_ebitda_mb
}
let
mtd_tpat_act
=
item
.
mtd_tpat_act
=
''
?
0
:
Number
(
item
.
mtd_tpat_act
)
let
mtd_tpat_mb
=
item
.
mtd_tpat_mb
=
''
?
0
:
Number
(
item
.
mtd_tpat_mb
)
let
persenTPATMB
=
0
if
(
mtd_tpat_mb
<
0
)
{
if
(
mtd_tpat_act
>=
mtd_tpat_mb
)
{
persenTPATMB
=
(
mtd_tpat_mb
-
mtd_tpat_act
)
/
mtd_tpat_mb
+
1
}
else
{
persenTPATMB
=
(
mtd_tpat_mb
-
mtd_tpat_act
)
/
mtd_tpat_mb
}
}
else
{
persenTPATMB
=
mtd_tpat_act
/
mtd_tpat_mb
}
let
mtd_npat_act
=
item
.
mtd_npat_act
=
''
?
0
:
Number
(
item
.
mtd_npat_act
)
let
mtd_npat_mb
=
item
.
mtd_npat_mb
=
''
?
0
:
Number
(
item
.
mtd_npat_mb
)
let
persenNPATMB
=
0
if
(
mtd_npat_mb
<
0
)
{
if
(
mtd_npat_act
>=
mtd_npat_mb
)
{
persenNPATMB
=
(
mtd_npat_mb
-
mtd_npat_act
)
/
mtd_npat_mb
+
1
}
else
{
persenNPATMB
=
(
mtd_npat_mb
-
mtd_npat_act
)
/
mtd_npat_mb
}
}
else
{
persenNPATMB
=
mtd_npat_act
/
mtd_npat_mb
}
let
mtd_cf_cfo
=
item
.
mtd_cf_cfo
=
''
?
0
:
Number
(
item
.
mtd_cf_cfo
)
let
mtd_cf_cfi
=
item
.
mtd_cf_cfi
=
''
?
0
:
Number
(
item
.
mtd_cf_cfi
)
let
mtd_cf_cff
=
item
.
mtd_cf_cff
=
''
?
0
:
Number
(
item
.
mtd_cf_cff
)
let
mtd_net_cf
=
mtd_cf_cfo
+
mtd_cf_cfi
+
mtd_cf_cff
let
mtd_os_bank_loan_ki
=
item
.
mtd_os_bank_loan_ki
=
''
?
0
:
Number
(
item
.
mtd_os_bank_loan_ki
)
let
mtd_os_bank_loan_wc
=
item
.
mtd_os_bank_loan_wc
=
''
?
0
:
Number
(
item
.
mtd_os_bank_loan_wc
)
let
mtd_os_bank_loan_others
=
item
.
mtd_os_bank_loan_others
=
''
?
0
:
Number
(
item
.
mtd_os_bank_loan_others
)
let
mtd_os_bank_loan_total
=
mtd_os_bank_loan_ki
+
mtd_os_bank_loan_wc
+
mtd_os_bank_loan_others
let
mtd_fr_ar_days
=
item
.
mtd_fr_ar_days
=
''
?
0
:
Number
(
item
.
mtd_fr_ar_days
)
let
mtd_fr_inv_days
=
item
.
mtd_fr_inv_days
=
''
?
0
:
Number
(
item
.
mtd_fr_inv_days
)
let
mtd_fr_ap_days
=
item
.
mtd_fr_ap_days
=
''
?
0
:
Number
(
item
.
mtd_fr_ap_days
)
let
mtd_fr_ccc
=
mtd_fr_ar_days
+
mtd_fr_inv_days
-
mtd_fr_ap_days
dbMTD
.
push
([
item
.
company_id
,
item
.
parent
,
item
.
parent
,
item
.
level
,
item
.
level
,
item
.
company
_name
,
item
.
item
_name
,
item
.
mtd_
revenue_act
,
item
.
revenue_act
,
item
.
mtd_
revenue_mb
,
item
.
revenue_mb
,
i
sNaN
(
persenRevMB
)
||
persenRevMB
==
'Infinity'
||
persenRevMB
==
'-Infinity'
?
(
item
.
mtd_revenue_mb
==
''
||
item
.
mtd_revenue_mb
==
0
?
-
0
:
0
)
:
(
item
.
mtd_revenue_mb
==
''
||
item
.
mtd_revenue_mb
==
0
?
persenRevMB
*
-
100
:
persenRevMB
*
100
)
,
i
tem
.
revenue_percent_of_mb
,
item
.
mtd_
ebitda_act
,
item
.
ebitda_act
,
item
.
mtd_
ebitda_mb
,
item
.
ebitda_mb
,
i
sNaN
(
persenEbitMB
)
||
persenEbitMB
==
'Infinity'
||
persenEbitMB
==
'-Infinity'
?
(
item
.
mtd_ebitda_mb
==
''
||
item
.
mtd_ebitda_mb
==
0
?
-
0
:
0
)
:
(
item
.
mtd_ebitda_mb
==
''
||
item
.
mtd_ebitda_mb
==
0
?
persenEbitMB
*
-
100
:
persenEbitMB
*
100
)
,
i
tem
.
ebitda_percent_of_mb
,
item
.
mtd_
tpat_act
,
item
.
tpat_act
,
item
.
mtd_
tpat_mb
,
item
.
tpat_mb
,
i
sNaN
(
persenTPATMB
)
||
persenTPATMB
==
'Infinity'
||
persenTPATMB
==
'-Infinity'
?
(
item
.
mtd_tpat_mb
==
''
||
item
.
mtd_tpat_mb
==
0
?
-
0
:
0
)
:
(
item
.
mtd_tpat_mb
==
''
||
item
.
mtd_tpat_mb
==
0
?
persenTPATMB
*
-
100
:
persenTPATMB
*
100
)
,
i
tem
.
tpat_percent_of_mb
,
item
.
mtd_
npat_act
,
item
.
npat_act
,
item
.
mtd_
npat_mb
,
item
.
npat_mb
,
i
sNaN
(
persenNPATMB
)
||
persenNPATMB
==
'Infinity'
||
persenNPATMB
==
'-Infinity'
?
(
item
.
mtd_npat_mb
==
''
||
item
.
mtd_npat_mb
==
0
?
-
0
:
0
)
:
(
item
.
mtd_npat_mb
==
''
||
item
.
mtd_npat_mb
==
0
?
persenNPATMB
*
-
100
:
persenNPATMB
*
100
)
,
i
tem
.
npat_percent_of_mb
,
item
.
mtd_cf
_cfo
,
item
.
cash_flow
_cfo
,
item
.
mtd_cf
_cfi
,
item
.
cash_flow
_cfi
,
item
.
mtd_cf
_cff
,
item
.
cash_flow
_cff
,
mtd_net
_cf
,
item
.
cash_flow
_cf
,
item
.
mtd_
os_bank_loan_ki
,
item
.
os_bank_loan_ki
,
item
.
mtd_
os_bank_loan_wc
,
item
.
os_bank_loan_wc
,
item
.
mtd_os_bank_loan_others
,
item
.
os_bank_loan_other
,
mtd_
os_bank_loan_total
,
item
.
os_bank_loan_total
,
item
.
mtd_
os_shl
,
item
.
os_shl
,
item
.
mtd_bs
_cash_bank
,
item
.
balance_sheet
_cash_bank
,
item
.
mtd_bs
_ca
,
item
.
balance_sheet
_ca
,
item
.
mtd_bs
_cl
,
item
.
balance_sheet
_cl
,
item
.
mtd_bs_equil
ity
,
item
.
balance_sheet_equ
ity
,
item
.
mtd_fr
_cr
,
item
.
ratio
_cr
,
item
.
mtd_fr
_der
,
item
.
ratio
_der
,
item
.
mtd_fr_debt
_ebitda
,
item
.
ratio_debt_to
_ebitda
,
item
.
mtd_fr
_interest
,
item
.
ratio_to
_interest
,
item
.
mtd_fr
_ar_days
,
item
.
ratio
_ar_days
,
item
.
mtd_fr
_inv_days
,
item
.
ratio
_inv_days
,
item
.
mtd_fr
_ap_days
,
item
.
ratio
_ap_days
,
mtd_fr
_ccc
,
item
.
ratio
_ccc
,
item
.
order
,
item
.
order
,
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
@@ -456,8 +314,8 @@ export default class SummaryOfTriputra extends Component {
...
@@ -456,8 +314,8 @@ export default class SummaryOfTriputra extends Component {
}
}
}
}
})
})
console
.
log
(
d
bMTD
)
console
.
log
(
d
ataTable
)
this
.
setState
({
dataTable
:
dbMTD
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
}
else
{
}
else
{
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
}
}
...
@@ -468,7 +326,7 @@ export default class SummaryOfTriputra extends Component {
...
@@ -468,7 +326,7 @@ export default class SummaryOfTriputra extends Component {
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
[
0
]
===
item
.
company_id
)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
0
]
===
item
.
company_id
)
if
(
indexIDzz
===
-
1
)
{
if
(
indexIDzz
===
-
1
)
{
...
@@ -677,66 +535,67 @@ export default class SummaryOfTriputra extends Component {
...
@@ -677,66 +535,67 @@ export default class SummaryOfTriputra extends Component {
}
}
dataTable
.
push
([
dataTable
.
push
([
item
.
company_id
,
// item.company_id,
0
,
item
.
parent
,
item
.
parent
,
item
.
level
,
item
.
level
,
item
.
company
_name
,
item
.
item
_name
,
item
.
revenue_ytd_act
,
item
.
revenue_ytd_act
,
item
.
revenue_ytd_mb
,
item
.
revenue_ytd_mb
,
//
item.revenue_ytd_percent_of_mb,
item
.
revenue_ytd_percent_of_mb
,
isNaN
(
revenueYtdPersenMB
)
||
revenueYtdPersenMB
==
'Infinity'
||
revenueYtdPersenMB
==
'-Infinity'
?
(
item
.
revenue_ytd_mb
==
''
||
item
.
revenue_ytd_mb
==
0
?
-
0
:
0
)
:
(
item
.
revenue_ytd_mb
==
''
||
item
.
revenue_ytd_mb
==
0
?
Number
(
revenueYtdPersenMB
)
*
Number
(
-
100
)
:
Number
(
revenueYtdPersenMB
)
*
Number
(
100
)
),
//
isNaN(revenueYtdPersenMB) || revenueYtdPersenMB == 'Infinity' || revenueYtdPersenMB == '-Infinity' ? ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? -0 : 0 ) : ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? Number(revenueYtdPersenMB) * Number(-100) : Number(revenueYtdPersenMB) * Number(100) ),
item
.
revenue_ytd_last_year
,
item
.
revenue_ytd_last_year
,
//
item.revenue_ytd_percent_of_last_year,
item
.
revenue_ytd_percent_of_last_year
,
isNaN
(
revenueYtdPersenLY
)
||
revenueYtdPersenLY
==
'Infinity'
||
revenueYtdPersenLY
==
'-Infinity'
?
(
item
.
revenue_ytd_last_year
==
''
||
item
.
revenue_ytd_last_year
==
0
?
-
0
:
0
)
:
(
item
.
revenue_ytd_last_year
==
''
||
item
.
revenue_ytd_last_year
==
0
?
Number
(
revenueYtdPersenLY
)
*
Number
(
-
100
)
:
Number
(
revenueYtdPersenLY
)
*
Number
(
100
)
),
//
isNaN(revenueYtdPersenLY) || revenueYtdPersenLY == 'Infinity' || revenueYtdPersenLY == '-Infinity' ? ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? -0 : 0 ) : ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? Number(revenueYtdPersenLY) * Number(-100) : Number(revenueYtdPersenLY) * Number(100) ),
item
.
revenue_fy_ol
,
item
.
revenue_fy_ol
,
item
.
revenue_fy_mb
,
item
.
revenue_fy_mb
,
//
item.revenue_fy_percent_of_mb,
item
.
revenue_fy_percent_of_mb
,
isNaN
(
revenueFyPersenMB
)
||
revenueFyPersenMB
==
'Infinity'
||
revenueFyPersenMB
==
'-Infinity'
?
(
item
.
revenue_fy_mb
==
''
||
item
.
revenue_fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
revenue_fy_mb
==
''
||
item
.
revenue_fy_mb
==
0
?
Number
(
revenueFyPersenMB
)
*
Number
(
-
100
)
:
Number
(
revenueFyPersenMB
)
*
Number
(
100
)
),
//
isNaN(revenueFyPersenMB) || revenueFyPersenMB == 'Infinity' || revenueFyPersenMB == '-Infinity' ? ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? -0 : 0 ) : ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? Number(revenueFyPersenMB) * Number(-100) : Number(revenueFyPersenMB) * Number(100) ),
item
.
revenue_fy_last_year
,
item
.
revenue_fy_last_year
,
//
item.revenue_fy_percent_of_last_year,
item
.
revenue_fy_percent_of_last_year
,
isNaN
(
revenueFyPersenLY
)
||
revenueFyPersenLY
==
'Infinity'
||
revenueFyPersenLY
==
'-Infinity'
?
(
item
.
revenue_fy_last_year
==
''
||
item
.
revenue_fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
revenue_fy_last_year
==
''
||
item
.
revenue_fy_last_year
==
0
?
Number
(
revenueFyPersenLY
)
*
Number
(
-
100
)
:
Number
(
revenueFyPersenLY
)
*
Number
(
100
)
),
//
isNaN(revenueFyPersenLY) || revenueFyPersenLY == 'Infinity' || revenueFyPersenLY == '-Infinity' ? ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? -0 : 0 ) : ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? Number(revenueFyPersenLY) * Number(-100) : Number(revenueFyPersenLY) * Number(100) ),
item
.
ebitda_ytd_act
,
item
.
ebitda_ytd_act
,
item
.
ebitda_ytd_mb
,
item
.
ebitda_ytd_mb
,
//
item.ebitda_ytd_percent_of_mb,
item
.
ebitda_ytd_percent_of_mb
,
isNaN
(
ebitdaYtdPersenMB
)
||
ebitdaYtdPersenMB
==
'Infinity'
||
ebitdaYtdPersenMB
==
'-Infinity'
?
(
item
.
ebitda_ytd_mb
==
''
||
item
.
ebitda_ytd_mb
==
0
?
-
0
:
0
)
:
(
item
.
ebitda_ytd_mb
==
''
||
item
.
ebitda_ytd_mb
==
0
?
Number
(
ebitdaYtdPersenMB
)
*
Number
(
-
100
)
:
Number
(
ebitdaYtdPersenMB
)
*
Number
(
100
)
),
//
isNaN(ebitdaYtdPersenMB) || ebitdaYtdPersenMB == 'Infinity' || ebitdaYtdPersenMB == '-Infinity' ? ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? -0 : 0 ) : ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? Number(ebitdaYtdPersenMB) * Number(-100) : Number(ebitdaYtdPersenMB) * Number(100) ),
item
.
ebitda_ytd_last_year
,
item
.
ebitda_ytd_last_year
,
//
item.ebitda_ytd_percent_of_last_year,
item
.
ebitda_ytd_percent_of_last_year
,
isNaN
(
ebitdaYtdPersenLY
)
||
ebitdaYtdPersenLY
==
'Infinity'
||
ebitdaYtdPersenLY
==
'-Infinity'
?
(
item
.
ebitda_ytd_last_year
==
''
||
item
.
ebitda_ytd_last_year
==
0
?
-
0
:
0
)
:
(
item
.
ebitda_ytd_last_year
==
''
||
item
.
ebitda_ytd_last_year
==
0
?
Number
(
ebitdaYtdPersenLY
)
*
Number
(
-
100
)
:
Number
(
ebitdaYtdPersenLY
)
*
Number
(
100
)
),
//
isNaN(ebitdaYtdPersenLY) || ebitdaYtdPersenLY == 'Infinity' || ebitdaYtdPersenLY == '-Infinity' ? ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? -0 : 0 ) : ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? Number(ebitdaYtdPersenLY) * Number(-100) : Number(ebitdaYtdPersenLY) * Number(100) ),
item
.
ebitda_fy_ol
,
item
.
ebitda_fy_ol
,
item
.
ebitda_fy_mb
,
item
.
ebitda_fy_mb
,
//
item.ebitda_fy_percent_of_mb,
item
.
ebitda_fy_percent_of_mb
,
isNaN
(
ebitdaFyPersenMB
)
||
ebitdaFyPersenMB
==
'Infinity'
||
ebitdaFyPersenMB
==
'-Infinity'
?
(
item
.
ebitda_fy_mb
==
''
||
item
.
ebitda_fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
ebitda_fy_mb
==
''
||
item
.
ebitda_fy_mb
==
0
?
Number
(
ebitdaFyPersenMB
)
*
Number
(
-
100
)
:
Number
(
ebitdaFyPersenMB
)
*
Number
(
100
)
),
//
isNaN(ebitdaFyPersenMB) || ebitdaFyPersenMB == 'Infinity' || ebitdaFyPersenMB == '-Infinity' ? ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? -0 : 0 ) : ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? Number(ebitdaFyPersenMB) * Number(-100) : Number(ebitdaFyPersenMB) * Number(100) ),
item
.
ebitda_fy_last_year
,
item
.
ebitda_fy_last_year
,
//
item.ebitda_fy_percent_of_last_year,
item
.
ebitda_fy_percent_of_last_year
,
isNaN
(
ebitdaFyPersenLY
)
||
ebitdaFyPersenLY
==
'Infinity'
||
ebitdaFyPersenLY
==
'-Infinity'
?
(
item
.
ebitda_fy_last_year
==
''
||
item
.
ebitda_fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
ebitda_fy_last_year
==
''
||
item
.
ebitda_fy_last_year
==
0
?
Number
(
ebitdaFyPersenLY
)
*
Number
(
-
100
)
:
Number
(
ebitdaFyPersenLY
)
*
Number
(
100
)
),
//
isNaN(ebitdaFyPersenLY) || ebitdaFyPersenLY == 'Infinity' || ebitdaFyPersenLY == '-Infinity' ? ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? -0 : 0 ) : ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? Number(ebitdaFyPersenLY) * Number(-100) : Number(ebitdaFyPersenLY) * Number(100) ),
item
.
tpat_ytd_act
,
item
.
tpat_ytd_act
,
item
.
tpat_ytd_mb
,
item
.
tpat_ytd_mb
,
//
item.tpat_ytd_percent_of_mb,
item
.
tpat_ytd_percent_of_mb
,
isNaN
(
tpatYtdPersenMB
)
||
tpatYtdPersenMB
==
'Infinity'
||
tpatYtdPersenMB
==
'-Infinity'
?
(
item
.
tpat_ytd_mb
==
''
||
item
.
tpat_ytd_mb
==
0
?
-
0
:
0
)
:
(
item
.
tpat_ytd_mb
==
''
||
item
.
tpat_ytd_mb
==
0
?
Number
(
tpatYtdPersenMB
)
*
Number
(
-
100
)
:
Number
(
tpatYtdPersenMB
)
*
Number
(
100
)
),
//
isNaN(tpatYtdPersenMB) || tpatYtdPersenMB == 'Infinity' || tpatYtdPersenMB == '-Infinity' ? ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? -0 : 0 ) : ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? Number(tpatYtdPersenMB) * Number(-100) : Number(tpatYtdPersenMB) * Number(100) ),
item
.
tpat_ytd_last_year
,
item
.
tpat_ytd_last_year
,
//
item.tpat_ytd_percent_of_last_year,
item
.
tpat_ytd_percent_of_last_year
,
isNaN
(
tpatYtdPersenLY
)
||
tpatYtdPersenLY
==
'Infinity'
||
tpatYtdPersenLY
==
'-Infinity'
?
(
item
.
tpat_ytd_last_year
==
''
||
item
.
tpat_ytd_last_year
==
0
?
-
0
:
0
)
:
(
item
.
tpat_ytd_last_year
==
''
||
item
.
tpat_ytd_last_year
==
0
?
Number
(
tpatYtdPersenLY
)
*
Number
(
-
100
)
:
Number
(
tpatYtdPersenLY
)
*
Number
(
100
)
),
//
isNaN(tpatYtdPersenLY) || tpatYtdPersenLY == 'Infinity' || tpatYtdPersenLY == '-Infinity' ? ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? -0 : 0 ) : ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? Number(tpatYtdPersenLY) * Number(-100) : Number(tpatYtdPersenLY) * Number(100) ),
item
.
tpat_fy_ol
,
item
.
tpat_fy_ol
,
item
.
tpat_fy_mb
,
item
.
tpat_fy_mb
,
//
item.tpat_fy_percent_of_mb,
item
.
tpat_fy_percent_of_mb
,
isNaN
(
tpatFyPersenMB
)
||
tpatFyPersenMB
==
'Infinity'
||
tpatFyPersenMB
==
'-Infinity'
?
(
item
.
tpat_fy_mb
==
''
||
item
.
tpat_fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
tpat_fy_mb
==
''
||
item
.
tpat_fy_mb
==
0
?
Number
(
tpatFyPersenMB
)
*
Number
(
-
100
)
:
Number
(
tpatFyPersenMB
)
*
Number
(
100
)
),
//
isNaN(tpatFyPersenMB) || tpatFyPersenMB == 'Infinity' || tpatFyPersenMB == '-Infinity' ? ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? -0 : 0 ) : ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? Number(tpatFyPersenMB) * Number(-100) : Number(tpatFyPersenMB) * Number(100) ),
item
.
tpat_fy_last_year
,
item
.
tpat_fy_last_year
,
//
item.tpat_fy_percent_of_last_year,
item
.
tpat_fy_percent_of_last_year
,
isNaN
(
tpatFyPersenLY
)
||
tpatFyPersenLY
==
'Infinity'
||
tpatFyPersenLY
==
'-Infinity'
?
(
item
.
tpat_fy_last_year
==
''
||
item
.
tpat_fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
tpat_fy_last_year
==
''
||
item
.
tpat_fy_last_year
==
0
?
Number
(
tpatFyPersenLY
)
*
Number
(
-
100
)
:
Number
(
tpatFyPersenLY
)
*
Number
(
100
)
),
//
isNaN(tpatFyPersenLY) || tpatFyPersenLY == 'Infinity' || tpatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(tpatFyPersenLY) * Number(-100) : Number(tpatFyPersenLY) * Number(100) ),
item
.
npat_ytd_act
,
item
.
npat_ytd_act
,
item
.
npat_ytd_mb
,
item
.
npat_ytd_mb
,
//
item.npat_ytd_percent_of_mb,
item
.
npat_ytd_percent_of_mb
,
isNaN
(
npatYtdPersenMB
)
||
npatYtdPersenMB
==
'Infinity'
||
npatYtdPersenMB
==
'-Infinity'
?
(
item
.
npat_ytd_mb
==
''
||
item
.
npat_ytd_mb
==
0
?
-
0
:
0
)
:
(
item
.
npat_ytd_mb
==
''
||
item
.
npat_ytd_mb
==
0
?
Number
(
npatYtdPersenMB
)
*
Number
(
-
100
)
:
Number
(
npatYtdPersenMB
)
*
Number
(
100
)
),
//
isNaN(npatYtdPersenMB) || npatYtdPersenMB == 'Infinity' || npatYtdPersenMB == '-Infinity' ? ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? -0 : 0 ) : ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? Number(npatYtdPersenMB) * Number(-100) : Number(npatYtdPersenMB) * Number(100) ),
item
.
npat_ytd_last_year
,
item
.
npat_ytd_last_year
,
//
item.npat_ytd_percent_of_last_year,
item
.
npat_ytd_percent_of_last_year
,
isNaN
(
npatYtdPersenLY
)
||
npatYtdPersenLY
==
'Infinity'
||
npatYtdPersenLY
==
'-Infinity'
?
(
item
.
npat_ytd_last_year
==
''
||
item
.
npat_ytd_last_year
==
0
?
-
0
:
0
)
:
(
item
.
npat_ytd_last_year
==
''
||
item
.
npat_ytd_last_year
==
0
?
Number
(
npatYtdPersenLY
)
*
Number
(
-
100
)
:
Number
(
npatYtdPersenLY
)
*
Number
(
100
)
),
//
isNaN(npatYtdPersenLY) || npatYtdPersenLY == 'Infinity' || npatYtdPersenLY == '-Infinity' ? ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? -0 : 0 ) : ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? Number(npatYtdPersenLY) * Number(-100) : Number(npatYtdPersenLY) * Number(100) ),
item
.
npat_fy_ol
,
item
.
npat_fy_ol
,
item
.
npat_fy_mb
,
item
.
npat_fy_mb
,
//
item.npat_fy_percent_of_mb,
item
.
npat_fy_percent_of_mb
,
isNaN
(
npatFyPersenMB
)
||
npatFyPersenMB
==
'Infinity'
||
npatFyPersenMB
==
'-Infinity'
?
(
item
.
npat_fy_mb
==
''
||
item
.
npat_fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
npat_fy_mb
==
''
||
item
.
npat_fy_mb
==
0
?
Number
(
npatFyPersenMB
)
*
Number
(
-
100
)
:
Number
(
npatFyPersenMB
)
*
Number
(
100
)
),
//
isNaN(npatFyPersenMB) || npatFyPersenMB == 'Infinity' || npatFyPersenMB == '-Infinity' ? ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? -0 : 0 ) : ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? Number(npatFyPersenMB) * Number(-100) : Number(npatFyPersenMB) * Number(100) ),
item
.
npat_fy_last_year
,
item
.
npat_fy_last_year
,
//
item.npat_fy_percent_of_last_year,
item
.
npat_fy_percent_of_last_year
,
isNaN
(
npatFyPersenLY
)
||
npatFyPersenLY
==
'Infinity'
||
npatFyPersenLY
==
'-Infinity'
?
(
item
.
tpat_fy_last_year
==
''
||
item
.
tpat_fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
tpat_fy_last_year
==
''
||
item
.
tpat_fy_last_year
==
0
?
Number
(
npatFyPersenLY
)
*
Number
(
-
100
)
:
Number
(
npatFyPersenLY
)
*
Number
(
100
)
),
//
isNaN(npatFyPersenLY) || npatFyPersenLY == 'Infinity' || npatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(npatFyPersenLY) * Number(-100) : Number(npatFyPersenLY) * Number(100) ),
item
.
order
,
item
.
order
,
])
])
}
}
...
@@ -954,66 +813,67 @@ export default class SummaryOfTriputra extends Component {
...
@@ -954,66 +813,67 @@ export default class SummaryOfTriputra extends Component {
}
}
dataTable
.
push
([
dataTable
.
push
([
item
.
company_id
,
// item.company_id,
0
,
item
.
parent
,
item
.
parent
,
item
.
level
,
item
.
level
,
item
.
company
_name
,
item
.
item
_name
,
item
.
revenue_ytd_act
,
item
.
revenue_ytd_act
,
item
.
revenue_ytd_mb
,
item
.
revenue_ytd_mb
,
//
item.revenue_ytd_percent_of_mb,
item
.
revenue_ytd_percent_of_mb
,
isNaN
(
revenueYtdPersenMB
)
||
revenueYtdPersenMB
==
'Infinity'
||
revenueYtdPersenMB
==
'-Infinity'
?
(
item
.
revenue_ytd_mb
==
''
||
item
.
revenue_ytd_mb
==
0
?
-
0
:
0
)
:
(
item
.
revenue_ytd_mb
==
''
||
item
.
revenue_ytd_mb
==
0
?
Number
(
revenueYtdPersenMB
)
*
Number
(
-
100
)
:
Number
(
revenueYtdPersenMB
)
*
Number
(
100
)
),
//
isNaN(revenueYtdPersenMB) || revenueYtdPersenMB == 'Infinity' || revenueYtdPersenMB == '-Infinity' ? ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? -0 : 0 ) : ( item.revenue_ytd_mb == '' || item.revenue_ytd_mb == 0 ? Number(revenueYtdPersenMB) * Number(-100) : Number(revenueYtdPersenMB) * Number(100) ),
item
.
revenue_ytd_last_year
,
item
.
revenue_ytd_last_year
,
//
item.revenue_ytd_percent_of_last_year,
item
.
revenue_ytd_percent_of_last_year
,
isNaN
(
revenueYtdPersenLY
)
||
revenueYtdPersenLY
==
'Infinity'
||
revenueYtdPersenLY
==
'-Infinity'
?
(
item
.
revenue_ytd_last_year
==
''
||
item
.
revenue_ytd_last_year
==
0
?
-
0
:
0
)
:
(
item
.
revenue_ytd_last_year
==
''
||
item
.
revenue_ytd_last_year
==
0
?
Number
(
revenueYtdPersenLY
)
*
Number
(
-
100
)
:
Number
(
revenueYtdPersenLY
)
*
Number
(
100
)
),
//
isNaN(revenueYtdPersenLY) || revenueYtdPersenLY == 'Infinity' || revenueYtdPersenLY == '-Infinity' ? ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? -0 : 0 ) : ( item.revenue_ytd_last_year == '' || item.revenue_ytd_last_year == 0 ? Number(revenueYtdPersenLY) * Number(-100) : Number(revenueYtdPersenLY) * Number(100) ),
item
.
revenue_fy_ol
,
item
.
revenue_fy_ol
,
item
.
revenue_fy_mb
,
item
.
revenue_fy_mb
,
//
item.revenue_fy_percent_of_mb,
item
.
revenue_fy_percent_of_mb
,
isNaN
(
revenueFyPersenMB
)
||
revenueFyPersenMB
==
'Infinity'
||
revenueFyPersenMB
==
'-Infinity'
?
(
item
.
revenue_fy_mb
==
''
||
item
.
revenue_fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
revenue_fy_mb
==
''
||
item
.
revenue_fy_mb
==
0
?
Number
(
revenueFyPersenMB
)
*
Number
(
-
100
)
:
Number
(
revenueFyPersenMB
)
*
Number
(
100
)
),
//
isNaN(revenueFyPersenMB) || revenueFyPersenMB == 'Infinity' || revenueFyPersenMB == '-Infinity' ? ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? -0 : 0 ) : ( item.revenue_fy_mb == '' || item.revenue_fy_mb == 0 ? Number(revenueFyPersenMB) * Number(-100) : Number(revenueFyPersenMB) * Number(100) ),
item
.
revenue_fy_last_year
,
item
.
revenue_fy_last_year
,
//
item.revenue_fy_percent_of_last_year,
item
.
revenue_fy_percent_of_last_year
,
isNaN
(
revenueFyPersenLY
)
||
revenueFyPersenLY
==
'Infinity'
||
revenueFyPersenLY
==
'-Infinity'
?
(
item
.
revenue_fy_last_year
==
''
||
item
.
revenue_fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
revenue_fy_last_year
==
''
||
item
.
revenue_fy_last_year
==
0
?
Number
(
revenueFyPersenLY
)
*
Number
(
-
100
)
:
Number
(
revenueFyPersenLY
)
*
Number
(
100
)
),
//
isNaN(revenueFyPersenLY) || revenueFyPersenLY == 'Infinity' || revenueFyPersenLY == '-Infinity' ? ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? -0 : 0 ) : ( item.revenue_fy_last_year == '' || item.revenue_fy_last_year == 0 ? Number(revenueFyPersenLY) * Number(-100) : Number(revenueFyPersenLY) * Number(100) ),
item
.
ebitda_ytd_act
,
item
.
ebitda_ytd_act
,
item
.
ebitda_ytd_mb
,
item
.
ebitda_ytd_mb
,
//
item.ebitda_ytd_percent_of_mb,
item
.
ebitda_ytd_percent_of_mb
,
isNaN
(
ebitdaYtdPersenMB
)
||
ebitdaYtdPersenMB
==
'Infinity'
||
ebitdaYtdPersenMB
==
'-Infinity'
?
(
item
.
ebitda_ytd_mb
==
''
||
item
.
ebitda_ytd_mb
==
0
?
-
0
:
0
)
:
(
item
.
ebitda_ytd_mb
==
''
||
item
.
ebitda_ytd_mb
==
0
?
Number
(
ebitdaYtdPersenMB
)
*
Number
(
-
100
)
:
Number
(
ebitdaYtdPersenMB
)
*
Number
(
100
)
),
//
isNaN(ebitdaYtdPersenMB) || ebitdaYtdPersenMB == 'Infinity' || ebitdaYtdPersenMB == '-Infinity' ? ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? -0 : 0 ) : ( item.ebitda_ytd_mb == '' || item.ebitda_ytd_mb == 0 ? Number(ebitdaYtdPersenMB) * Number(-100) : Number(ebitdaYtdPersenMB) * Number(100) ),
item
.
ebitda_ytd_last_year
,
item
.
ebitda_ytd_last_year
,
//
item.ebitda_ytd_percent_of_last_year,
item
.
ebitda_ytd_percent_of_last_year
,
isNaN
(
ebitdaYtdPersenLY
)
||
ebitdaYtdPersenLY
==
'Infinity'
||
ebitdaYtdPersenLY
==
'-Infinity'
?
(
item
.
ebitda_ytd_last_year
==
''
||
item
.
ebitda_ytd_last_year
==
0
?
-
0
:
0
)
:
(
item
.
ebitda_ytd_last_year
==
''
||
item
.
ebitda_ytd_last_year
==
0
?
Number
(
ebitdaYtdPersenLY
)
*
Number
(
-
100
)
:
Number
(
ebitdaYtdPersenLY
)
*
Number
(
100
)
),
//
isNaN(ebitdaYtdPersenLY) || ebitdaYtdPersenLY == 'Infinity' || ebitdaYtdPersenLY == '-Infinity' ? ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? -0 : 0 ) : ( item.ebitda_ytd_last_year == '' || item.ebitda_ytd_last_year == 0 ? Number(ebitdaYtdPersenLY) * Number(-100) : Number(ebitdaYtdPersenLY) * Number(100) ),
item
.
ebitda_fy_ol
,
item
.
ebitda_fy_ol
,
item
.
ebitda_fy_mb
,
item
.
ebitda_fy_mb
,
//
item.ebitda_fy_percent_of_mb,
item
.
ebitda_fy_percent_of_mb
,
isNaN
(
ebitdaFyPersenMB
)
||
ebitdaFyPersenMB
==
'Infinity'
||
ebitdaFyPersenMB
==
'-Infinity'
?
(
item
.
ebitda_fy_mb
==
''
||
item
.
ebitda_fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
ebitda_fy_mb
==
''
||
item
.
ebitda_fy_mb
==
0
?
Number
(
ebitdaFyPersenMB
)
*
Number
(
-
100
)
:
Number
(
ebitdaFyPersenMB
)
*
Number
(
100
)
),
//
isNaN(ebitdaFyPersenMB) || ebitdaFyPersenMB == 'Infinity' || ebitdaFyPersenMB == '-Infinity' ? ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? -0 : 0 ) : ( item.ebitda_fy_mb == '' || item.ebitda_fy_mb == 0 ? Number(ebitdaFyPersenMB) * Number(-100) : Number(ebitdaFyPersenMB) * Number(100) ),
item
.
ebitda_fy_last_year
,
item
.
ebitda_fy_last_year
,
//
item.ebitda_fy_percent_of_last_year,
item
.
ebitda_fy_percent_of_last_year
,
isNaN
(
ebitdaFyPersenLY
)
||
ebitdaFyPersenLY
==
'Infinity'
||
ebitdaFyPersenLY
==
'-Infinity'
?
(
item
.
ebitda_fy_last_year
==
''
||
item
.
ebitda_fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
ebitda_fy_last_year
==
''
||
item
.
ebitda_fy_last_year
==
0
?
Number
(
ebitdaFyPersenLY
)
*
Number
(
-
100
)
:
Number
(
ebitdaFyPersenLY
)
*
Number
(
100
)
),
//
isNaN(ebitdaFyPersenLY) || ebitdaFyPersenLY == 'Infinity' || ebitdaFyPersenLY == '-Infinity' ? ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? -0 : 0 ) : ( item.ebitda_fy_last_year == '' || item.ebitda_fy_last_year == 0 ? Number(ebitdaFyPersenLY) * Number(-100) : Number(ebitdaFyPersenLY) * Number(100) ),
item
.
tpat_ytd_act
,
item
.
tpat_ytd_act
,
item
.
tpat_ytd_mb
,
item
.
tpat_ytd_mb
,
//
item.tpat_ytd_percent_of_mb,
item
.
tpat_ytd_percent_of_mb
,
isNaN
(
tpatYtdPersenMB
)
||
tpatYtdPersenMB
==
'Infinity'
||
tpatYtdPersenMB
==
'-Infinity'
?
(
item
.
tpat_ytd_mb
==
''
||
item
.
tpat_ytd_mb
==
0
?
-
0
:
0
)
:
(
item
.
tpat_ytd_mb
==
''
||
item
.
tpat_ytd_mb
==
0
?
Number
(
tpatYtdPersenMB
)
*
Number
(
-
100
)
:
Number
(
tpatYtdPersenMB
)
*
Number
(
100
)
),
//
isNaN(tpatYtdPersenMB) || tpatYtdPersenMB == 'Infinity' || tpatYtdPersenMB == '-Infinity' ? ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? -0 : 0 ) : ( item.tpat_ytd_mb == '' || item.tpat_ytd_mb == 0 ? Number(tpatYtdPersenMB) * Number(-100) : Number(tpatYtdPersenMB) * Number(100) ),
item
.
tpat_ytd_last_year
,
item
.
tpat_ytd_last_year
,
//
item.tpat_ytd_percent_of_last_year,
item
.
tpat_ytd_percent_of_last_year
,
isNaN
(
tpatYtdPersenLY
)
||
tpatYtdPersenLY
==
'Infinity'
||
tpatYtdPersenLY
==
'-Infinity'
?
(
item
.
tpat_ytd_last_year
==
''
||
item
.
tpat_ytd_last_year
==
0
?
-
0
:
0
)
:
(
item
.
tpat_ytd_last_year
==
''
||
item
.
tpat_ytd_last_year
==
0
?
Number
(
tpatYtdPersenLY
)
*
Number
(
-
100
)
:
Number
(
tpatYtdPersenLY
)
*
Number
(
100
)
),
//
isNaN(tpatYtdPersenLY) || tpatYtdPersenLY == 'Infinity' || tpatYtdPersenLY == '-Infinity' ? ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? -0 : 0 ) : ( item.tpat_ytd_last_year == '' || item.tpat_ytd_last_year == 0 ? Number(tpatYtdPersenLY) * Number(-100) : Number(tpatYtdPersenLY) * Number(100) ),
item
.
tpat_fy_ol
,
item
.
tpat_fy_ol
,
item
.
tpat_fy_mb
,
item
.
tpat_fy_mb
,
//
item.tpat_fy_percent_of_mb,
item
.
tpat_fy_percent_of_mb
,
isNaN
(
tpatFyPersenMB
)
||
tpatFyPersenMB
==
'Infinity'
||
tpatFyPersenMB
==
'-Infinity'
?
(
item
.
tpat_fy_mb
==
''
||
item
.
tpat_fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
tpat_fy_mb
==
''
||
item
.
tpat_fy_mb
==
0
?
Number
(
tpatFyPersenMB
)
*
Number
(
-
100
)
:
Number
(
tpatFyPersenMB
)
*
Number
(
100
)
),
//
isNaN(tpatFyPersenMB) || tpatFyPersenMB == 'Infinity' || tpatFyPersenMB == '-Infinity' ? ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? -0 : 0 ) : ( item.tpat_fy_mb == '' || item.tpat_fy_mb == 0 ? Number(tpatFyPersenMB) * Number(-100) : Number(tpatFyPersenMB) * Number(100) ),
item
.
tpat_fy_last_year
,
item
.
tpat_fy_last_year
,
//
item.tpat_fy_percent_of_last_year,
item
.
tpat_fy_percent_of_last_year
,
isNaN
(
tpatFyPersenLY
)
||
tpatFyPersenLY
==
'Infinity'
||
tpatFyPersenLY
==
'-Infinity'
?
(
item
.
tpat_fy_last_year
==
''
||
item
.
tpat_fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
tpat_fy_last_year
==
''
||
item
.
tpat_fy_last_year
==
0
?
Number
(
tpatFyPersenLY
)
*
Number
(
-
100
)
:
Number
(
tpatFyPersenLY
)
*
Number
(
100
)
),
//
isNaN(tpatFyPersenLY) || tpatFyPersenLY == 'Infinity' || tpatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(tpatFyPersenLY) * Number(-100) : Number(tpatFyPersenLY) * Number(100) ),
item
.
npat_ytd_act
,
item
.
npat_ytd_act
,
item
.
npat_ytd_mb
,
item
.
npat_ytd_mb
,
//
item.npat_ytd_percent_of_mb,
item
.
npat_ytd_percent_of_mb
,
isNaN
(
npatYtdPersenMB
)
||
npatYtdPersenMB
==
'Infinity'
||
npatYtdPersenMB
==
'-Infinity'
?
(
item
.
npat_ytd_mb
==
''
||
item
.
npat_ytd_mb
==
0
?
-
0
:
0
)
:
(
item
.
npat_ytd_mb
==
''
||
item
.
npat_ytd_mb
==
0
?
Number
(
npatYtdPersenMB
)
*
Number
(
-
100
)
:
Number
(
npatYtdPersenMB
)
*
Number
(
100
)
),
//
isNaN(npatYtdPersenMB) || npatYtdPersenMB == 'Infinity' || npatYtdPersenMB == '-Infinity' ? ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? -0 : 0 ) : ( item.npat_ytd_mb == '' || item.npat_ytd_mb == 0 ? Number(npatYtdPersenMB) * Number(-100) : Number(npatYtdPersenMB) * Number(100) ),
item
.
npat_ytd_last_year
,
item
.
npat_ytd_last_year
,
//
item.npat_ytd_percent_of_last_year,
item
.
npat_ytd_percent_of_last_year
,
isNaN
(
npatYtdPersenLY
)
||
npatYtdPersenLY
==
'Infinity'
||
npatYtdPersenLY
==
'-Infinity'
?
(
item
.
npat_ytd_last_year
==
''
||
item
.
npat_ytd_last_year
==
0
?
-
0
:
0
)
:
(
item
.
npat_ytd_last_year
==
''
||
item
.
npat_ytd_last_year
==
0
?
Number
(
npatYtdPersenLY
)
*
Number
(
-
100
)
:
Number
(
npatYtdPersenLY
)
*
Number
(
100
)
),
//
isNaN(npatYtdPersenLY) || npatYtdPersenLY == 'Infinity' || npatYtdPersenLY == '-Infinity' ? ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? -0 : 0 ) : ( item.npat_ytd_last_year == '' || item.npat_ytd_last_year == 0 ? Number(npatYtdPersenLY) * Number(-100) : Number(npatYtdPersenLY) * Number(100) ),
item
.
npat_fy_ol
,
item
.
npat_fy_ol
,
item
.
npat_fy_mb
,
item
.
npat_fy_mb
,
//
item.npat_fy_percent_of_mb,
item
.
npat_fy_percent_of_mb
,
isNaN
(
npatFyPersenMB
)
||
npatFyPersenMB
==
'Infinity'
||
npatFyPersenMB
==
'-Infinity'
?
(
item
.
npat_fy_mb
==
''
||
item
.
npat_fy_mb
==
0
?
-
0
:
0
)
:
(
item
.
npat_fy_mb
==
''
||
item
.
npat_fy_mb
==
0
?
Number
(
npatFyPersenMB
)
*
Number
(
-
100
)
:
Number
(
npatFyPersenMB
)
*
Number
(
100
)
),
//
isNaN(npatFyPersenMB) || npatFyPersenMB == 'Infinity' || npatFyPersenMB == '-Infinity' ? ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? -0 : 0 ) : ( item.npat_fy_mb == '' || item.npat_fy_mb == 0 ? Number(npatFyPersenMB) * Number(-100) : Number(npatFyPersenMB) * Number(100) ),
item
.
npat_fy_last_year
,
item
.
npat_fy_last_year
,
//
item.npat_fy_percent_of_last_year,
item
.
npat_fy_percent_of_last_year
,
isNaN
(
npatFyPersenLY
)
||
npatFyPersenLY
==
'Infinity'
||
npatFyPersenLY
==
'-Infinity'
?
(
item
.
tpat_fy_last_year
==
''
||
item
.
tpat_fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
tpat_fy_last_year
==
''
||
item
.
tpat_fy_last_year
==
0
?
Number
(
npatFyPersenLY
)
*
Number
(
-
100
)
:
Number
(
npatFyPersenLY
)
*
Number
(
100
)
),
//
isNaN(npatFyPersenLY) || npatFyPersenLY == 'Infinity' || npatFyPersenLY == '-Infinity' ? ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? -0 : 0 ) : ( item.tpat_fy_last_year == '' || item.tpat_fy_last_year == 0 ? Number(npatFyPersenLY) * Number(-100) : Number(npatFyPersenLY) * Number(100) ),
item
.
order
,
item
.
order
,
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
...
src/container/SummaryTriputra/TableSummaryTriputra.js
View file @
43850742
...
@@ -80,7 +80,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -80,7 +80,7 @@ export default class TableSummaryTriputra extends Component {
name
:
`MTD 2021`
,
name
:
`MTD 2021`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
top
:
0
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-4x"
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"grid grid-4x"
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
65
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
65
}}
>
...
@@ -168,7 +168,6 @@ export default class TableSummaryTriputra extends Component {
...
@@ -168,7 +168,6 @@ export default class TableSummaryTriputra extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
decimalScale
=
{
1
}
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
4
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
4
]).
toFixed
(
1
)}
/
>
/
>
...
@@ -187,7 +186,6 @@ export default class TableSummaryTriputra extends Component {
...
@@ -187,7 +186,6 @@ export default class TableSummaryTriputra extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
decimalScale
=
{
1
}
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
5
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
5
]).
toFixed
(
1
)}
/
>
/
>
...
@@ -206,9 +204,9 @@ export default class TableSummaryTriputra extends Component {
...
@@ -206,9 +204,9 @@ export default class TableSummaryTriputra extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
suffix
=
{
'%'
}
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
6
]).
toFixed
(
2
)}
suffix
=
{
'%'
}
value
=
{
tableMeta
.
rowData
[
6
]}
/
>
/
>
}
}
/
>
/
>
...
@@ -269,7 +267,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -269,7 +267,7 @@ export default class TableSummaryTriputra extends Component {
placeholder
=
""
placeholder
=
""
suffix
=
{
'%'
}
suffix
=
{
'%'
}
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
9
]).
toFixed
(
2
)
}
value
=
{
tableMeta
.
rowData
[
9
]
}
/
>
/
>
}
}
/
>
/
>
...
@@ -330,7 +328,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -330,7 +328,7 @@ export default class TableSummaryTriputra extends Component {
placeholder
=
""
placeholder
=
""
suffix
=
{
'%'
}
suffix
=
{
'%'
}
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
12
]).
toFixed
(
2
)
}
value
=
{
tableMeta
.
rowData
[
12
]
}
/
>
/
>
}
}
/
>
/
>
...
@@ -391,7 +389,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -391,7 +389,7 @@ export default class TableSummaryTriputra extends Component {
placeholder
=
""
placeholder
=
""
suffix
=
{
'%'
}
suffix
=
{
'%'
}
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
15
]).
toFixed
(
2
)
}
value
=
{
tableMeta
.
rowData
[
15
]
}
/
>
/
>
}
}
/
>
/
>
...
@@ -468,7 +466,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -468,7 +466,7 @@ export default class TableSummaryTriputra extends Component {
name
:
`MTD 2021 (OPTIONAL)`
,
name
:
`MTD 2021 (OPTIONAL)`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
top
:
0
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"column-5"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-5"
style
=
{{
...
style2
,
display
:
'flex'
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
65
,
width
:
685
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
,
height
:
65
,
width
:
685
}}
>
...
@@ -1041,26 +1039,6 @@ export default class TableSummaryTriputra extends Component {
...
@@ -1041,26 +1039,6 @@ export default class TableSummaryTriputra extends Component {
options
:
{
options
:
{
display
:
false
display
:
false
}
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
}
}
]
]
...
@@ -1217,7 +1195,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -1217,7 +1195,7 @@ export default class TableSummaryTriputra extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
6
]).
toFixed
(
1
)
}
value
=
{
tableMeta
.
rowData
[
6
]
}
/
>
/
>
}
}
/
>
/
>
...
@@ -1249,7 +1227,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -1249,7 +1227,7 @@ export default class TableSummaryTriputra extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
8
]).
toFixed
(
1
)
}
value
=
{
tableMeta
.
rowData
[
8
]
}
/
>
/
>
}
}
/
>
/
>
...
@@ -1299,7 +1277,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -1299,7 +1277,7 @@ export default class TableSummaryTriputra extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
11
]).
toFixed
(
1
)
}
value
=
{
tableMeta
.
rowData
[
11
]
}
/
>
/
>
}
}
/
>
/
>
...
@@ -1333,7 +1311,7 @@ export default class TableSummaryTriputra extends Component {
...
@@ -1333,7 +1311,7 @@ export default class TableSummaryTriputra extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
13
]).
toFixed
(
1
)
}
value
=
{
tableMeta
.
rowData
[
13
]
}
/
>
/
>
}
}
/
>
/
>
...
...
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