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
9395c753
Commit
9395c753
authored
Jan 21, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
db ratio See merge request
!1008
parents
bfc78019
ae8a46c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
70 deletions
+70
-70
SubHolding.js
src/container/Laporan/SubHolding.js
+24
-24
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+46
-46
No files found.
src/container/Laporan/SubHolding.js
View file @
9395c753
...
@@ -648,18 +648,18 @@ export default class SubHolding extends Component {
...
@@ -648,18 +648,18 @@ export default class SubHolding extends Component {
// console.log(indexIDzz)
// console.log(indexIDzz)
if
(
indexIDzz
!=
-
1
)
{
if
(
indexIDzz
!=
-
1
)
{
dataTable2
.
push
([...
dataTable
[
indexIDzz
],
dataTable2
.
push
([...
dataTable
[
indexIDzz
],
Number
(
items
.
ratio
.
monthly_january
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_january
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_february
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_february
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_march
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_march
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_april
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_april
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_may
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_may
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_june
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_june
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_july
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_july
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_august
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_august
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_september
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_september
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_october
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_october
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_november
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_november
).
toFixed
(
2
),
Number
(
items
.
ratio
.
monthly_december
).
toFixed
(
1
),
Number
(
items
.
ratio
.
monthly_december
).
toFixed
(
2
),
])
])
}
}
if
(
items
.
children
!==
null
)
{
if
(
items
.
children
!==
null
)
{
...
@@ -672,18 +672,18 @@ export default class SubHolding extends Component {
...
@@ -672,18 +672,18 @@ export default class SubHolding extends Component {
}
}
dataTable2
.
push
([...
dataTable
[
indexID
],
dataTable2
.
push
([...
dataTable
[
indexID
],
Number
(
item
.
ratio
.
monthly_january
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_january
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_february
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_february
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_march
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_march
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_april
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_april
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_may
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_may
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_june
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_june
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_july
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_july
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_august
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_august
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_september
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_september
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_october
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_october
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_november
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_november
).
toFixed
(
2
),
Number
(
item
.
ratio
.
monthly_december
).
toFixed
(
1
),
Number
(
item
.
ratio
.
monthly_december
).
toFixed
(
2
),
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
...
src/container/Laporan/TableSubHolding.js
View file @
9395c753
...
@@ -502,7 +502,7 @@ export default class TableSubHolding extends Component {
...
@@ -502,7 +502,7 @@ export default class TableSubHolding extends Component {
}
}
const
handleFormulaRatioMR
=
(
value
,
tableMeta
,
month
)
=>
{
const
handleFormulaRatioMR
=
(
value
,
tableMeta
,
month
)
=>
{
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
let
total
=
0
let
total
=
0
if
(
month
>
12
)
{
if
(
month
>
12
)
{
total
=
Number
(
dataTable2
[
35
][
21
+
month
])
total
=
Number
(
dataTable2
[
35
][
21
+
month
])
...
@@ -515,7 +515,7 @@ export default class TableSubHolding extends Component {
...
@@ -515,7 +515,7 @@ export default class TableSubHolding extends Component {
}
}
let
hasil
=
Number
(
value
)
/
total
let
hasil
=
Number
(
value
)
/
total
// console.log(hasil, value, total);
// console.log(hasil, value, total);
return
Number
(
hasil
).
toFixed
(
1
)
return
Number
(
hasil
).
toFixed
(
2
)
}
}
const
columnDBBS
=
[{
const
columnDBBS
=
[{
...
@@ -3875,8 +3875,8 @@ export default class TableSubHolding extends Component {
...
@@ -3875,8 +3875,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[9
], tableMeta, 2)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
23
],
tableMeta
,
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -3896,8 +3896,8 @@ export default class TableSubHolding extends Component {
...
@@ -3896,8 +3896,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[9]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
23
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -3917,9 +3917,9 @@ export default class TableSubHolding extends Component {
...
@@ -3917,9 +3917,9 @@ export default class TableSubHolding extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
90
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
0.0
}
//
value={0.0}
disabled
=
{
true
}
disabled
=
{
true
}
// value={handleFormulaRatio(tableMeta.rowData[10
], tableMeta, 3)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
24
],
tableMeta
,
3
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -3939,8 +3939,8 @@ export default class TableSubHolding extends Component {
...
@@ -3939,8 +3939,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[10]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
24
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -3961,8 +3961,8 @@ export default class TableSubHolding extends Component {
...
@@ -3961,8 +3961,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[11
], tableMeta, 4)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
25
],
tableMeta
,
4
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -3982,8 +3982,8 @@ export default class TableSubHolding extends Component {
...
@@ -3982,8 +3982,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[11]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
25
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4006,8 +4006,8 @@ export default class TableSubHolding extends Component {
...
@@ -4006,8 +4006,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[12
], tableMeta, 5)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
26
],
tableMeta
,
5
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4027,8 +4027,8 @@ export default class TableSubHolding extends Component {
...
@@ -4027,8 +4027,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[12]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
26
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4049,8 +4049,8 @@ export default class TableSubHolding extends Component {
...
@@ -4049,8 +4049,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[13
], tableMeta, 6)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
27
],
tableMeta
,
6
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4070,8 +4070,8 @@ export default class TableSubHolding extends Component {
...
@@ -4070,8 +4070,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[13]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
27
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4092,8 +4092,8 @@ export default class TableSubHolding extends Component {
...
@@ -4092,8 +4092,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[14
], tableMeta, 7)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
28
],
tableMeta
,
7
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4113,8 +4113,8 @@ export default class TableSubHolding extends Component {
...
@@ -4113,8 +4113,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[14]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
28
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4135,8 +4135,8 @@ export default class TableSubHolding extends Component {
...
@@ -4135,8 +4135,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[15
], tableMeta, 8)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
29
],
tableMeta
,
8
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4156,8 +4156,8 @@ export default class TableSubHolding extends Component {
...
@@ -4156,8 +4156,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[15]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
29
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4180,8 +4180,8 @@ export default class TableSubHolding extends Component {
...
@@ -4180,8 +4180,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[16
], tableMeta, 9)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
30
],
tableMeta
,
9
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4201,8 +4201,8 @@ export default class TableSubHolding extends Component {
...
@@ -4201,8 +4201,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[16]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
30
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4223,8 +4223,8 @@ export default class TableSubHolding extends Component {
...
@@ -4223,8 +4223,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[17
], tableMeta, 10)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
31
],
tableMeta
,
10
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4244,8 +4244,8 @@ export default class TableSubHolding extends Component {
...
@@ -4244,8 +4244,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[17]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
31
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4266,8 +4266,8 @@ export default class TableSubHolding extends Component {
...
@@ -4266,8 +4266,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[18
], tableMeta, 11)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
32
],
tableMeta
,
11
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4287,8 +4287,8 @@ export default class TableSubHolding extends Component {
...
@@ -4287,8 +4287,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[18]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
32
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4309,8 +4309,8 @@ export default class TableSubHolding extends Component {
...
@@ -4309,8 +4309,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[19
], tableMeta, 12)}
value
=
{
handleFormulaRatioMR
(
tableMeta
.
rowData
[
33
],
tableMeta
,
12
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -4330,8 +4330,8 @@ export default class TableSubHolding extends Component {
...
@@ -4330,8 +4330,8 @@ export default class TableSubHolding extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
0.0
}
//
value={0.0}
// value={Number(tableMeta.rowData[19]).toFixed(1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
33
]).
toFixed
(
2
)}
/
>
/
>
}
}
/
>
/
>
...
...
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