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
f8011e9e
Commit
f8011e9e
authored
Jan 29, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
rumush See merge request
!1072
parents
34686707
78c706a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
9 deletions
+53
-9
SubHolding.js
src/container/Laporan/SubHolding.js
+53
-9
No files found.
src/container/Laporan/SubHolding.js
View file @
f8011e9e
...
@@ -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
...
...
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