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
d7030da5
Commit
d7030da5
authored
Nov 25, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
benerin formula
parent
c0050637
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
141 additions
and
179 deletions
+141
-179
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+141
-179
No files found.
src/container/MonthlyReport/ProfitLossMR.js
View file @
d7030da5
...
@@ -85,21 +85,21 @@ export default class ProfitLossMR extends Component {
...
@@ -85,21 +85,21 @@ export default class ProfitLossMR extends Component {
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
profit_loss
.
notes
===
""
?
null
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
notes
===
""
?
null
:
item
.
profit_loss
.
notes
,
item.profit_loss.rolling_outlook === null ? "
1.0" : item.profit_loss.rolling_outlook === "" ? "1
.0" : item.profit_loss.rolling_outlook,
item
.
profit_loss
.
rolling_outlook
===
null
?
"
0.0"
:
item
.
profit_loss
.
rolling_outlook
===
""
?
"0
.0"
:
item
.
profit_loss
.
rolling_outlook
,
item.profit_loss.master_budget === null ? "
2.0" : item.profit_loss.master_budget === "" ? "2
.0" : item.profit_loss.master_budget,
item
.
profit_loss
.
master_budget
===
null
?
"
0.0"
:
item
.
profit_loss
.
master_budget
===
""
?
"0
.0"
:
item
.
profit_loss
.
master_budget
,
item.profit_loss.rolling_budget === null ? "
3.0" : item.profit_loss.rolling_budget === "" ? "3
.0" : item.profit_loss.rolling_budget,
item
.
profit_loss
.
rolling_budget
===
null
?
"
0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0
.0"
:
item
.
profit_loss
.
rolling_budget
,
item.profit_loss.actual === null ? "
4.0" : item.profit_loss.actual === "" ? "4
.0" : item.profit_loss.actual,
item
.
profit_loss
.
actual
===
null
?
"
0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0
.0"
:
item
.
profit_loss
.
actual
,
item.profit_loss.ytd_actual === null ? "
5.0" : item.profit_loss.ytd_actual === "" ? "5
.0" : item.profit_loss.ytd_actual,
item
.
profit_loss
.
ytd_actual
===
null
?
"
0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0
.0"
:
item
.
profit_loss
.
ytd_actual
,
item.profit_loss.actual_previous_month === null ? "
6.0" : item.profit_loss.actual_previous_month === "" ? "6
.0" : item.profit_loss.actual_previous_month,
item
.
profit_loss
.
actual_previous_month
===
null
?
"
0.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
actual_previous_month
,
item.profit_loss.amount_act_vs_previous_month === null ? "
7.0" : item.profit_loss.amount_act_vs_previous_month === "" ? "7
.0" : item.profit_loss.amount_act_vs_previous_month,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"
0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item.profit_loss.percent_act_vs_previous_month === null ? "
8.0" : item.profit_loss.percent_act_vs_previous_month === "" ? "8
.0" : item.profit_loss.percent_act_vs_previous_month,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"
0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
item.profit_loss.amount_act_vs_mb === null ? "
9.0" : item.profit_loss.amount_act_vs_mb === "" ? "9
.0" : item.profit_loss.amount_act_vs_mb,
item
.
profit_loss
.
amount_act_vs_mb
===
null
?
"
0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
===
""
?
"0
.0"
:
item
.
profit_loss
.
amount_act_vs_mb
,
item.profit_loss.percent_act_vs_mb === null ? "
10.0" : item.profit_loss.percent_act_vs_mb === "" ? "1
0.0" : item.profit_loss.percent_act_vs_mb,
item
.
profit_loss
.
percent_act_vs_mb
===
null
?
"
0.0"
:
item
.
profit_loss
.
percent_act_vs_mb
===
""
?
"
0.0"
:
item
.
profit_loss
.
percent_act_vs_mb
,
item.profit_loss.amount_act_vs_rb === null ? "
11.0" : item.profit_loss.amount_act_vs_rb === "" ? "11
.0" : item.profit_loss.amount_act_vs_rb,
item
.
profit_loss
.
amount_act_vs_rb
===
null
?
"
0.0"
:
item
.
profit_loss
.
amount_act_vs_rb
===
""
?
"0
.0"
:
item
.
profit_loss
.
amount_act_vs_rb
,
item.profit_loss.percent_act_vs_rb === null ? "
12.0" : item.profit_loss.percent_act_vs_rb === "" ? "12
.0" : item.profit_loss.percent_act_vs_rb,
item
.
profit_loss
.
percent_act_vs_rb
===
null
?
"
0.0"
:
item
.
profit_loss
.
percent_act_vs_rb
===
""
?
"0
.0"
:
item
.
profit_loss
.
percent_act_vs_rb
,
item.profit_loss.mtd_vs_previous_month === null ? "
13.0" : item.profit_loss.mtd_vs_previous_month === "" ? "13
.0" : item.profit_loss.mtd_vs_previous_month,
item
.
profit_loss
.
mtd_vs_previous_month
===
null
?
"
0.0"
:
item
.
profit_loss
.
mtd_vs_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
mtd_vs_previous_month
,
item.profit_loss.mtd_vs_mb === null ? "
14.0" : item.profit_loss.mtd_vs_mb === "" ? "14
.0" : item.profit_loss.mtd_vs_mb,
item
.
profit_loss
.
mtd_vs_mb
===
null
?
"
0.0"
:
item
.
profit_loss
.
mtd_vs_mb
===
""
?
"0
.0"
:
item
.
profit_loss
.
mtd_vs_mb
,
item.profit_loss.mtd_vs_rb === null ? "
15.0" : item.profit_loss.mtd_vs_rb === "" ? "15
.0" : item.profit_loss.mtd_vs_rb,
item
.
profit_loss
.
mtd_vs_rb
===
null
?
"
0.0"
:
item
.
profit_loss
.
mtd_vs_rb
===
""
?
"0
.0"
:
item
.
profit_loss
.
mtd_vs_rb
,
item
.
order
item
.
order
])
])
}
}
...
@@ -120,21 +120,21 @@ export default class ProfitLossMR extends Component {
...
@@ -120,21 +120,21 @@ export default class ProfitLossMR extends Component {
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
profit_loss
.
notes
===
""
?
null
:
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
notes
===
""
?
null
:
item
.
profit_loss
.
notes
,
item.profit_loss.rolling_outlook === null ? "
1.0" : item.profit_loss.rolling_outlook === "" ? "1
.0" : item.profit_loss.rolling_outlook,
item
.
profit_loss
.
rolling_outlook
===
null
?
"
0.0"
:
item
.
profit_loss
.
rolling_outlook
===
""
?
"0
.0"
:
item
.
profit_loss
.
rolling_outlook
,
item.profit_loss.master_budget === null ? "2.0" : item.profit_loss.master_budget === "" ? "2
.0" : item.profit_loss.master_budget,
item
.
profit_loss
.
master_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
master_budget
===
""
?
"0
.0"
:
item
.
profit_loss
.
master_budget
,
item.profit_loss.rolling_budget === null ? "3.0" : item.profit_loss.rolling_budget === "" ? "3
.0" : item.profit_loss.rolling_budget,
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0
.0"
:
item
.
profit_loss
.
rolling_budget
,
item.profit_loss.actual === null ? "4.0" : item.profit_loss.actual === "" ? "4
.0" : item.profit_loss.actual,
item
.
profit_loss
.
actual
===
null
?
"0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0
.0"
:
item
.
profit_loss
.
actual
,
item.profit_loss.ytd_actual === null ? "5.0" : item.profit_loss.ytd_actual === "" ? "5
.0" : item.profit_loss.ytd_actual,
item
.
profit_loss
.
ytd_actual
===
null
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0
.0"
:
item
.
profit_loss
.
ytd_actual
,
item.profit_loss.actual_previous_month === null ? "6.0" : item.profit_loss.actual_previous_month === "" ? "6
.0" : item.profit_loss.actual_previous_month,
item
.
profit_loss
.
actual_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
actual_previous_month
,
item.profit_loss.amount_act_vs_previous_month === null ? "7.0" : item.profit_loss.amount_act_vs_previous_month === "" ? "7
.0" : item.profit_loss.amount_act_vs_previous_month,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item.profit_loss.percent_act_vs_previous_month === null ? "8.0" : item.profit_loss.percent_act_vs_previous_month === "" ? "8
.0" : item.profit_loss.percent_act_vs_previous_month,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
item.profit_loss.amount_act_vs_mb === null ? "9.0" : item.profit_loss.amount_act_vs_mb === "" ? "9
.0" : item.profit_loss.amount_act_vs_mb,
item
.
profit_loss
.
amount_act_vs_mb
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_mb
===
""
?
"0
.0"
:
item
.
profit_loss
.
amount_act_vs_mb
,
item.profit_loss.percent_act_vs_mb === null ? "10.0" : item.profit_loss.percent_act_vs_mb === "" ? "1
0.0" : item.profit_loss.percent_act_vs_mb,
item
.
profit_loss
.
percent_act_vs_mb
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_mb
===
""
?
"
0.0"
:
item
.
profit_loss
.
percent_act_vs_mb
,
item.profit_loss.amount_act_vs_rb === null ? "11.0" : item.profit_loss.amount_act_vs_rb === "" ? "11
.0" : item.profit_loss.amount_act_vs_rb,
item
.
profit_loss
.
amount_act_vs_rb
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_rb
===
""
?
"0
.0"
:
item
.
profit_loss
.
amount_act_vs_rb
,
item.profit_loss.percent_act_vs_rb === null ? "12.0" : item.profit_loss.percent_act_vs_rb === "" ? "12
.0" : item.profit_loss.percent_act_vs_rb,
item
.
profit_loss
.
percent_act_vs_rb
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_rb
===
""
?
"0
.0"
:
item
.
profit_loss
.
percent_act_vs_rb
,
item.profit_loss.mtd_vs_previous_month === null ? "13.0" : item.profit_loss.mtd_vs_previous_month === "" ? "13
.0" : item.profit_loss.mtd_vs_previous_month,
item
.
profit_loss
.
mtd_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
mtd_vs_previous_month
===
""
?
"0
.0"
:
item
.
profit_loss
.
mtd_vs_previous_month
,
item.profit_loss.mtd_vs_mb === null ? "14.0" : item.profit_loss.mtd_vs_mb === "" ? "14
.0" : item.profit_loss.mtd_vs_mb,
item
.
profit_loss
.
mtd_vs_mb
===
null
?
"0.0"
:
item
.
profit_loss
.
mtd_vs_mb
===
""
?
"0
.0"
:
item
.
profit_loss
.
mtd_vs_mb
,
item.profit_loss.mtd_vs_rb === null ? "15.0" : item.profit_loss.mtd_vs_rb === "" ? "15
.0" : item.profit_loss.mtd_vs_rb,
item
.
profit_loss
.
mtd_vs_rb
===
null
?
"0.0"
:
item
.
profit_loss
.
mtd_vs_rb
===
""
?
"0
.0"
:
item
.
profit_loss
.
mtd_vs_rb
,
item
.
order
,
item
.
order
,
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
@@ -241,6 +241,7 @@ export default class ProfitLossMR extends Component {
...
@@ -241,6 +241,7 @@ export default class ProfitLossMR extends Component {
// console.log(dataTable2[tableMeta.rowIndex]);
// console.log(dataTable2[tableMeta.rowIndex]);
}
}
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
console
.
log
(
dataTable2
);
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
if
(
type
===
"actual"
)
{
if
(
type
===
"actual"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
10
]
=
Number
(
val
).
toFixed
(
1
)
dataTable2
[
tableMeta
.
rowIndex
][
10
]
=
Number
(
val
).
toFixed
(
1
)
...
@@ -259,13 +260,12 @@ export default class ProfitLossMR extends Component {
...
@@ -259,13 +260,12 @@ export default class ProfitLossMR extends Component {
const
handleValue
=
(
data
,
type
)
=>
{
const
handleValue
=
(
data
,
type
)
=>
{
let
total
=
0
let
total
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
dataTable2
.
map
((
item
,
index
)
=>
{
if (data.rowData[1] === item[2]) {
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
let itemVal = item[data.columnIndex + type].value !== undefined ? Number(item[data.columnIndex + type].value) : Number(item[data.columnIndex + type])
total
=
item
[
data
.
columnIndex
+
type
]
==
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
+
type
]))
total = item[data.columnIndex + type] === undefined ? Number(total) + 0 : Number(total) + itemVal
}
}
})
})
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)
let
a
=
dataTable2
[
data
.
rowIndex
][
data
.
columnIndex
+
type
]
=
Number
(
total
)
// console.log(indexParent);
// console.log(indexParent);
return
a
return
a
}
}
...
@@ -318,12 +318,12 @@ export default class ProfitLossMR extends Component {
...
@@ -318,12 +318,12 @@ export default class ProfitLossMR extends Component {
total
=
Number
(
total
)
-
Number
(
item
)
total
=
Number
(
total
)
-
Number
(
item
)
}
else
if
(
opt
==
"kali"
)
{
}
else
if
(
opt
==
"kali"
)
{
if (tableMeta.rowData[22] === 3) {
//
if (tableMeta.rowData[22] === 3) {
console.log(arrayFormula);
//
console.log(arrayFormula);
console.log(array);
//
console.log(array);
console.log(total);
//
console.log(total);
console.log(item);
//
console.log(item);
}
//
}
total
=
Number
(
total
)
*
Number
(
item
)
total
=
Number
(
total
)
*
Number
(
item
)
// if (tableMeta.rowData[22] === 3) {
// if (tableMeta.rowData[22] === 3) {
// console.log(dataTable2[tableMeta.rowIndex]);
// console.log(dataTable2[tableMeta.rowIndex]);
...
@@ -971,41 +971,22 @@ export default class ProfitLossMR extends Component {
...
@@ -971,41 +971,22 @@ export default class ProfitLossMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
tableMeta.rowData[0] === 6 ?
<
div
style
=
{{
flex
:
1
}}
>
<div style={{ flex: 1 }}>
<
FormControlLabel
<FormControlLabel
style
=
{{
margin
:
0
}}
style={{ margin: 0 }}
value
=
{
val
}
value={tableMeta.rowData[9]}
control
=
{
control={
<
NumberFormat
<NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator={true}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type
=
"text"
type="text"
placeholder
=
""
suffix={'%'}
disabled
=
{
true
}
placeholder=""
value
=
{
Number
(
handleVariance
(
tableMeta
,
1
,
0
)).
toFixed
(
1
)}
disabled={true}
/
>
value={Number(handleFormula(val, tableMeta, 0)).toFixed(1)}
}
/>
/
>
}
<
/div
>
/>
</div>
:
<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(handleVariance(tableMeta, 1, 0)).toFixed(1)}
/>
}
/>
</div>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1014,42 +995,23 @@ export default class ProfitLossMR extends Component {
...
@@ -1014,42 +995,23 @@ export default class ProfitLossMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
tableMeta.rowData[0] === 6 ?
<
div
style
=
{{
flex
:
1
}}
>
<div style={{ flex: 1 }}>
<
FormControlLabel
<FormControlLabel
style
=
{{
margin
:
0
}}
style={{ margin: 0 }}
value
=
{
val
}
value={tableMeta.rowData[9]}
control
=
{
control={
<
NumberFormat
<NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator={true}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type
=
"text"
type="text"
placeholder
=
""
placeholder=""
suffix
=
{
'%'
}
suffix={'%'}
disabled
=
{
true
}
disabled={true}
value
=
{
Number
(
handleVariancePercent
(
tableMeta
,
1
,
1
)).
toFixed
(
2
)}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/
>
/>
}
}
/
>
/>
<
/div
>
</div>
:
<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=""
suffix={'%'}
disabled={true}
value={Number(handleVariancePercent(tableMeta, 1, 1)).toFixed(2)}
/>
}
/>
</div>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1062,22 +1024,22 @@ export default class ProfitLossMR extends Component {
...
@@ -1062,22 +1024,22 @@ export default class ProfitLossMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
<div style={{ flex: 1 }}>
<
div
style
=
{{
flex
:
1
}}
>
<FormControlLabel
<
FormControlLabel
style={{ margin: 0 }}
style
=
{{
margin
:
0
}}
value={val}
value
=
{
val
}
control={
control
=
{
<NumberFormat
<
NumberFormat
thousandSeparator={true}
thousandSeparator
=
{
true
}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type="text"
type
=
"text"
placeholder=""
placeholder
=
""
disabled={true}
disabled
=
{
true
}
value={Number(handleVariance(tableMeta, 2, 2)).toFixed(1)}
value
=
{
Number
(
handleVariance
(
tableMeta
,
2
,
2
)).
toFixed
(
1
)}
/>
/
>
}
}
/>
/
>
</div>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1086,23 +1048,23 @@ export default class ProfitLossMR extends Component {
...
@@ -1086,23 +1048,23 @@ export default class ProfitLossMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
<div style={{ flex: 1 }}>
<
div
style
=
{{
flex
:
1
}}
>
<FormControlLabel
<
FormControlLabel
style={{ margin: 0 }}
style
=
{{
margin
:
0
}}
value={val}
value
=
{
val
}
control={
control
=
{
<NumberFormat
<
NumberFormat
thousandSeparator={true}
thousandSeparator
=
{
true
}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type="text"
type
=
"text"
placeholder=""
placeholder
=
""
disabled={true}
disabled
=
{
true
}
suffix={'%'}
suffix
=
{
'%'
}
value={Number(handleVariancePercent(tableMeta, 2, 3)).toFixed(2)}
value
=
{
Number
(
handleVariancePercent
(
tableMeta
,
2
,
3
)).
toFixed
(
2
)}
/>
/
>
}
}
/>
/
>
</div>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1114,23 +1076,23 @@ export default class ProfitLossMR extends Component {
...
@@ -1114,23 +1076,23 @@ export default class ProfitLossMR extends Component {
<
div
style
=
{{
textAlign
:
'right'
,
width
:
120
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
120
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
<div style={{ flex: 1 }}>
<
div
style
=
{{
flex
:
1
}}
>
<FormControlLabel
<
FormControlLabel
style={{ margin: 0 }}
style
=
{{
margin
:
0
}}
value={val}
value
=
{
val
}
control={
control
=
{
<NumberFormat
<
NumberFormat
thousandSeparator={true}
thousandSeparator
=
{
true
}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type="text"
type
=
"text"
placeholder=""
placeholder
=
""
disabled={true}
disabled
=
{
true
}
value={Number(handleVariance(tableMeta, 3, 4)).toFixed(1)}
value
=
{
Number
(
handleVariance
(
tableMeta
,
3
,
4
)).
toFixed
(
1
)}
/>
/
>
}
}
/>
/
>
</div>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1139,23 +1101,23 @@ export default class ProfitLossMR extends Component {
...
@@ -1139,23 +1101,23 @@ export default class ProfitLossMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
<div style={{ flex: 1 }}>
<
div
style
=
{{
flex
:
1
}}
>
<FormControlLabel
<
FormControlLabel
style={{ margin: 0 }}
style
=
{{
margin
:
0
}}
value={val}
value
=
{
val
}
control={
control
=
{
<NumberFormat
<
NumberFormat
thousandSeparator={true}
thousandSeparator
=
{
true
}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type="text"
type
=
"text"
placeholder=""
placeholder
=
""
disabled={true}
disabled
=
{
true
}
suffix={'%'}
suffix
=
{
'%'
}
value={Number(handleVariancePercent(tableMeta, 3, 5)).toFixed(2)}
value
=
{
Number
(
handleVariancePercent
(
tableMeta
,
3
,
5
)).
toFixed
(
2
)}
/>
/
>
}
}
/>
/
>
</div>
<
/div
>
}
}
<
/div
>
<
/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