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
ae9f8211
Commit
ae9f8211
authored
Apr 09, 2021
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Faisal
parent
12db6e26
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
103 deletions
+26
-103
BalanceSheetRO.js
src/container/RollingOutlook/BalanceSheetRO.js
+26
-103
No files found.
src/container/RollingOutlook/BalanceSheetRO.js
View file @
ae9f8211
...
@@ -707,6 +707,22 @@ export default class BalanceSheetRO extends Component {
...
@@ -707,6 +707,22 @@ export default class BalanceSheetRO extends Component {
return
a
return
a
}
}
const
handleTotal
=
(
val
,
tableMeta
)
=>
{
let
total
=
0
tableMeta
.
rowData
.
map
((
item
,
index
)
=>
{
if
(
index
>=
7
&&
index
<=
18
)
{
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"profit (loss) mtd"
)
{
total
+=
Number
(
item
.
value
)
}
else
{
total
+=
Number
(
item
)
}
}
})
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
total
return
total
}
const
handleValueFormula
=
(
value
,
tableMeta
,
colIdx
)
=>
{
const
handleValueFormula
=
(
value
,
tableMeta
,
colIdx
)
=>
{
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
/
([
()@
])
/
)
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
/
([
()@
])
/
)
let
baru
=
[]
let
baru
=
[]
...
@@ -2295,7 +2311,6 @@ export default class BalanceSheetRO extends Component {
...
@@ -2295,7 +2311,6 @@ export default class BalanceSheetRO extends Component {
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
Number
(
val
).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -2303,101 +2318,9 @@ export default class BalanceSheetRO extends Component {
...
@@ -2303,101 +2318,9 @@ export default class BalanceSheetRO extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleTotal
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/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)}
value
=
{
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
7
?
(
Number
(
val
).
toFixed
(
1
)
>=
Number
(
this
.
state
.
minValue
)
&&
Number
(
val
).
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
(
val
).
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
(
val
).
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
>
<
/div
>
)
)
...
...
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