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
eecb33c7
Commit
eecb33c7
authored
Oct 14, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
2080b668
e9594894
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
21 deletions
+25
-21
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+25
-21
No files found.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
eecb33c7
...
...
@@ -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
})
}
...
...
@@ -503,7 +506,7 @@ export default class FixedAssetsMovement extends Component {
// console.log(valuezz)
}
}
else
{
let
indexID
=
value
.
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
))
let
indexID
=
value
.
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
)
)
// console.log(indexID)
if
(
indexID
!==
-
1
)
{
// console.log(value.formula[indexID].value)
...
...
@@ -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