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
39a42d5d
Commit
39a42d5d
authored
Oct 06, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
Deni dev(pc) See merge request
!478
parents
4f6c87c1
922d980c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
311 deletions
+69
-311
BudgetTahunan.js
src/container/BudgetTahunan.js
+4
-3
ProfitLossOLPA.js
src/container/OutlookPA/ProfitLossOLPA.js
+65
-308
No files found.
src/container/BudgetTahunan.js
View file @
39a42d5d
...
@@ -753,9 +753,9 @@ export default class BudgetTahunan extends Component {
...
@@ -753,9 +753,9 @@ export default class BudgetTahunan extends Component {
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
//
tableMeta.rowData[5] == true ?
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
//
: null
:
null
}
}
>
>
{
/* {this.state.isApprover == true ?
{
/* {this.state.isApprover == true ?
...
@@ -1032,7 +1032,8 @@ export default class BudgetTahunan extends Component {
...
@@ -1032,7 +1032,8 @@ export default class BudgetTahunan extends Component {
<
/div
>
<
/div
>
{
!
this
.
state
.
isApprover
&&
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
(
{
!
this
.
state
.
isApprover
&&
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
(
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
this
.
state
.
listAttachment
.
length
>
0
?
{
this
.
state
.
listAttachment
.
length
>
0
?
this
.
state
.
listAttachment
.
map
((
item
)
=>
{
this
.
state
.
listAttachment
.
map
((
item
)
=>
{
return
(
return
(
<
button
<
button
...
...
src/container/OutlookPA/ProfitLossOLPA.js
View file @
39a42d5d
...
@@ -104,7 +104,6 @@ export default class ProfitLossOLPA extends Component {
...
@@ -104,7 +104,6 @@ export default class ProfitLossOLPA extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
profit_loss
.
notes
===
""
?
null
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
total_actual_before
===
null
?
"0"
:
item
.
profit_loss
.
total_actual_before
===
""
?
"0"
:
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
total_actual_before
===
null
?
"0"
:
item
.
profit_loss
.
total_actual_before
===
""
?
"0"
:
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
,
item
.
profit_loss
.
february
,
...
@@ -119,8 +118,6 @@ export default class ProfitLossOLPA extends Component {
...
@@ -119,8 +118,6 @@ export default class ProfitLossOLPA extends Component {
item
.
profit_loss
.
november
,
item
.
profit_loss
.
november
,
item
.
profit_loss
.
december
,
item
.
profit_loss
.
december
,
item
.
profit_loss
.
total_current_year
,
item
.
profit_loss
.
total_current_year
,
item
.
profit_loss
.
total_next_year
,
item
.
profit_loss
.
total_more_year
,
item
.
order
item
.
order
])
])
}
}
...
@@ -140,7 +137,6 @@ export default class ProfitLossOLPA extends Component {
...
@@ -140,7 +137,6 @@ export default class ProfitLossOLPA extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
profit_loss
.
notes
===
""
?
null
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
total_actual_before
===
null
?
"0"
:
item
.
profit_loss
.
total_actual_before
===
""
?
"0"
:
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
total_actual_before
===
null
?
"0"
:
item
.
profit_loss
.
total_actual_before
===
""
?
"0"
:
item
.
profit_loss
.
total_actual_before
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
,
item
.
profit_loss
.
february
,
...
@@ -155,8 +151,6 @@ export default class ProfitLossOLPA extends Component {
...
@@ -155,8 +151,6 @@ export default class ProfitLossOLPA extends Component {
item
.
profit_loss
.
november
,
item
.
profit_loss
.
november
,
item
.
profit_loss
.
december
,
item
.
profit_loss
.
december
,
item
.
profit_loss
.
total_current_year
,
item
.
profit_loss
.
total_current_year
,
item
.
profit_loss
.
total_next_year
,
item
.
profit_loss
.
total_more_year
,
item
.
order
item
.
order
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
@@ -206,23 +200,20 @@ export default class ProfitLossOLPA extends Component {
...
@@ -206,23 +200,20 @@ export default class ProfitLossOLPA extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
data
.
push
({
item_report_id
:
i
[
1
],
item_report_id
:
i
[
1
],
notes
:
i
[
6
]
==
null
||
i
[
6
]
==
""
?
""
:
String
(
i
[
6
]),
total_actual_before
:
String
(
Number
(
i
[
6
]).
toFixed
(
1
)),
total_actual_before
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
january
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
january
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
february
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
february
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
march
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
march
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
april
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
april
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
may
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
may
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
june
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
june
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
july
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
july
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
august
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
august
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
september
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
september
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
october
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
)),
total_next_year
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)),
total_more_year
:
String
(
Number
(
i
[
22
]).
toFixed
(
1
))
})
})
})
})
let
payload
=
{
let
payload
=
{
...
@@ -271,23 +262,20 @@ export default class ProfitLossOLPA extends Component {
...
@@ -271,23 +262,20 @@ export default class ProfitLossOLPA extends Component {
payload
.
push
({
payload
.
push
({
item_report_id
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
item_report_id
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
notes
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
total_actual_before
:
i
[
2
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
2
]))
===
false
?
"0"
:
String
(
i
[
2
]).
trim
(),
total_actual_before
:
i
[
3
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
"0"
:
String
(
i
[
3
]).
trim
(),
january
:
i
[
3
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
"0"
:
String
(
i
[
3
]).
trim
(),
january
:
i
[
4
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
"0"
:
String
(
i
[
4
]).
trim
(),
february
:
i
[
4
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
"0"
:
String
(
i
[
4
]).
trim
(),
february
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]).
trim
(),
march
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]).
trim
(),
march
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
april
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
april
:
i
[
7
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
7
]))
===
false
?
"0"
:
String
(
i
[
7
]).
trim
(),
may
:
i
[
7
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
7
]))
===
false
?
"0"
:
String
(
i
[
7
]).
trim
(),
may
:
i
[
8
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
8
]))
===
false
?
"0"
:
String
(
i
[
8
]).
trim
(),
june
:
i
[
8
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
8
]))
===
false
?
"0"
:
String
(
i
[
8
]).
trim
(),
june
:
i
[
9
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
9
]))
===
false
?
"0"
:
String
(
i
[
9
]).
trim
(),
july
:
i
[
9
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
9
]))
===
false
?
"0"
:
String
(
i
[
9
]).
trim
(),
july
:
i
[
10
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
10
]))
===
false
?
"0"
:
String
(
i
[
10
]).
trim
(),
august
:
i
[
10
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
10
]))
===
false
?
"0"
:
String
(
i
[
10
]).
trim
(),
august
:
i
[
11
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
11
]))
===
false
?
"0"
:
String
(
i
[
11
]).
trim
(),
september
:
i
[
11
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
11
]))
===
false
?
"0"
:
String
(
i
[
11
]).
trim
(),
september
:
i
[
12
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
12
]))
===
false
?
"0"
:
String
(
i
[
12
]).
trim
(),
october
:
i
[
12
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
12
]))
===
false
?
"0"
:
String
(
i
[
12
]).
trim
(),
october
:
i
[
13
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
13
]))
===
false
?
"0"
:
String
(
i
[
13
]).
trim
(),
november
:
i
[
13
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
13
]))
===
false
?
"0"
:
String
(
i
[
13
]).
trim
(),
november
:
i
[
14
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
14
]))
===
false
?
"0"
:
String
(
i
[
14
]).
trim
(),
december
:
i
[
14
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
14
]))
===
false
?
"0"
:
String
(
i
[
14
]).
trim
(),
december
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0"
:
String
(
i
[
15
]).
trim
(),
total_current_year
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0"
:
String
(
i
[
15
]).
trim
(),
total_current_year
:
i
[
16
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
16
]))
===
false
?
"0"
:
String
(
i
[
16
]).
trim
(),
total_next_year
:
i
[
17
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
17
]))
===
false
?
"0"
:
String
(
i
[
17
]).
trim
(),
total_more_year
:
i
[
18
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
18
]))
===
false
?
"0"
:
String
(
i
[
18
]).
trim
()
})
})
}
}
})
})
...
@@ -318,7 +306,6 @@ export default class ProfitLossOLPA extends Component {
...
@@ -318,7 +306,6 @@ export default class ProfitLossOLPA extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
item_report
,
item
.
item_report
,
item
.
notes
,
item
.
total_actual_before
,
item
.
total_actual_before
,
item
.
january
,
item
.
january
,
item
.
february
,
item
.
february
,
...
@@ -333,15 +320,13 @@ export default class ProfitLossOLPA extends Component {
...
@@ -333,15 +320,13 @@ export default class ProfitLossOLPA extends Component {
item
.
november
,
item
.
november
,
item
.
december
,
item
.
december
,
item
.
total_current_year
,
item
.
total_current_year
,
item
.
total_next_year
,
item
.
total_more_year
,
item
.
orders
,
item
.
orders
,
item
.
error
item
.
error
]
]
})
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
2
4
].
length
>
0
)
{
if
(
item
[
2
1
].
length
>
0
)
{
console
.
log
(
'masuk'
)
console
.
log
(
'masuk'
)
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
}
...
@@ -358,23 +343,20 @@ export default class ProfitLossOLPA extends Component {
...
@@ -358,23 +343,20 @@ export default class ProfitLossOLPA extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
data
.
push
({
item_report_id
:
i
[
1
],
item_report_id
:
i
[
1
],
notes
:
String
(
i
[
6
]),
total_actual_before
:
String
(
Number
(
i
[
6
]).
toFixed
(
1
)),
total_actual_before
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
january
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
january
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
february
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)),
february
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
march
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)),
march
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
april
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
april
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
may
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)),
may
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
june
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)),
june
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
july
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)),
july
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
august
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
august
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
september
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
september
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
october
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
)),
total_next_year
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)),
total_more_year
:
String
(
Number
(
i
[
22
]).
toFixed
(
1
)),
})
})
})
})
let
body
=
{
let
body
=
{
...
@@ -426,23 +408,20 @@ export default class ProfitLossOLPA extends Component {
...
@@ -426,23 +408,20 @@ export default class ProfitLossOLPA extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
data
.
push
({
item_report_id
:
i
[
1
],
item_report_id
:
i
[
1
],
notes
:
i
[
6
]
==
null
||
i
[
6
]
==
""
?
""
:
String
(
i
[
6
]),
total_actual_before
:
String
(
i
[
6
]),
total_actual_before
:
String
(
i
[
7
]),
january
:
i
[
0
]
===
3
&&
i
[
7
]
===
""
?
"0"
:
String
(
i
[
7
]),
january
:
i
[
0
]
===
3
&&
i
[
8
]
===
""
?
"0"
:
String
(
i
[
8
]),
february
:
i
[
0
]
===
3
&&
i
[
8
]
===
""
?
"0"
:
String
(
i
[
8
]),
february
:
i
[
0
]
===
3
&&
i
[
9
]
===
""
?
"0"
:
String
(
i
[
9
]),
march
:
i
[
0
]
===
3
&&
i
[
9
]
===
""
?
"0"
:
String
(
i
[
9
]),
march
:
i
[
0
]
===
3
&&
i
[
10
]
===
""
?
"0"
:
String
(
i
[
10
]),
april
:
i
[
0
]
===
3
&&
i
[
10
]
===
""
?
"0"
:
String
(
i
[
10
]),
april
:
i
[
0
]
===
3
&&
i
[
11
]
===
""
?
"0"
:
String
(
i
[
11
]),
may
:
i
[
0
]
===
3
&&
i
[
11
]
===
""
?
"0"
:
String
(
i
[
11
]),
may
:
i
[
0
]
===
3
&&
i
[
12
]
===
""
?
"0"
:
String
(
i
[
12
]),
june
:
i
[
0
]
===
3
&&
i
[
12
]
===
""
?
"0"
:
String
(
i
[
12
]),
june
:
i
[
0
]
===
3
&&
i
[
13
]
===
""
?
"0"
:
String
(
i
[
13
]),
july
:
i
[
0
]
===
3
&&
i
[
13
]
===
""
?
"0"
:
String
(
i
[
13
]),
july
:
i
[
0
]
===
3
&&
i
[
14
]
===
""
?
"0"
:
String
(
i
[
14
]),
august
:
i
[
0
]
===
3
&&
i
[
14
]
===
""
?
"0"
:
String
(
i
[
14
]),
august
:
i
[
0
]
===
3
&&
i
[
15
]
===
""
?
"0"
:
String
(
i
[
15
]),
september
:
i
[
0
]
===
3
&&
i
[
15
]
===
""
?
"0"
:
String
(
i
[
15
]),
september
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0"
:
String
(
i
[
16
]),
october
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0"
:
String
(
i
[
16
]),
october
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0"
:
String
(
i
[
17
]),
november
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0"
:
String
(
i
[
17
]),
november
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0"
:
String
(
i
[
18
]),
december
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0"
:
String
(
i
[
18
]),
december
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0"
:
String
(
i
[
19
]),
total_current_year
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0"
:
String
(
i
[
19
])
total_current_year
:
i
[
0
]
===
3
&&
i
[
20
]
===
""
?
"0"
:
String
(
i
[
20
]),
total_next_year
:
i
[
0
]
===
3
&&
i
[
21
]
===
""
?
"0"
:
String
(
i
[
21
]),
total_more_year
:
i
[
0
]
===
3
&&
i
[
22
]
===
""
?
"0"
:
String
(
i
[
22
])
})
})
})
})
let
payload
=
{
let
payload
=
{
...
@@ -490,31 +469,27 @@ export default class ProfitLossOLPA extends Component {
...
@@ -490,31 +469,27 @@ export default class ProfitLossOLPA extends Component {
const
handleTotal
=
(
tableMeta
)
=>
{
const
handleTotal
=
(
tableMeta
)
=>
{
let
total
=
0
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
>=
8
&&
index
<=
19
)
{
if
(
index
>=
7
&&
index
<=
18
)
{
let
valItem
=
item
==
undefined
||
item
==
""
?
0
:
item
let
valItem
=
item
==
undefined
||
item
==
""
?
0
:
item
total
+=
Number
(
valItem
)
total
+=
Number
(
valItem
)
}
}
})
})
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
tableMeta
.
rowData
[
2
]
)
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
tableMeta
.
rowData
[
2
]
)
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
19
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
19
])
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
}
else
if
(
indexParent
!==
-
1
&&
String
(
dataTable2
[
indexParent
][
5
]).
toLocaleUpperCase
()
==
"GROSS PROFIT MARGIN (% OF REVENUE)"
)
{
}
else
if
(
indexParent
!==
-
1
&&
String
(
dataTable2
[
indexParent
][
5
]).
toLocaleUpperCase
()
==
"GROSS PROFIT MARGIN (% OF REVENUE)"
)
{
return
handleFormula
(
0
,
tableMeta
,
0
)
return
handleFormula
(
0
,
tableMeta
,
0
)
}
}
else
{
else
{
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
total
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
return
total
return
total
}
}
// console.log(total);
// console.log(total);
}
}
const
handleNotes
=
(
value
,
tableMeta
)
=>
{
console
.
log
(
value
)
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
value
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
]);
}
const
handleValue
=
(
data
)
=>
{
const
handleValue
=
(
data
)
=>
{
let
total
=
0
let
total
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
dataTable2
.
map
((
item
,
index
)
=>
{
...
@@ -531,7 +506,7 @@ export default class ProfitLossOLPA extends Component {
...
@@ -531,7 +506,7 @@ export default class ProfitLossOLPA extends Component {
let
arrayFormula
=
tableMeta
.
rowData
[
3
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
arrayFormula
=
tableMeta
.
rowData
[
3
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
arrayJumlah
=
[]
let
arrayJumlah
=
[]
arrayFormula
.
map
((
item
,
indexs
)
=>
{
arrayFormula
.
map
((
item
,
indexs
)
=>
{
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
2
3
]
==
item
)
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
2
0
]
==
item
)
if
(
index
>
0
)
{
if
(
index
>
0
)
{
arrayJumlah
.
push
(
dataTable2
[
index
][
tableMeta
.
columnIndex
])
arrayJumlah
.
push
(
dataTable2
[
index
][
tableMeta
.
columnIndex
])
}
else
{
}
else
{
...
@@ -609,8 +584,8 @@ export default class ProfitLossOLPA extends Component {
...
@@ -609,8 +584,8 @@ export default class ProfitLossOLPA extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
300
}}
>
<
div
style
=
{{
width
:
300
}}
>
{
tableMeta
.
rowData
[
2
4
]
?
{
tableMeta
.
rowData
[
2
1
]
?
tableMeta
.
rowData
[
2
4
].
length
>
0
?
tableMeta
.
rowData
[
2
1
].
length
>
0
?
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
LightTooltip
title
=
{
"Report Items Not Registered"
}
arrow
>
<
LightTooltip
title
=
{
"Report Items Not Registered"
}
arrow
>
<
span
style
=
{{
fontSize
:
12
,
color
:
'red'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
span
style
=
{{
fontSize
:
12
,
color
:
'red'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
...
@@ -635,44 +610,6 @@ export default class ProfitLossOLPA extends Component {
...
@@ -635,44 +610,6 @@ export default class ProfitLossOLPA extends Component {
)
)
}
}
}
}
},
{
name
:
"Notes"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
flex
:
1
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
4
]
===
0
?
null
:
tableMeta
.
rowData
[
4
]
===
1
?
null
:
<
FormControlLabel
style
=
{{
margin
:
0
}}
// value={value}
control
=
{
<
Input
disableUnderline
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
false
:
true
)}
defaultValue
=
{
value
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleNotes
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/>
}
<
/div
>
<
/div
>
)
}
}
},
{
},
{
name
:
`31 Dec
${
Number
(
this
.
props
.
periode
)
-
1
}
Actual`
,
name
:
`31 Dec
${
Number
(
this
.
props
.
periode
)
-
1
}
Actual`
,
options
:
{
options
:
{
...
@@ -1836,186 +1773,6 @@ export default class ProfitLossOLPA extends Component {
...
@@ -1836,186 +1773,6 @@ export default class ProfitLossOLPA extends Component {
)
)
}
}
}
}
},
{
name
:
`31 Dec
${
Number
(
this
.
props
.
periode
)
+
1
}
Total`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'black'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
false
:
true
)}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
6
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
13
)).
toFixed
(
1
)}
ue
=
{
handleFormula
(
value
,
tableMeta
)}
/
>
// null
:
tableMeta
.
rowData
[
0
]
===
5
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
13
)).
toFixed
(
1
)}
ue
=
{
handleFormula
(
value
,
tableMeta
)}
/
>
// null
:
tableMeta
.
rowData
[
0
]
===
1
?
// value === "" ?
// null :
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(value)}
// />
null
:
null
}
<
/div
>
)
}
}
},
{
name
:
`31 Dec
${
Number
(
this
.
props
.
periode
)
+
2
}
Total`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'black'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
false
:
true
)}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
6
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
14
)).
toFixed
(
1
)}
ue
=
{
handleFormula
(
value
,
tableMeta
)}
/
>
// null
:
tableMeta
.
rowData
[
0
]
===
5
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
14
)).
toFixed
(
1
)}
ue
=
{
handleFormula
(
value
,
tableMeta
)}
/
>
// null
:
tableMeta
.
rowData
[
0
]
===
1
?
// value === "" ?
// null :
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(value)}
// />
null
:
null
}
<
/div
>
)
}
}
},
},
{
{
name
:
""
,
name
:
""
,
...
...
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