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
e17c148a
Commit
e17c148a
authored
Oct 14, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
Didam See merge request
!535
parents
f02988d0
df9c4ede
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
20 deletions
+24
-20
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+24
-20
No files found.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
e17c148a
...
...
@@ -118,7 +118,8 @@ export default class FixedAssetsMovement extends Component {
item
.
fixed_asset_movement
.
total_current_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
0
:
item
.
fixed_asset_movement
.
total_next_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
0
:
item
.
fixed_asset_movement
.
total_more_year
,
item
.
order
item
.
order
,
item
.
fixed_asset_movement
.
forecast_formula
])
}
if
(
item
.
children
!==
null
)
{
...
...
@@ -153,7 +154,8 @@ export default class FixedAssetsMovement extends Component {
item
.
fixed_asset_movement
.
total_current_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
0
:
item
.
fixed_asset_movement
.
total_next_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
0
:
item
.
fixed_asset_movement
.
total_more_year
,
item
.
order
item
.
order
,
item
.
fixed_asset_movement
.
forecast_formula
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
...
...
@@ -328,12 +330,13 @@ export default class FixedAssetsMovement extends Component {
item
.
total_next_year
,
item
.
total_more_year
,
item
.
orders
,
item
.
forecast_formula
,
item
.
error
]
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
2
3
].
length
>
0
)
{
if
(
item
[
2
4
].
length
>
0
)
{
console
.
log
(
'masuk'
)
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
...
...
@@ -591,12 +594,23 @@ export default class FixedAssetsMovement extends Component {
}
}
}
const
handleForecast
=
(
tableMeta
)
=>
{
const
handleForecast
=
(
tableMeta
,
periode
)
=>
{
let
total
=
0
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'ending balance'
||
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'beginning balance'
)
{
// console.log(dataTable2[tableMeta.rowIndex][23])
// console.log()
let
indexID
=
dataTable2
[
tableMeta
.
rowIndex
][
23
].
findIndex
((
val
)
=>
val
.
periode
==
periode
)
if
(
indexID
!==
-
1
)
{
total
=
dataTable2
[
tableMeta
.
rowIndex
][
23
][
indexID
].
value
}
}
else
{
}
// if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
// total = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex - 1]
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
// }
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
total
return
total
}
const
handleTotal
=
(
tableMeta
)
=>
{
...
...
@@ -777,8 +791,8 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
width
:
300
}}
>
{
tableMeta
.
rowData
[
2
3
]
?
tableMeta
.
rowData
[
2
3
].
length
>
0
?
{
tableMeta
.
rowData
[
2
4
]
?
tableMeta
.
rowData
[
2
4
].
length
>
0
?
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
LightTooltip
title
=
{
"Report Items Not Registered"
}
arrow
>
<
span
style
=
{{
fontSize
:
12
,
color
:
'red'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
...
...
@@ -1986,7 +2000,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handle
Value
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
Forecast
(
tableMeta
,
`
${
Number
(
this
.
props
.
periode
)
+
1
}
`
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -2000,7 +2014,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleForecast
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleForecast
(
tableMeta
,
`
${
Number
(
this
.
props
.
periode
)
+
1
}
`
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -2064,7 +2078,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handle
Value
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
Forecast
(
tableMeta
,
`
${
Number
(
this
.
props
.
periode
)
+
2
}
`
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -2078,17 +2092,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
/
>
:
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
=
{
Number
(
value
).
toFixed
(
1
)}
value
=
{
Number
(
handleForecast
(
tableMeta
,
`
${
Number
(
this
.
props
.
periode
)
+
1
}
`
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
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