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
9ea4d65d
Commit
9ea4d65d
authored
May 06, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
robs
parent
dbaf488f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
133 additions
and
4 deletions
+133
-4
BalanceSheetRO.js
src/container/RollingOutlook/BalanceSheetRO.js
+133
-4
No files found.
src/container/RollingOutlook/BalanceSheetRO.js
View file @
9ea4d65d
...
...
@@ -220,7 +220,8 @@ export default class BalanceSheetRO extends Component {
item
.
balance_sheet
.
total_current_year
===
""
?
"0"
:
item
.
balance_sheet
.
total_current_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
item
.
condition_if_wrong
,
item
.
balance_sheet
.
forecast_formula
==
null
?
[]
:
item
.
balance_sheet
.
forecast_formula
])
}
if
(
item
.
children
!==
null
)
{
...
...
@@ -255,7 +256,8 @@ export default class BalanceSheetRO extends Component {
item
.
balance_sheet
.
total_current_year
===
""
?
"0"
:
item
.
balance_sheet
.
total_current_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
item
.
condition_if_wrong
,
item
.
balance_sheet
.
forecast_formula
==
null
?
[]
:
item
.
balance_sheet
.
forecast_formula
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
...
...
@@ -724,6 +726,23 @@ export default class BalanceSheetRO extends Component {
return
total
}
const
handleForecast
=
(
tableMeta
,
periode
,
column
)
=>
{
let
total
=
0
// console.log(tableMeta.rowData)
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
][
23
])
// console.log(total)
// dataTable2[tableMeta.rowIndex][column] = total
if
(
column
==
19
&&
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"r/e (cummulative)"
)
{
total
=
tableMeta
.
rowData
[
7
].
value
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
tableMeta
.
rowData
[
7
].
value
}
else
{
total
=
handleValueFormula
(
dataTable2
[
tableMeta
.
rowIndex
][
column
],
tableMeta
,
column
,
periode
,
dataTable2
[
tableMeta
.
rowIndex
][
23
])
}
// console.log(total)
return
total
}
const
handleValueFormula
=
(
value
,
tableMeta
,
colIdx
)
=>
{
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
/
([
()@
])
/
)
let
baru
=
[]
...
...
@@ -772,7 +791,7 @@ export default class BalanceSheetRO extends Component {
}
}
else
{
let
indexID
=
value
.
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
))
//
console.log(indexID)
console
.
log
(
indexID
)
if
(
indexID
!==
-
1
)
{
// console.log(value.formula[indexID].value)
let
valuezz
=
value
.
formula
[
indexID
].
value
...
...
@@ -2312,6 +2331,7 @@ export default class BalanceSheetRO extends Component {
value
=
{
Number
(
val
).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -2319,9 +2339,100 @@ export default class BalanceSheetRO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handle
Total
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
Value
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
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.state.get_for == 'view'? true : false)}
disabled
=
{
false
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValueFormula
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
7
?
(
Number
(
handleValidation
(
val
,
tableMeta
)).
toFixed
(
1
)
>=
Number
(
this
.
state
.
minValue
)
&&
Number
(
handleValidation
(
val
,
tableMeta
)).
toFixed
(
1
)
<=
Number
(
this
.
state
.
maxValue
))
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
val
,
tableMeta
)).
toFixed
(
1
)}
/>
:
<
LightTooltip
title
=
{
this
.
state
.
minValue
===
null
?
`Value Should be
${
tableMeta
.
rowData
[
21
]}
`
:
`Value Should be (
${
this
.
state
.
minValue
}
) up to (
${
this
.
state
.
maxValue
}
)`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'red'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
<
/div
>
)
...
...
@@ -2340,6 +2451,24 @@ export default class BalanceSheetRO extends Component {
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
...
...
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