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
8d006290
Commit
8d006290
authored
Dec 09, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
Riri See merge request
!783
parents
35e63719
5b4624ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
159 deletions
+86
-159
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+84
-157
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+2
-2
No files found.
src/container/MonthlyReport/BalanceSheetMR.js
View file @
8d006290
import
{
createMuiTheme
,
FormControlLabel
,
MuiThemeProvider
,
Paper
,
TableCell
,
Tooltip
,
Typography
,
withStyles
}
from
'@material-ui/core'
import
{
createMuiTheme
,
FormControlLabel
,
Input
,
MuiThemeProvider
,
Paper
,
TableCell
,
Tooltip
,
Typography
,
withStyles
}
from
'@material-ui/core'
import
MUIDataTable
from
'mui-datatables'
;
import
React
,
{
Component
}
from
'react'
import
ReactTooltip
from
'react-tooltip'
;
...
...
@@ -152,16 +152,16 @@ export default class BalanceSheetMR extends Component {
item
.
balance_sheet
.
master_budget
===
""
?
"0"
:
item
.
balance_sheet
.
master_budget
,
item
.
balance_sheet
.
rolling_budget
===
""
?
"0"
:
item
.
balance_sheet
.
rolling_budget
,
item
.
balance_sheet
.
actual
===
""
?
"0"
:
item
.
balance_sheet
.
actual
,
item
.
balance_sheet
.
actual_previous_month
===
null
?
"
0"
:
item
.
balance_sheet
.
actual_previous_month
===
""
?
"
0"
:
item
.
balance_sheet
.
actual_previous_month
,
item
.
balance_sheet
.
actual_previous_month
===
null
?
"
5.0"
:
item
.
balance_sheet
.
actual_previous_month
===
""
?
"5.
0"
:
item
.
balance_sheet
.
actual_previous_month
,
item
.
balance_sheet
.
amount_act_vs_previous_month
===
""
?
"0"
:
item
.
balance_sheet
.
amount_act_vs_previous_month
,
item
.
balance_sheet
.
percent_act_vs_previous_month
===
""
?
"0"
:
item
.
balance_sheet
.
percent_act_vs_previous_month
,
item
.
balance_sheet
.
amount_act_vs_mb
===
""
?
"0"
:
item
.
balance_sheet
.
amount_act_vs_mb
,
item
.
balance_sheet
.
percent_act_vs_mb
===
""
?
"0"
:
item
.
balance_sheet
.
percent_act_vs_mb
,
item
.
balance_sheet
.
amount_act_vs_rb
===
""
?
"0"
:
item
.
balance_sheet
.
amount_act_vs_rb
,
item
.
balance_sheet
.
percent_act_vs_rb
===
""
?
"0"
:
item
.
balance_sheet
.
percent_act_vs_rb
,
item
.
balance_sheet
.
mtd_vs_previous_month
===
""
?
"0"
:
item
.
balance_sheet
.
mtd_vs_previous_month
,
item
.
balance_sheet
.
mtd_vs_mb
===
""
?
"0"
:
item
.
balance_sheet
.
mtd_vs_mb
,
item
.
balance_sheet
.
mtd_vs_rb
===
""
?
"0"
:
item
.
balance_sheet
.
mtd_vs_rb
,
item
.
balance_sheet
.
mtd_vs_previous_month
===
""
?
null
:
item
.
balance_sheet
.
mtd_vs_previous_month
,
item
.
balance_sheet
.
mtd_vs_mb
===
""
?
null
:
item
.
balance_sheet
.
mtd_vs_mb
,
item
.
balance_sheet
.
mtd_vs_rb
===
""
?
null
:
item
.
balance_sheet
.
mtd_vs_rb
,
item
.
balance_sheet
.
actual_formula
,
item
.
order
])
...
...
@@ -186,16 +186,16 @@ export default class BalanceSheetMR extends Component {
item
.
balance_sheet
.
master_budget
===
""
?
"0"
:
item
.
balance_sheet
.
master_budget
,
item
.
balance_sheet
.
rolling_budget
===
""
?
"0"
:
item
.
balance_sheet
.
rolling_budget
,
item
.
balance_sheet
.
actual
===
""
?
"0"
:
item
.
balance_sheet
.
actual
,
item
.
balance_sheet
.
actual_previous_month
===
null
?
"
0"
:
item
.
balance_sheet
.
actual_previous_month
===
""
?
"
0"
:
item
.
balance_sheet
.
actual_previous_month
,
item
.
balance_sheet
.
actual_previous_month
===
null
?
"
5.0"
:
item
.
balance_sheet
.
actual_previous_month
===
""
?
"5.
0"
:
item
.
balance_sheet
.
actual_previous_month
,
item
.
balance_sheet
.
amount_act_vs_previous_month
===
""
?
"0"
:
item
.
balance_sheet
.
amount_act_vs_previous_month
,
item
.
balance_sheet
.
percent_act_vs_previous_month
===
""
?
"0"
:
item
.
balance_sheet
.
percent_act_vs_previous_month
,
item
.
balance_sheet
.
amount_act_vs_mb
===
""
?
"0"
:
item
.
balance_sheet
.
amount_act_vs_mb
,
item
.
balance_sheet
.
percent_act_vs_mb
===
""
?
"0"
:
item
.
balance_sheet
.
percent_act_vs_mb
,
item
.
balance_sheet
.
amount_act_vs_rb
===
""
?
"0"
:
item
.
balance_sheet
.
amount_act_vs_rb
,
item
.
balance_sheet
.
percent_act_vs_rb
===
""
?
"0"
:
item
.
balance_sheet
.
percent_act_vs_rb
,
item
.
balance_sheet
.
mtd_vs_previous_month
===
""
?
"0"
:
item
.
balance_sheet
.
mtd_vs_previous_month
,
item
.
balance_sheet
.
mtd_vs_mb
===
""
?
"0"
:
item
.
balance_sheet
.
mtd_vs_mb
,
item
.
balance_sheet
.
mtd_vs_rb
===
""
?
"0"
:
item
.
balance_sheet
.
mtd_vs_rb
,
item
.
balance_sheet
.
mtd_vs_previous_month
===
""
?
null
:
item
.
balance_sheet
.
mtd_vs_previous_month
,
item
.
balance_sheet
.
mtd_vs_mb
===
""
?
null
:
item
.
balance_sheet
.
mtd_vs_mb
,
item
.
balance_sheet
.
mtd_vs_rb
===
""
?
null
:
item
.
balance_sheet
.
mtd_vs_rb
,
item
.
balance_sheet
.
actual_formula
,
item
.
order
])
...
...
@@ -207,9 +207,9 @@ export default class BalanceSheetMR extends Component {
}
}
})
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
,
loading
:
false
})
}
console
.
log
(
dataTable
);
})
}
...
...
@@ -498,7 +498,12 @@ export default class BalanceSheetMR extends Component {
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
const
handleText
=
(
value
,
tableMeta
,
type
)
=>
{
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
+
type
]
=
value
// console.log(dataTable2[tableMeta.rowIndex]);
}
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
console
.
log
(
dataTable2
);
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
if
(
type
===
"actual"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
9
]
=
Number
(
val
).
toFixed
(
1
)
...
...
@@ -1489,164 +1494,86 @@ export default class BalanceSheetMR extends Component {
<
div
className
=
"grid grid-3x content-center"
>
<
div
className
=
"col-1"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
Number
(
tableMeta
.
rowData
[
12
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
12
])
>=
this
.
state
.
maxValue
?
<
div
style
=
{{
flex
:
1
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
4
]
===
0
?
null
:
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
tableMeta
.
rowData
[
17
]
}
// value={value
}
control
=
{
<
NumberForma
t
thousandSeparator
=
{
true
}
<
Inpu
t
disableUnderline
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
false
}
value
=
{
Number
(
tableMeta
.
rowData
[
17
]).
toFixed
(
1
)}
disabled
=
{
Number
(
tableMeta
.
rowData
[
12
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
12
])
>=
this
.
state
.
maxValue
?
false
:
true
}
defaultValue
=
{
tableMeta
.
rowData
[
17
]}
inputProps
=
{{
style
:
{
color
:
"#5198ea"
,
textAlign
:
'right'
}}}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleText
(
event
.
target
.
value
,
tableMeta
,
7
)
}}
/
>
}
/
>
<
/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
,
7
)).
toFixed
(
1
)}
/
>
<
/span>
:
<
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
(
tableMeta
.
rowData
[
17
]).
toFixed
(
1
)}
/
>
}
/
>
/>
}
<
/div
>
}
<
/div
>
<
/div
>
<
div
className
=
"col-2"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
Number
(
tableMeta
.
rowData
[
14
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
])
>=
this
.
state
.
maxValue
?
<
div
style
=
{{
flex
:
1
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
4
]
===
0
?
null
:
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
tableMeta
.
rowData
[
18
]
}
// value={value
}
control
=
{
<
NumberForma
t
thousandSeparator
=
{
true
}
<
Inpu
t
disableUnderline
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
false
}
value
=
{
Number
(
tableMeta
.
rowData
[
18
]).
toFixed
(
1
)}
disabled
=
{
Number
(
tableMeta
.
rowData
[
14
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
])
>=
this
.
state
.
maxValue
?
false
:
true
}
defaultValue
=
{
tableMeta
.
rowData
[
18
]}
inputProps
=
{{
style
:
{
color
:
"#5198ea"
,
textAlign
:
'right'
}}}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleText
(
event
.
target
.
value
,
tableMeta
,
8
)
}}
/
>
}
/
>
<
/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
,
8
)).
toFixed
(
1
)}
/
>
<
/span>
:
<
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
(
tableMeta
.
rowData
[
18
]).
toFixed
(
1
)}
/
>
}
/
>
/>
}
<
/div
>
}
<
/div
>
<
/div
>
<
div
className
=
"col-3"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
Number
(
tableMeta
.
rowData
[
16
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
])
>=
this
.
state
.
maxValue
?
<
div
style
=
{{
flex
:
1
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
4
]
===
0
?
null
:
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
tableMeta
.
rowData
[
19
]
}
// value={value
}
control
=
{
<
NumberForma
t
thousandSeparator
=
{
true
}
<
Inpu
t
disableUnderline
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
false
}
value
=
{
Number
(
tableMeta
.
rowData
[
19
]).
toFixed
(
1
)}
disabled
=
{
Number
(
tableMeta
.
rowData
[
16
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
])
>=
this
.
state
.
maxValue
?
false
:
true
}
defaultValue
=
{
tableMeta
.
rowData
[
19
]}
inputProps
=
{{
style
:
{
color
:
"#5198ea"
,
textAlign
:
'right'
}}}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleText
(
event
.
target
.
value
,
tableMeta
,
9
)
}}
/
>
}
/
>
<
/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
,
9
)).
toFixed
(
1
)}
/
>
<
/span>
:
<
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
(
tableMeta
.
rowData
[
19
]).
toFixed
(
1
)}
/
>
}
/
>
/>
}
<
/div
>
}
<
/div
>
<
/div
>
<
/div
>
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
8d006290
...
...
@@ -1536,7 +1536,7 @@ export default class ProfitLossMR extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
Number
(
tableMeta
.
rowData
[
1
4
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
])
>=
this
.
state
.
maxValue
?
false
:
true
}
disabled
=
{
Number
(
tableMeta
.
rowData
[
1
6
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
])
>=
this
.
state
.
maxValue
?
false
:
true
}
defaultValue
=
{
tableMeta
.
rowData
[
20
]}
inputProps
=
{{
style
:
{
color
:
"#5198ea"
,
...
...
@@ -1564,7 +1564,7 @@ export default class ProfitLossMR extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
Number
(
tableMeta
.
rowData
[
1
4
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
])
>=
this
.
state
.
maxValue
?
false
:
true
}
disabled
=
{
Number
(
tableMeta
.
rowData
[
1
8
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
18
])
>=
this
.
state
.
maxValue
?
false
:
true
}
defaultValue
=
{
tableMeta
.
rowData
[
21
]}
inputProps
=
{{
style
:
{
color
:
"#5198ea"
,
...
...
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