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
b555d8ab
Commit
b555d8ab
authored
Nov 24, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-' into 'master'
Deni See merge request
!688
parents
992ed7ec
28673877
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
253 additions
and
251 deletions
+253
-251
MonthlyReport.js
src/container/MonthlyReport.js
+2
-0
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+251
-251
No files found.
src/container/MonthlyReport.js
View file @
b555d8ab
...
@@ -480,6 +480,8 @@ export default class MonthlyReport extends Component {
...
@@ -480,6 +480,8 @@ export default class MonthlyReport extends Component {
visibleTP
:
false
,
visibleTP
:
false
,
visibleLOCF
:
false
,
visibleLOCF
:
false
,
visibleOI
:
false
,
visibleOI
:
false
,
},
()
=>
{
this
.
getMonthlyReportID
()
})
})
}
}
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
b555d8ab
...
@@ -249,9 +249,40 @@ export default class BalanceSheetMR extends Component {
...
@@ -249,9 +249,40 @@ export default class BalanceSheetMR extends Component {
}
}
})
})
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
===
dataTable2
[
data
.
rowIndex
][
2
])
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
===
dataTable2
[
data
.
rowIndex
][
2
])
let
a
=
dataTable2
[
data
.
rowIndex
][
data
.
columnIndex
+
type
]
=
Number
(
total
).
toFixed
(
1
)
dataTable2
[
data
.
rowIndex
][
data
.
columnIndex
+
type
]
=
Number
(
total
).
toFixed
(
1
)
// console.log(indexParent);
// console.log(indexParent);
return
a
return
total
}
const
handleVariance
=
(
tableMeta
,
dex
,
type
)
=>
{
let
total
=
0
if
(
dex
===
1
)
{
total
=
Number
(
tableMeta
.
rowData
[
9
])
-
Number
(
tableMeta
.
rowData
[
10
])
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
+
type
]
=
Number
(
total
).
toFixed
(
1
)
}
else
if
(
dex
===
2
)
{
total
=
Number
(
tableMeta
.
rowData
[
9
])
-
Number
(
tableMeta
.
rowData
[
7
])
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
+
type
]
=
Number
(
total
).
toFixed
(
1
)
}
else
if
(
dex
===
3
)
{
total
=
Number
(
tableMeta
.
rowData
[
9
])
-
Number
(
tableMeta
.
rowData
[
8
])
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
+
type
]
=
Number
(
total
).
toFixed
(
1
)
}
return
total
}
const
handleVariancePercent
=
(
tableMeta
,
dex
,
type
)
=>
{
let
total
=
0
// if (tableMeta.rowData[5] === "Cash and cash equivalent") {
// console.log(dataTable2);
// console.log(tableMeta);
// }
if
(
dex
===
1
)
{
total
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
][
11
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
][
10
])
}
else
if
(
dex
===
2
)
{
total
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
][
13
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
][
7
])
}
else
if
(
dex
===
3
)
{
total
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
][
15
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
][
8
])
}
return
total
}
}
let
columns
=
[
let
columns
=
[
...
@@ -328,10 +359,14 @@ export default class BalanceSheetMR extends Component {
...
@@ -328,10 +359,14 @@ export default class BalanceSheetMR extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style
:
{
paddingRight
:
0
}
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
null
:
val
val
...
@@ -357,7 +392,7 @@ export default class BalanceSheetMR extends Component {
...
@@ -357,7 +392,7 @@ export default class BalanceSheetMR extends Component {
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
backgroundColor
:
'#37b5e6'
,
height
:
'100%'
}}
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
backgroundColor
:
'#37b5e6'
,
height
:
'100%'
,
display
:
'grid'
,
alignContent
:
'center'
}}
>
<
span
>
{
"Actual"
}
<
/span
>
<
span
>
{
"Actual"
}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -510,10 +545,14 @@ export default class BalanceSheetMR extends Component {
...
@@ -510,10 +545,14 @@ export default class BalanceSheetMR extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style
:
{
paddingRight
:
0
}
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
tableMeta
.
rowData
[
0
]
===
2
?
tableMeta
.
rowData
[
0
]
===
2
?
...
@@ -601,7 +640,7 @@ export default class BalanceSheetMR extends Component {
...
@@ -601,7 +640,7 @@ export default class BalanceSheetMR extends Component {
setCellProps
:
()
=>
({
setCellProps
:
()
=>
({
style
:
{
style
:
{
paddingLeft
:
0
,
paddingLeft
:
0
,
paddingRight
:
0
paddingRight
:
1
0
}
}
}),
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
...
@@ -612,70 +651,49 @@ export default class BalanceSheetMR extends Component {
...
@@ -612,70 +651,49 @@ export default class BalanceSheetMR extends Component {
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
className
=
"grid grid-2x content-center"
>
<
div
className
=
"grid grid-2x content-center"
>
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
9
0
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
12
0
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
tableMeta
.
rowData
[
0
]
===
2
?
<
div
style
=
{{
flex
:
1
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
FormControlLabel
<
NumberFormat
style
=
{{
margin
:
0
}}
thousandSeparator
=
{
true
}
value
=
{
val
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
control
=
{
type
=
"text"
<
NumberFormat
placeholder
=
""
thousandSeparator
=
{
true
}
disabled
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
value
=
{
Number
(
handleValue
(
tableMeta
,
2
)).
toFixed
(
1
)}
type
=
"text"
/
>
placeholder
=
""
<
/span>
:
disabled
=
{
true
}
<
div
style
=
{{
flex
:
1
}}
>
value
=
{
Number
(
handleVariance
(
tableMeta
,
1
,
2
)).
toFixed
(
1
)}
<
FormControlLabel
/
>
style
=
{{
margin
:
0
}}
}
value
=
{
val
}
/
>
control
=
{
<
/div
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
11
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
9
0
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
12
0
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
tableMeta
.
rowData
[
0
]
===
2
?
<
div
style
=
{{
flex
:
1
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
FormControlLabel
<
NumberFormat
style
=
{{
margin
:
0
}}
thousandSeparator
=
{
true
}
value
=
{
val
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
control
=
{
type
=
"text"
<
NumberFormat
placeholder
=
""
thousandSeparator
=
{
true
}
disabled
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
value
=
{
Number
(
handleValue
(
tableMeta
,
3
)).
toFixed
(
1
)}
type
=
"text"
/
>
placeholder
=
""
<
/span>
:
suffix
=
{
'%'
}
<
div
style
=
{{
flex
:
1
}}
>
disabled
=
{
true
}
<
FormControlLabel
value
=
{
Number
(
handleVariancePercent
(
tableMeta
,
1
,
3
)).
toFixed
(
1
)}
style
=
{{
margin
:
0
}}
/
>
value
=
{
val
}
}
control
=
{
/
>
<
NumberFormat
<
/div
>
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
12
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -684,70 +702,49 @@ export default class BalanceSheetMR extends Component {
...
@@ -684,70 +702,49 @@ export default class BalanceSheetMR extends Component {
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
className
=
"grid grid-2x content-center"
>
<
div
className
=
"grid grid-2x content-center"
>
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
9
0
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
12
0
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
tableMeta
.
rowData
[
0
]
===
2
?
<
div
style
=
{{
flex
:
1
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
FormControlLabel
<
NumberFormat
style
=
{{
margin
:
0
}}
thousandSeparator
=
{
true
}
value
=
{
val
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
control
=
{
type
=
"text"
<
NumberFormat
placeholder
=
""
thousandSeparator
=
{
true
}
disabled
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
value
=
{
Number
(
handleValue
(
tableMeta
,
4
)).
toFixed
(
1
)}
type
=
"text"
/
>
placeholder
=
""
<
/span>
:
disabled
=
{
true
}
<
div
style
=
{{
flex
:
1
}}
>
value
=
{
Number
(
handleVariance
(
tableMeta
,
2
,
4
)).
toFixed
(
1
)}
<
FormControlLabel
/
>
style
=
{{
margin
:
0
}}
}
value
=
{
val
}
/
>
control
=
{
<
/div
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
13
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
9
0
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
12
0
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
tableMeta
.
rowData
[
0
]
===
2
?
<
div
style
=
{{
flex
:
1
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
FormControlLabel
<
NumberFormat
style
=
{{
margin
:
0
}}
thousandSeparator
=
{
true
}
value
=
{
val
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
control
=
{
type
=
"text"
<
NumberFormat
placeholder
=
""
thousandSeparator
=
{
true
}
disabled
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
value
=
{
Number
(
handleValue
(
tableMeta
,
5
)).
toFixed
(
1
)}
type
=
"text"
/
>
placeholder
=
""
<
/span>
:
disabled
=
{
true
}
<
div
style
=
{{
flex
:
1
}}
>
suffix
=
{
'%'
}
<
FormControlLabel
value
=
{
Number
(
handleVariancePercent
(
tableMeta
,
2
,
5
)).
toFixed
(
1
)}
style
=
{{
margin
:
0
}}
/
>
value
=
{
val
}
}
control
=
{
/
>
<
NumberFormat
<
/div
>
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
14
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -756,70 +753,49 @@ export default class BalanceSheetMR extends Component {
...
@@ -756,70 +753,49 @@ export default class BalanceSheetMR extends Component {
<
div
className
=
"column-3"
>
<
div
className
=
"column-3"
>
<
div
className
=
"grid grid-2x content-center"
>
<
div
className
=
"grid grid-2x content-center"
>
<
div
className
=
"column-1"
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
9
0
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
12
0
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
tableMeta
.
rowData
[
0
]
===
2
?
<
div
style
=
{{
flex
:
1
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
FormControlLabel
<
NumberFormat
style
=
{{
margin
:
0
}}
thousandSeparator
=
{
true
}
value
=
{
val
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
control
=
{
type
=
"text"
<
NumberFormat
placeholder
=
""
thousandSeparator
=
{
true
}
disabled
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
value
=
{
Number
(
handleValue
(
tableMeta
,
6
)).
toFixed
(
1
)}
type
=
"text"
/
>
placeholder
=
""
<
/span>
:
disabled
=
{
true
}
<
div
style
=
{{
flex
:
1
}}
>
value
=
{
Number
(
handleVariance
(
tableMeta
,
3
,
6
)).
toFixed
(
1
)}
<
FormControlLabel
/
>
style
=
{{
margin
:
0
}}
}
value
=
{
val
}
/
>
control
=
{
<
/div
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
15
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
9
0
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
12
0
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
null
:
tableMeta
.
rowData
[
0
]
===
2
?
<
div
style
=
{{
flex
:
1
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
FormControlLabel
<
NumberFormat
style
=
{{
margin
:
0
}}
thousandSeparator
=
{
true
}
value
=
{
val
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
control
=
{
type
=
"text"
<
NumberFormat
placeholder
=
""
thousandSeparator
=
{
true
}
disabled
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
value
=
{
Number
(
handleValue
(
tableMeta
,
7
)).
toFixed
(
1
)}
type
=
"text"
/
>
placeholder
=
""
<
/span>
:
disabled
=
{
true
}
<
div
style
=
{{
flex
:
1
}}
>
suffix
=
{
'%'
}
<
FormControlLabel
value
=
{
Number
(
handleVariancePercent
(
tableMeta
,
3
,
7
)).
toFixed
(
1
)}
style
=
{{
margin
:
0
}}
/
>
value
=
{
val
}
}
control
=
{
/
>
<
NumberFormat
<
/div
>
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
16
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1037,7 +1013,7 @@ export default class BalanceSheetMR extends Component {
...
@@ -1037,7 +1013,7 @@ export default class BalanceSheetMR extends Component {
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Monthly
Report
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Monthly
Report
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
Paper
style
=
{{
paddingTop
:
10
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
-
Balance
Sheet
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
-
Balance
Sheet
<
/Typography
>
<
/div
>
<
/div
>
...
@@ -1102,85 +1078,109 @@ export default class BalanceSheetMR extends Component {
...
@@ -1102,85 +1078,109 @@ export default class BalanceSheetMR extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
{
!
this
.
state
.
loading
&&
(
<
MUIDataTable
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
data
=
{
this
.
state
.
dataTable
}
<
MUIDataTable
columns
=
{
columns
}
data
=
{
this
.
state
.
dataTable
}
options
=
{
options
}
columns
=
{
columns
}
/
>
options
=
{
options
}
<
/MuiThemeProvider
>
/
>
<
/MuiThemeProvider
>
)}
<
/div
>
<
/div
>
{
/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
{
/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(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') ? */
}
(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') ? */
}
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
marginTop
:
20
}}
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
button
<
div
className
=
"col-1"
>
className
=
"button"
<
button
type
=
"button"
type
=
"button"
style
=
{{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
})
this
.
props
.
onClickClose
()
// this.handleValidate()
},
100
);
},
100
);
})
})}
}}
style
=
{{
>
backgroundColor
:
'transparent'
,
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
cursor
:
'pointer'
,
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
borderColor
:
'transparent'
,
<
/div
>
outline
:
'none'
<
/button
>
}}
<
button
>
className
=
"button"
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
type
=
"button"
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
style
=
{{
<
/div
>
backgroundColor
:
'transparent'
,
<
/button
>
cursor
:
this
.
state
.
saveDraft
!==
true
?
'pointer'
:
'default'
,
<
/div
>
borderColor
:
'transparent'
,
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
outline
:
'none'
,
<
button
marginRight
:
20
className
=
"button"
}}
type
=
"button"
onClick
=
{()
=>
style
=
{{
this
.
state
.
saveDraft
===
true
?
backgroundColor
:
'transparent'
,
null
:
cursor
:
'pointer'
,
this
.
state
.
handleTekTekTek
==
1
?
null
:
borderColor
:
'transparent'
,
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
outline
:
'none'
,
this
.
backToMonthlyReport
(
'draft'
)
marginRight
:
20
})
}}
}
onClick
=
{()
=>
{
>
this
.
setState
({
loading
:
true
},
()
=>
{
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
setTimeout
(()
=>
{
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
this
.
setState
({
loading
:
false
})
<
/div
>
// this.handleValidate()
<
/button
>
},
100
);
<
button
})
type
=
"button"
}}
// disabled={this.state.buttonError}
>
onClick
=
{()
=>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
this
.
state
.
buttonError
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
<
/div
>
:
<
/button
>
this
.
state
.
handleTekTekTek
==
1
?
null
:
<
button
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
className
=
"button"
this
.
backToMonthlyReport
(
'submitted'
)
type
=
"button"
})}
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
saveDraft
!==
true
?
'pointer'
:
'default'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
marginRight
:
20
}}
}}
>
onClick
=
{()
=>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
this
.
state
.
saveDraft
===
true
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
null
:
<
/div
>
this
.
state
.
handleTekTekTek
==
1
?
null
:
<
/button
>
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backToMonthlyReport
(
'draft'
)
})
}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backToMonthlyReport
(
'submitted'
)
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
{
/* : null
{
/* : 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