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
cabd8992
Commit
cabd8992
authored
Nov 26, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
parent tp mr See merge request
!697
parents
c1c3f84a
14cd0101
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
207 additions
and
145 deletions
+207
-145
ListOfCreditFacilities.js
src/container/MonthlyReport/ListOfCreditFacilities.js
+66
-58
TaxPlanningMR.js
src/container/MonthlyReport/TaxPlanningMR.js
+141
-87
No files found.
src/container/MonthlyReport/ListOfCreditFacilities.js
View file @
cabd8992
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/TaxPlanningMR.js
View file @
cabd8992
...
...
@@ -778,7 +778,7 @@ export default class TaxPlanningMR extends Component {
}
const
handleChange
=
(
value
,
tableMeta
,
indexChilds
)
=>
{
//
console.log(dataTable2)
console
.
log
(
dataTable2
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
// let data = this.state.dataTable2
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
4
]
===
dataTable2
[
tableMeta
.
rowIndex
][
2
])
...
...
@@ -831,14 +831,14 @@ export default class TaxPlanningMR extends Component {
dataTable2
[
tableMeta
.
rowIndex
][
6
].
tbf
=
Number
(
total
).
toFixed
(
1
)
return
total
}
const
handleValue
=
(
data
)
=>
{
const
handleValue
=
(
data
,
type
)
=>
{
let
total
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
if
(
data
.
rowData
[
4
]
===
item
[
5
])
{
if
(
data
.
rowData
[
1
]
===
item
[
2
])
{
total
=
item
[
data
.
columnIndex
]
===
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
].
fcp
))
}
})
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
4
]
===
dataTable2
[
data
.
rowIndex
][
5
])
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
===
dataTable2
[
data
.
rowIndex
][
2
])
let
a
=
dataTable2
[
data
.
rowIndex
][
data
.
columnIndex
].
fcp
=
Number
(
total
)
return
a
}
...
...
@@ -957,7 +957,11 @@ export default class TaxPlanningMR extends Component {
(
type
==
2
?
item
[
tableMeta
.
columnIndex
].
fcp
.
value
==
undefined
?
Number
(
item
[
tableMeta
.
columnIndex
].
fcp
==
""
||
item
[
tableMeta
.
columnIndex
].
fcp
==
"0.0"
?
0
:
item
[
tableMeta
.
columnIndex
].
fcp
)
:
Number
(
item
[
tableMeta
.
columnIndex
].
fcp
.
value
==
""
||
item
[
tableMeta
.
columnIndex
].
fcp
.
value
==
"0.0"
?
0
:
item
[
tableMeta
.
columnIndex
].
fcp
.
value
)
:
(
type
==
3
?
item
[
tableMeta
.
columnIndex
].
tbf
.
value
==
undefined
?
Number
(
item
[
tableMeta
.
columnIndex
].
tbf
==
""
||
item
[
tableMeta
.
columnIndex
].
tbf
==
"0.0"
?
0
:
item
[
tableMeta
.
columnIndex
].
tbf
)
:
Number
(
item
[
tableMeta
.
columnIndex
].
tbf
.
value
==
""
||
item
[
tableMeta
.
columnIndex
].
tbf
.
value
==
"0.0"
?
0
:
item
[
tableMeta
.
columnIndex
].
tbf
.
value
)
:
item
[
tableMeta
.
columnIndex
].
value
==
undefined
?
Number
(
item
[
tableMeta
.
columnIndex
]
==
""
||
item
[
tableMeta
.
columnIndex
]
==
"0.0"
?
0
:
item
[
tableMeta
.
columnIndex
])
:
Number
(
item
[
tableMeta
.
columnIndex
].
value
==
""
||
item
[
tableMeta
.
columnIndex
].
value
==
"0.0"
?
0
:
item
[
tableMeta
.
columnIndex
].
value
)
)
)
)
}
...
...
@@ -967,8 +971,10 @@ export default class TaxPlanningMR extends Component {
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbc
=
total
}
else
if
(
type
==
2
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
=
total
}
else
{
}
else
if
(
type
==
3
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
=
total
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
total
}
return
total
}
...
...
@@ -1064,6 +1070,18 @@ export default class TaxPlanningMR extends Component {
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
5
]
===
"Control (should be nil)"
?
null
:
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
(
handleParent
(
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
<
/span
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -1147,6 +1165,18 @@ export default class TaxPlanningMR extends Component {
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
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
(
handleParent
(
tableMeta
,
3
)).
toFixed
(
1
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
3
]
===
7
?
(
Number
(
handleValueFormula
(
value
,
tableMeta
,
3
)).
toFixed
(
1
)
>=
Number
(
this
.
state
.
minValue
)
&&
Number
(
handleValueFormula
(
value
,
tableMeta
,
3
)).
toFixed
(
1
)
<=
Number
(
this
.
state
.
maxValue
))
?
<
NumberFormat
...
...
@@ -1228,6 +1258,18 @@ export default class TaxPlanningMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
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
(
handleParent
(
tableMeta
,
4
)).
toFixed
(
1
)}
/
>
<
/span
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -1269,6 +1311,18 @@ export default class TaxPlanningMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
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
(
handleParent
(
tableMeta
,
4
)).
toFixed
(
1
)}
/
>
<
/span
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
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