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
5bb015ed
Commit
5bb015ed
authored
Jan 29, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
2211ba91
f8011e9e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
136 additions
and
71 deletions
+136
-71
SubHolding.js
src/container/Laporan/SubHolding.js
+59
-12
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+46
-36
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+31
-23
No files found.
src/container/Laporan/SubHolding.js
View file @
5bb015ed
...
@@ -1364,13 +1364,13 @@ export default class SubHolding extends Component {
...
@@ -1364,13 +1364,13 @@ export default class SubHolding extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
balance_sheet
.
last_month
,
item
.
balance_sheet
.
mtd_
last_month
,
item
.
balance_sheet
.
mtd_actual
,
item
.
balance_sheet
.
mtd_actual
,
item
.
balance_sheet
.
mtd_mb
,
item
.
balance_sheet
.
mtd_mb
,
item
.
balance_sheet
.
percent_of_mb
,
item
.
balance_sheet
.
percent_of_mb
,
item
.
balance_sheet
.
mtd_ol
,
item
.
balance_sheet
.
mtd_ol
,
item
.
balance_sheet
.
percent_of_ol
,
item
.
balance_sheet
.
percent_of_ol
,
item
.
balance_sheet
.
last_year
,
item
.
balance_sheet
.
mtd_
last_year
,
item
.
balance_sheet
.
forecast_next_year
,
item
.
balance_sheet
.
forecast_next_year
,
item
.
balance_sheet
.
forecast_more_year
,
item
.
balance_sheet
.
forecast_more_year
,
item
.
order
item
.
order
...
@@ -1392,7 +1392,7 @@ export default class SubHolding extends Component {
...
@@ -1392,7 +1392,7 @@ export default class SubHolding extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
balance_sheet
.
last_month
,
item
.
balance_sheet
.
mtd_
last_month
,
item
.
balance_sheet
.
mtd_actual
,
item
.
balance_sheet
.
mtd_actual
,
item
.
balance_sheet
.
mtd_mb
,
item
.
balance_sheet
.
mtd_mb
,
item
.
balance_sheet
.
percent_of_mb
,
item
.
balance_sheet
.
percent_of_mb
,
...
@@ -1435,13 +1435,46 @@ export default class SubHolding extends Component {
...
@@ -1435,13 +1435,46 @@ export default class SubHolding extends Component {
if
(
indexIDzz
===
-
1
)
{
if
(
indexIDzz
===
-
1
)
{
let
mtd_actual
=
item
.
profit_loss
.
mtd_actual
==
''
?
0
:
item
.
profit_loss
.
mtd_actual
let
mtd_actual
=
item
.
profit_loss
.
mtd_actual
==
''
?
0
:
item
.
profit_loss
.
mtd_actual
let
mtd_mb
=
item
.
profit_loss
.
mtd_mb
==
''
?
0
:
item
.
profit_loss
.
mtd_mb
let
mtd_mb
=
item
.
profit_loss
.
mtd_mb
==
''
?
0
:
item
.
profit_loss
.
mtd_mb
let
persenMtd
=
Number
(
mtd_actual
/
mtd_mb
)
let
ytd_actual
=
item
.
profit_loss
.
ytd_actual
==
''
?
0
:
item
.
profit_loss
.
ytd_actual
let
persenMtd
=
0
let
ytd_mb
=
item
.
profit_loss
.
ytd_mb
==
''
?
0
:
item
.
profit_loss
.
ytd_mb
if
(
mtd_mb
<
0
)
{
let
ytd_last_year
=
item
.
profit_loss
.
ytd_last_year
==
''
?
0
:
item
.
profit_loss
.
ytd_last_year
if
(
mtd_actual
>=
mtd_mb
)
{
let
persenYtdMB
=
Number
(
ytd_actual
/
ytd_mb
)
persenMtd
=
((
mtd_mb
-
mtd_actual
)
/
mtd_mb
+
1
)
let
persenYtdLY
=
Number
(
ytd_actual
/
ytd_last_year
)
}
else
{
persenMtd
=
((
mtd_mb
-
mtd_actual
)
/
mtd_mb
)
}
}
else
{
persenMtd
=
Number
(
mtd_actual
/
mtd_mb
)
}
let
ytd_actual
=
item
.
profit_loss
.
ytd_actual
==
''
?
0
:
Number
(
item
.
profit_loss
.
ytd_actual
)
let
ytd_mb
=
item
.
profit_loss
.
ytd_mb
==
''
?
0
:
Number
(
item
.
profit_loss
.
ytd_mb
)
let
ytd_last_year
=
item
.
profit_loss
.
ytd_last_year
==
''
?
0
:
Number
(
item
.
profit_loss
.
ytd_last_year
)
let
persenYtdMB
=
0
if
(
ytd_mb
<
0
)
{
if
(
ytd_actual
>=
ytd_mb
)
{
persenYtdMB
=
((
ytd_mb
-
ytd_actual
)
/
ytd_mb
+
1
)
}
else
{
persenYtdMB
=
((
ytd_mb
-
ytd_actual
)
/
ytd_mb
)
}
}
else
{
persenYtdMB
=
Number
(
ytd_actual
/
ytd_mb
)
}
let
persenYtdLY
=
0
if
(
ytd_last_year
<
0
)
{
if
(
ytd_actual
>=
ytd_last_year
)
{
persenYtdLY
=
((
ytd_last_year
-
ytd_actual
)
/
ytd_last_year
+
1
)
}
else
{
persenYtdLY
=
(
ytd_last_year
-
ytd_actual
)
/
ytd_last_year
}
}
else
{
persenYtdLY
=
Number
(
ytd_actual
/
ytd_last_year
)
}
let
q1_actual
=
item
.
profit_loss
.
q1_actual
==
''
?
0
:
item
.
profit_loss
.
q1_actual
let
q1_actual
=
item
.
profit_loss
.
q1_actual
==
''
?
0
:
item
.
profit_loss
.
q1_actual
let
q1_mb
=
item
.
profit_loss
.
q1_mb
==
''
?
0
:
item
.
profit_loss
.
q1_mb
let
q1_mb
=
item
.
profit_loss
.
q1_mb
==
''
?
0
:
item
.
profit_loss
.
q1_mb
...
@@ -1501,9 +1534,20 @@ export default class SubHolding extends Component {
...
@@ -1501,9 +1534,20 @@ export default class SubHolding extends Component {
}
}
}
}
res
.
map
((
item
,
index
)
=>
{
res
.
map
((
item
,
index
)
=>
{
let
mtd_actual
=
item
.
profit_loss
.
mtd_actual
==
''
?
0
:
item
.
profit_loss
.
mtd_actual
let
mtd_actual
=
item
.
profit_loss
.
mtd_actual
==
''
?
0
:
Number
(
item
.
profit_loss
.
mtd_actual
)
let
mtd_mb
=
item
.
profit_loss
.
mtd_mb
==
''
?
0
:
item
.
profit_loss
.
mtd_mb
let
mtd_mb
=
item
.
profit_loss
.
mtd_mb
==
''
?
0
:
Number
(
item
.
profit_loss
.
mtd_mb
)
let
persenMtd
=
Number
(
mtd_actual
/
mtd_mb
)
let
persenMtd
=
0
if
(
mtd_mb
<
0
)
{
if
(
mtd_actual
>=
mtd_mb
)
{
persenMtd
=
((
mtd_mb
-
mtd_actual
)
/
mtd_mb
+
1
)
}
else
{
persenMtd
=
((
mtd_mb
-
mtd_actual
)
/
mtd_mb
)
}
}
else
{
persenMtd
=
Number
(
mtd_actual
/
mtd_mb
)
}
let
ytd_actual
=
item
.
profit_loss
.
ytd_actual
==
''
?
0
:
item
.
profit_loss
.
ytd_actual
let
ytd_actual
=
item
.
profit_loss
.
ytd_actual
==
''
?
0
:
item
.
profit_loss
.
ytd_actual
let
ytd_mb
=
item
.
profit_loss
.
ytd_mb
==
''
?
0
:
item
.
profit_loss
.
ytd_mb
let
ytd_mb
=
item
.
profit_loss
.
ytd_mb
==
''
?
0
:
item
.
profit_loss
.
ytd_mb
...
@@ -1555,6 +1599,9 @@ export default class SubHolding extends Component {
...
@@ -1555,6 +1599,9 @@ export default class SubHolding extends Component {
item
.
profit_loss
.
fy_last_year
,
item
.
profit_loss
.
fy_last_year
,
isNaN
(
persenFyLY
)
||
persenFyLY
==
'Infinity'
||
persenFyLY
==
'-Infinity'
?
(
item
.
profit_loss
.
fy_last_year
==
''
||
item
.
profit_loss
.
fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
fy_last_year
==
''
||
item
.
profit_loss
.
fy_last_year
==
0
?
persenFyLY
*
-
100
:
persenFyLY
*
100
),
isNaN
(
persenFyLY
)
||
persenFyLY
==
'Infinity'
||
persenFyLY
==
'-Infinity'
?
(
item
.
profit_loss
.
fy_last_year
==
''
||
item
.
profit_loss
.
fy_last_year
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
fy_last_year
==
''
||
item
.
profit_loss
.
fy_last_year
==
0
?
persenFyLY
*
-
100
:
persenFyLY
*
100
),
isNaN
(
persenFyOLMB
)
||
persenFyOLMB
==
'Infinity'
||
persenFyOLMB
==
'-Infinity'
?
(
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
''
||
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
''
||
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
0
?
persenFyOLMB
*
-
100
:
persenFyOLMB
*
100
),
isNaN
(
persenFyOLMB
)
||
persenFyOLMB
==
'Infinity'
||
persenFyOLMB
==
'-Infinity'
?
(
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
''
||
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
''
||
item
.
profit_loss
.
fy_percent_ach_ol_to_mb
==
0
?
persenFyOLMB
*
-
100
:
persenFyOLMB
*
100
),
item
.
profit_loss
.
forecast_next_year
,
item
.
profit_loss
.
forecast_more_year
,
item
.
profit_loss
.
notes
,
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
.
length
>
0
)
{
...
...
src/container/Laporan/TableSubHolding.js
View file @
5bb015ed
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
5bb015ed
...
@@ -636,6 +636,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -636,6 +636,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
handleCalculate
(
datatable2
)
{
handleCalculate
(
datatable2
)
{
// console.log(datatable2)
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
let
total
=
0
let
total
=
0
let
perfomanceScore
=
''
let
perfomanceScore
=
''
...
@@ -690,7 +691,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -690,7 +691,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
})
})
}
}
totalScore
=
Number
(
totalScore
).
toFixed
(
0
)
let
totalScorez
=
Number
(
totalScore
).
toFixed
(
0
)
//Score X Weight
//Score X Weight
let
totalSW
=
0
let
totalSW
=
0
...
@@ -703,16 +704,21 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -703,16 +704,21 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
item
[
12
]
==
''
||
String
(
item
[
12
])
==
'0'
||
String
(
item
[
12
])
==
'0.0'
)
{
if
(
item
[
12
]
==
''
||
String
(
item
[
12
])
==
'0'
||
String
(
item
[
12
])
==
'0.0'
)
{
totalSW
=
0
totalSW
=
0
}
else
{
}
else
{
totalSW
=
(
Number
(
totalScore
)
*
Number
(
handlePercent
)
/
1
00
)
totalSW
=
(
Number
(
totalScore
z
)
*
Number
(
handlePercent
)
/
10
00
)
}
}
totalSW
=
Number
(
totalSW
).
toFixed
(
2
)
totalSW
=
Number
(
totalSW
).
toFixed
(
2
)
// console.log(totalSW)
if
(
item
[
0
]
!==
1
&&
item
[
0
]
!==
4
)
{
if
(
item
[
0
]
!==
1
&&
item
[
0
]
!==
4
)
{
total
+=
Number
(
totalSW
)
total
+=
Number
(
totalSW
)
}
}
// console.log(item[5])
// console.log(totalAch);
// console.log(achx100);
// console.log(listParameterFilter);
// console.log(listParameterFilterCompany);
// console.log(totalScorez)
// console.log(totalSW)
// console.log(total)
return
[
return
[
[
item
[
0
],
item
[
0
],
item
[
1
],
item
[
1
],
item
[
2
],
item
[
2
],
...
@@ -727,37 +733,39 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -727,37 +733,39 @@ export default class CorporateAnnualTargetMR extends Component {
item
[
11
],
item
[
11
],
item
[
12
],
item
[
12
],
totalAch
,
totalAch
,
totalScore
,
totalScore
z
,
totalSW
,
totalSW
,
item
[
16
],
item
[
16
],
item
[
17
],
item
[
17
],
item
[
18
],
item
[
18
],
item
[
19
],
//
item[19],
]
//
]
]
]
})
})
console
.
log
(
totalWeight
)
// console.log(totalWeight)
console
.
log
(
total
)
// console.log(total)
console
.
log
(
datatable3
);
// console.log(datatable3);
totalWeight
=
Number
(
totalWeight
)
/
100
let
totalWeightz
=
Number
(
totalWeight
)
/
100
total
=
Number
(
Number
(
total
).
toFixed
(
2
)
/
Number
(
totalWeight
)).
toFixed
(
2
)
let
totalz
=
Number
(
Number
(
total
).
toFixed
(
2
)
/
Number
(
totalWeightz
)).
toFixed
(
2
)
if
(
total
>=
1.00
&&
total
<=
2.00
)
{
let
lastTotal
=
R
.
equals
(
totalz
,
NaN
)
?
0.0
:
totalz
// console.log(Number(Number(total).toFixed(2) / Number(totalWeightz)).toFixed(2))
if
(
lastTotal
>=
1.00
&&
lastTotal
<=
2.00
)
{
perfomanceScore
=
'K'
perfomanceScore
=
'K'
}
else
if
(
total
>=
2.01
&&
t
otal
<=
2.75
)
{
}
else
if
(
lastTotal
>=
2.01
&&
lastT
otal
<=
2.75
)
{
perfomanceScore
=
'C'
perfomanceScore
=
'C'
}
else
if
(
total
>=
2.76
&&
t
otal
<=
3.00
)
{
}
else
if
(
lastTotal
>=
2.76
&&
lastT
otal
<=
3.00
)
{
perfomanceScore
=
'B-'
perfomanceScore
=
'B-'
}
else
if
(
total
>=
3.01
&&
t
otal
<=
3.75
)
{
}
else
if
(
lastTotal
>=
3.01
&&
lastT
otal
<=
3.75
)
{
perfomanceScore
=
'B'
perfomanceScore
=
'B'
}
else
if
(
total
>=
3.76
&&
t
otal
<=
4.00
)
{
}
else
if
(
lastTotal
>=
3.76
&&
lastT
otal
<=
4.00
)
{
perfomanceScore
=
'B+'
perfomanceScore
=
'B+'
}
else
if
(
total
>=
4.01
&&
t
otal
<=
4.75
)
{
}
else
if
(
lastTotal
>=
4.01
&&
lastT
otal
<=
4.75
)
{
perfomanceScore
=
'BS'
perfomanceScore
=
'BS'
}
else
if
(
total
>=
4.76
&&
t
otal
<=
5.00
)
{
}
else
if
(
lastTotal
>=
4.76
&&
lastT
otal
<=
5.00
)
{
perfomanceScore
=
'IST'
perfomanceScore
=
'IST'
}
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
totalScore
:
t
otal
,
perfomanceScore
,
loading
:
false
},
()
=>
{
this
.
setState
({
totalScore
:
lastT
otal
,
perfomanceScore
,
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
...
@@ -1044,10 +1052,10 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1044,10 +1052,10 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
dataTable2
[
tableMeta
.
rowIndex
][
5
]
==
"ROIC"
)
{
if
(
dataTable2
[
tableMeta
.
rowIndex
][
5
]
==
"ROIC"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
0
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
0
}
else
{
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
total
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
Number
(
total
).
toFixed
(
1
)
}
}
return
total
return
Number
(
total
).
toFixed
(
1
)
}
}
const
handleChangeText
=
(
value
,
tableMeta
)
=>
{
const
handleChangeText
=
(
value
,
tableMeta
)
=>
{
...
...
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