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
21972c67
Commit
21972c67
authored
Aug 27, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing parent balancesheet
parent
625f6a06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
11 deletions
+47
-11
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+47
-11
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
21972c67
...
...
@@ -38,6 +38,7 @@ export default class BalanceSheet extends Component {
// ["Trade Receivables - Third Party", "142,668", "77,480"],
]
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
}
componentDidMount
()
{
...
...
@@ -61,6 +62,7 @@ export default class BalanceSheet extends Component {
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
])
...
...
@@ -71,23 +73,48 @@ export default class BalanceSheet extends Component {
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
])
i
.
children
.
map
(
val
=>
{
dataTable
.
push
([
val
.
type_report_id
,
val
.
id
,
val
.
parent
,
val
.
level
,
val
.
description
])
if
(
val
.
children
&&
val
.
children
.
length
>
0
)
{
dataTable
.
push
([
val
.
type_report_id
,
val
.
id
,
val
.
parent
,
val
.
formula
,
val
.
level
,
val
.
description
])
val
.
children
.
map
(
items
=>
{
console
.
log
(
items
)
dataTable
.
push
([
items
.
type_report_id
,
items
.
id
,
items
.
parent
,
items
.
formula
,
items
.
level
,
items
.
description
])
})
}
else
{
dataTable
.
push
([
val
.
type_report_id
,
val
.
id
,
val
.
parent
,
val
.
formula
,
val
.
level
,
val
.
description
])
}
})
}
else
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
])
...
...
@@ -97,6 +124,7 @@ export default class BalanceSheet extends Component {
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
])
...
...
@@ -107,6 +135,7 @@ export default class BalanceSheet extends Component {
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
])
...
...
@@ -137,12 +166,14 @@ export default class BalanceSheet extends Component {
let
data
=
this
.
state
.
dataTable
let
indexParent
=
data
.
findIndex
((
val
)
=>
val
[
1
]
==
data
[
tableMeta
.
rowIndex
][
2
])
if
(
indexParent
>
0
)
{
console
.
log
(
indexParent
)
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
let
jagain
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
a
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
}
else
{
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
this
.
forceUpdate
()
// console.log(this.state.dataTable)
// this.setState({
// data: a,
...
...
@@ -170,6 +201,11 @@ export default class BalanceSheet extends Component {
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
"Account"
,
options
:
{
...
...
@@ -182,12 +218,12 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
width
:
388
}}
>
{
tableMeta
.
rowData
[
3
]
==
0
?
{
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
val
).
toUpperCase
()}
<
/span
>
:
tableMeta
.
rowData
[
3
]
===
1
?
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
}}
>
{
val
}
<
/span>
:
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
40
}}
>
{
val
}
<
/span
>
tableMeta
.
rowData
[
4
]
===
1
?
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
val
}
<
/span>
:
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
val
}
<
/span
>
}
<
/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