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
3209b81a
Commit
3209b81a
authored
Jan 26, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lagi
parent
207cdaa4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
SubHolding.js
src/container/Laporan/SubHolding.js
+16
-15
No files found.
src/container/Laporan/SubHolding.js
View file @
3209b81a
...
@@ -1285,20 +1285,20 @@ export default class SubHolding extends Component {
...
@@ -1285,20 +1285,20 @@ export default class SubHolding extends Component {
let
indexIDzz
=
dbSumaPL
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
let
indexIDzz
=
dbSumaPL
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
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
=
item
.
profit_loss
.
mtd
==
''
?
0
:
item
.
profit_loss
.
mtd
let
mtd
_mb
=
item
.
profit_loss
.
mtd_mb
==
''
?
0
:
item
.
profit_loss
.
mtd_mb
let
persenMtd
=
Number
(
mtd_actual
/
mtd
)
let
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
=
item
.
profit_loss
.
ytd
==
''
?
0
:
item
.
profit_loss
.
ytd
let
ytd
_mb
=
item
.
profit_loss
.
ytd_mb
==
''
?
0
:
item
.
profit_loss
.
ytd_mb
let
persenYtd
=
Number
(
ytd_actual
/
ytd
)
let
persenYtd
=
Number
(
ytd_actual
/
ytd
_mb
)
let
q
uarter_actual
=
item
.
profit_loss
.
quarter_actual
==
''
?
0
:
item
.
profit_loss
.
quarter
_actual
let
q
1_actual
=
item
.
profit_loss
.
q1_actual
==
''
?
0
:
item
.
profit_loss
.
q1
_actual
let
q
uarter
=
item
.
profit_loss
.
quarter
==
''
?
0
:
item
.
profit_loss
.
quarter
let
q
1_mb
=
item
.
profit_loss
.
q1_mb
==
''
?
0
:
item
.
profit_loss
.
q1_mb
let
persenQuarter
=
Number
(
q
uarter_actual
/
quarter
)
let
persenQuarter
=
Number
(
q
1_actual
/
q1_mb
)
let
fy_actual
=
item
.
profit_loss
.
fy_actual
==
''
?
0
:
item
.
profit_loss
.
fy_actual
let
fy_actual
=
item
.
profit_loss
.
fy_actual
==
''
?
0
:
item
.
profit_loss
.
fy_actual
let
fy
=
item
.
profit_loss
.
fy
==
''
?
0
:
item
.
profit_loss
.
fy
let
fy
_mb
=
item
.
profit_loss
.
fy_mb
==
''
?
0
:
item
.
profit_loss
.
fy_mb
let
persenFy
=
Number
(
fy_actual
/
fy
)
let
persenFy
=
Number
(
fy_actual
/
fy
_mb
)
dbSumaPL
.
push
([
dbSumaPL
.
push
([
item
.
id
,
item
.
id
,
...
@@ -1348,20 +1348,20 @@ export default class SubHolding extends Component {
...
@@ -1348,20 +1348,20 @@ export default class SubHolding extends Component {
dbSumaPL
.
push
([
dbSumaPL
.
push
([
item
.
id
,
item
.
id
,
item
.
profit_loss
.
mtd_actual
,
item
.
profit_loss
.
mtd_actual
,
item
.
profit_loss
.
mtd
,
item
.
profit_loss
.
mtd
_mb
,
isNaN
(
persenMtd
)
?
0
:
persenMtd
*
100
,
isNaN
(
persenMtd
)
||
persenMtd
==
'Infinity'
||
persenMtd
==
'-Infinity'
?
(
item
.
profit_loss
.
mtd
==
''
||
item
.
profit_loss
.
mtd
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
mtd
==
''
||
item
.
profit_loss
.
mtd
==
0
?
persenMtd
*
-
100
:
persenMtd
*
100
)
,
item
.
profit_loss
.
mtd_last_year
,
item
.
profit_loss
.
mtd_last_year
,
item
.
profit_loss
.
ytd_actual
,
item
.
profit_loss
.
ytd_actual
,
item
.
profit_loss
.
ytd
,
item
.
profit_loss
.
ytd
,
isNaN
(
persenYtd
)
?
0
:
persenYtd
*
100
,
isNaN
(
persenYtd
)
||
persenYtd
==
'Infinity'
||
persenYtd
==
'-Infinity'
?
(
item
.
profit_loss
.
ytd
==
''
||
item
.
profit_loss
.
ytd
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
ytd
==
''
||
item
.
profit_loss
.
ytd
==
0
?
persenYtd
*
-
100
:
persenYtd
*
100
)
,
item
.
profit_loss
.
ytd_last_year
,
item
.
profit_loss
.
ytd_last_year
,
item
.
profit_loss
.
quarter_actual
,
item
.
profit_loss
.
quarter_actual
,
item
.
profit_loss
.
quarter
,
item
.
profit_loss
.
quarter
,
isNaN
(
persenQuarter
)
?
0
:
persenQuarter
*
100
,
isNaN
(
persenQuarter
)
||
persenQuarter
==
'Infinity'
||
persenQuarter
==
'-Infinity'
?
(
item
.
profit_loss
.
quarter
==
''
||
item
.
profit_loss
.
quarter
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
quarter
==
''
||
item
.
profit_loss
.
quarter
==
0
?
persenQuarter
*
-
100
:
persenQuarter
*
100
)
,
item
.
profit_loss
.
quarter_last_year
,
item
.
profit_loss
.
quarter_last_year
,
item
.
profit_loss
.
fy_actual
,
item
.
profit_loss
.
fy_actual
,
item
.
profit_loss
.
fy
,
item
.
profit_loss
.
fy
,
isNaN
(
persenFy
)
?
0
:
persenFy
*
100
,
isNaN
(
persenFy
)
||
persenFy
==
'Infinity'
||
persenFy
==
'-Infinity'
?
(
item
.
profit_loss
.
fy
==
''
||
item
.
profit_loss
.
fy
==
0
?
-
0
:
0
)
:
(
item
.
profit_loss
.
fy
==
''
||
item
.
profit_loss
.
fy
==
0
?
persenFy
*
-
100
:
persenFy
*
100
)
,
item
.
profit_loss
.
fy_last_year
,
item
.
profit_loss
.
fy_last_year
,
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
@@ -1370,8 +1370,9 @@ export default class SubHolding extends Component {
...
@@ -1370,8 +1370,9 @@ export default class SubHolding extends Component {
handlePushChild
(
items
)
handlePushChild
(
items
)
})
})
}
}
}
}
})
})
this
.
setState
({
dataTable
:
dbSumaPL
,
loading
:
false
,
previewTable
:
true
,
previewDownload
:
true
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
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