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
89aeefde
Commit
89aeefde
authored
Jun 10, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue pl summary
parent
c2bd652e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
14 deletions
+46
-14
SubHolding.js
src/container/Laporan/SubHolding.js
+46
-14
No files found.
src/container/Laporan/SubHolding.js
View file @
89aeefde
...
@@ -2544,16 +2544,34 @@ export default class SubHolding extends Component {
...
@@ -2544,16 +2544,34 @@ export default class SubHolding extends Component {
persenFyLY
=
fy_actual
/
fy_last_year
persenFyLY
=
fy_actual
/
fy_last_year
}
}
let
persenFyOLMB
=
Number
(
fy_ol
/
fy_mb
)
// if (item.id === 3297327) {
// console.log(fy_actual);
// console.log(fy_last_year);
// console.log(persenFyLY);
// }
// let persenFyOLMB = Number(fy_ol/fy_mb)
// if (fy_mb < 0) {
// if (fy_ol >= fy_mb) {
// persenFyLY = (fy_mb - fy_ol) / fy_mb + 1
// } else {
// persenFyLY = (fy_mb - fy_ol) / fy_mb
// }
// }
// else {
// persenFyLY = fy_ol / fy_mb
// }
let
persenFyOLMB
=
0
if
(
fy_mb
<
0
)
{
if
(
fy_mb
<
0
)
{
if
(
fy_ol
>=
fy_mb
)
{
if
(
fy_ol
>=
fy_mb
)
{
persenFy
LY
=
(
fy_mb
-
fy_ol
)
/
fy_mb
+
1
persenFy
OLMB
=
(
fy_mb
-
fy_ol
)
/
fy_mb
+
1
}
else
{
}
else
{
persenFy
LY
=
(
fy_mb
-
fy_ol
)
/
fy_mb
persenFy
OLMB
=
(
fy_mb
-
fy_ol
)
/
fy_mb
}
}
}
}
else
{
else
{
persenFy
LY
=
fy_ol
/
fy_mb
persenFy
OLMB
=
fy_ol
/
fy_mb
}
}
dbSumaPL
.
push
([
dbSumaPL
.
push
([
...
@@ -2752,17 +2770,29 @@ export default class SubHolding extends Component {
...
@@ -2752,17 +2770,29 @@ export default class SubHolding extends Component {
persenFyLY
=
fy_actual
/
fy_last_year
persenFyLY
=
fy_actual
/
fy_last_year
}
}
let
persenFyOLMB
=
Number
(
fy_ol
/
fy_mb
)
// let persenFyOLMB = Number(fy_ol/fy_mb)
if
(
fy_mb
<
0
)
{
// if (fy_mb < 0) {
if
(
fy_ol
>=
fy_mb
)
{
// if (fy_ol >= fy_mb) {
persenFyLY
=
(
fy_mb
-
fy_ol
)
/
fy_mb
+
1
// persenFyLY = (fy_mb - fy_ol) / fy_mb + 1
}
else
{
// } else {
persenFyLY
=
(
fy_mb
-
fy_ol
)
/
fy_mb
// persenFyLY = (fy_mb - fy_ol) / fy_mb
// }
// }
// else {
// persenFyLY = fy_ol / fy_mb
// }
let
persenFyOLMB
=
0
if
(
fy_mb
<
0
)
{
if
(
fy_ol
>=
fy_mb
)
{
persenFyOLMB
=
(
fy_mb
-
fy_ol
)
/
fy_mb
+
1
}
else
{
persenFyOLMB
=
(
fy_mb
-
fy_ol
)
/
fy_mb
}
}
else
{
persenFyOLMB
=
fy_ol
/
fy_mb
}
}
}
else
{
persenFyLY
=
fy_ol
/
fy_mb
}
dbSumaPL
.
push
([
dbSumaPL
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
...
@@ -2806,6 +2836,7 @@ export default class SubHolding extends Component {
...
@@ -2806,6 +2836,7 @@ export default class SubHolding extends Component {
}
}
}
}
})
})
console
.
log
(
dbSumaPL
);
this
.
setState
({
dataTable
:
dbSumaPL
,
loading
:
false
,
previewTable
:
true
,
previewDownload
:
true
})
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
},
()
=>
{
...
@@ -2820,6 +2851,7 @@ export default class SubHolding extends Component {
...
@@ -2820,6 +2851,7 @@ export default class SubHolding extends Component {
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
}
})
})
}
else
if
(
this
.
state
.
report
.
value
===
9
)
{
}
else
if
(
this
.
state
.
report
.
value
===
9
)
{
let
FRID
=
null
let
FRID
=
null
...
...
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