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
b0b3493a
Commit
b0b3493a
authored
Nov 03, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
update FAM See merge request
!609
parents
8fb51ecf
b046a8b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
14 deletions
+46
-14
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+46
-14
No files found.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
b0b3493a
...
@@ -87,7 +87,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -87,7 +87,7 @@ export default class FixedAssetsMovement extends Component {
"submission_id"
:
this
.
props
.
submissionID
"submission_id"
:
this
.
props
.
submissionID
}
}
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
//
//
console.log(response);
// console.log(response);
let
dataTable
=
[]
let
dataTable
=
[]
if
(
response
.
data
)
{
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
let
res
=
response
.
data
.
data
...
@@ -118,7 +118,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -118,7 +118,8 @@ export default class FixedAssetsMovement extends Component {
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_next_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
0
:
item
.
fixed_asset_movement
.
total_more_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
item
.
fixed_asset_movement
.
forecast_formula
,
item
.
fixed_asset_movement
.
before_formula
])
])
}
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
@@ -154,7 +155,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -154,7 +155,8 @@ export default class FixedAssetsMovement extends Component {
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_next_year
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
0
:
item
.
fixed_asset_movement
.
total_more_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
item
.
fixed_asset_movement
.
forecast_formula
,
item
.
fixed_asset_movement
.
before_formula
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
.
length
>
0
)
{
...
@@ -330,6 +332,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -330,6 +332,7 @@ export default class FixedAssetsMovement extends Component {
item
.
total_more_year
,
item
.
total_more_year
,
item
.
orders
,
item
.
orders
,
item
.
forecast_formula
,
item
.
forecast_formula
,
item
.
before_formula
,
item
.
error
item
.
error
]
]
})
})
...
@@ -463,7 +466,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -463,7 +466,7 @@ export default class FixedAssetsMovement extends Component {
render
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleValueFormula
=
(
value
,
tableMeta
)
=>
{
const
handleValueFormula
=
(
value
,
tableMeta
,
Bfr
)
=>
{
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
'@'
)
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
'@'
)
let
baru
=
[]
let
baru
=
[]
let
anjay
=
[]
let
anjay
=
[]
...
@@ -495,7 +498,17 @@ export default class FixedAssetsMovement extends Component {
...
@@ -495,7 +498,17 @@ export default class FixedAssetsMovement extends Component {
anjay
.
push
(
item
)
anjay
.
push
(
item
)
}
else
{
}
else
{
if
(
String
(
item
).
includes
(
'#'
))
{
if
(
String
(
item
).
includes
(
'#'
))
{
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
if
(
Bfr
!==
undefined
)
{
let
data
=
24
let
period
=
Number
(
this
.
props
.
periode
)
-
1
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
][
data
])
anjay
.
push
(
0
)
let
indexID
=
dataTable2
[
tableMeta
.
rowIndex
][
data
].
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
period
)
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
tableMeta
.
rowIndex
][
data
][
indexID
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
else
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
''
)
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
''
)
let
data
=
tableMeta
.
columnIndex
==
7
?
18
:
tableMeta
.
columnIndex
-
1
let
data
=
tableMeta
.
columnIndex
==
7
?
18
:
tableMeta
.
columnIndex
-
1
let
period
=
data
==
18
?
Number
(
this
.
props
.
periode
)
-
1
:
this
.
props
.
periode
let
period
=
data
==
18
?
Number
(
this
.
props
.
periode
)
-
1
:
this
.
props
.
periode
...
@@ -607,20 +620,13 @@ export default class FixedAssetsMovement extends Component {
...
@@ -607,20 +620,13 @@ export default class FixedAssetsMovement extends Component {
const
handleForecast
=
(
tableMeta
,
periode
)
=>
{
const
handleForecast
=
(
tableMeta
,
periode
)
=>
{
let
total
=
0
let
total
=
0
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'gain/ (loss) on fixed assets'
||
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'ending balance'
||
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'beginning balance'
)
{
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'gain/ (loss) on fixed assets'
||
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
)
let
indexID
=
dataTable2
[
tableMeta
.
rowIndex
][
23
].
findIndex
((
val
)
=>
val
.
periode
==
periode
)
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
total
=
dataTable2
[
tableMeta
.
rowIndex
][
23
][
indexID
].
value
total
=
dataTable2
[
tableMeta
.
rowIndex
][
23
][
indexID
].
value
}
}
}
else
{
}
else
{
total
=
handleValueFormula
(
tableMeta
.
columnIndex
,
tableMeta
)
total
=
handleValueFormula
(
tableMeta
.
columnIndex
,
tableMeta
)
// // console.log(dataTable2[tableMeta.rowIndex])
}
}
// 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
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
total
return
total
return
total
}
}
...
@@ -659,6 +665,13 @@ export default class FixedAssetsMovement extends Component {
...
@@ -659,6 +665,13 @@ export default class FixedAssetsMovement extends Component {
// // console.log(indexParent);
// // console.log(indexParent);
return
a
return
a
}
}
const
handleBfr
=
(
value
,
tableMeta
)
=>
{
let
total
=
0
total
=
handleValueFormula
(
value
,
tableMeta
,
'before'
)
return
total
}
const
handleFormula
=
(
data
,
tableMeta
,
month
)
=>
{
const
handleFormula
=
(
data
,
tableMeta
,
month
)
=>
{
let
rilFormula
=
String
(
tableMeta
.
rowData
[
3
])
let
rilFormula
=
String
(
tableMeta
.
rowData
[
3
])
if
(
rilFormula
.
includes
(
"#"
))
{
if
(
rilFormula
.
includes
(
"#"
))
{
...
@@ -765,6 +778,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -765,6 +778,7 @@ export default class FixedAssetsMovement extends Component {
return
a
return
a
}
}
}
}
const
columns
=
[{
const
columns
=
[{
name
:
""
,
name
:
""
,
options
:
{
options
:
{
...
@@ -802,8 +816,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -802,8 +816,8 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
300
}}
>
<
div
style
=
{{
width
:
300
}}
>
{
tableMeta
.
rowData
[
2
4
]
?
{
tableMeta
.
rowData
[
2
5
]
?
tableMeta
.
rowData
[
2
4
].
length
>
0
?
tableMeta
.
rowData
[
2
5
].
length
>
0
?
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
LightTooltip
title
=
{
"Report Items Not Registered"
}
arrow
>
<
LightTooltip
title
=
{
"Report Items Not Registered"
}
arrow
>
<
span
style
=
{{
fontSize
:
12
,
color
:
'red'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
span
style
=
{{
fontSize
:
12
,
color
:
'red'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
...
@@ -843,6 +857,24 @@ export default class FixedAssetsMovement extends Component {
...
@@ -843,6 +857,24 @@ export default class FixedAssetsMovement extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleBfr
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
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