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
8d36c267
Commit
8d36c267
authored
Sep 21, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
belenskriittt See merge request
!345
parents
94219474
c4e52e80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
64 deletions
+23
-64
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+23
-64
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
8d36c267
...
@@ -344,6 +344,7 @@ export default class BalanceSheet extends Component {
...
@@ -344,6 +344,7 @@ export default class BalanceSheet extends Component {
})
})
})
})
let
body
=
{
let
body
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
report_id
:
this
.
props
.
report_id
,
...
@@ -384,7 +385,14 @@ export default class BalanceSheet extends Component {
...
@@ -384,7 +385,14 @@ export default class BalanceSheet extends Component {
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
// let data = this.state.dataTable2
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
>=
7
&&
index
<=
18
)
{
let
valItem
=
item
==
undefined
||
item
==
""
?
0
:
item
total
+=
Number
(
valItem
)
}
})
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
if
(
type
===
"actual"
)
{
if
(
type
===
"actual"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
else
{
}
else
{
...
@@ -1610,29 +1618,9 @@ export default class BalanceSheet extends Component {
...
@@ -1610,29 +1618,9 @@ export default class BalanceSheet extends Component {
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
width
:
96
,
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
4
?
<
div
style
=
{{
flex
:
1
}}
>
null
:
tableMeta
.
rowData
[
0
]
===
2
?
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1642,46 +1630,17 @@ export default class BalanceSheet extends Component {
...
@@ -1642,46 +1630,17 @@ export default class BalanceSheet extends Component {
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
handleValue
(
tableMeta
)}
/
>
/
>
<
/span
>
<
/span>
:
:
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
tableMeta
.
rowData
[
0
]
===
4
?
<
NumberFormat
null
thousandSeparator
=
{
true
}
:
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
tableMeta
.
rowData
[
0
]
===
6
?
type
=
"text"
<
NumberFormat
placeholder
=
""
thousandSeparator
=
{
true
}
disabled
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
value
=
{
value
}
type
=
"text"
/
>
placeholder
=
""
<
/span>
}
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
// value === "" ?
// null :
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(value)}
// />
null
:
null
}
<
/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