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
642294f6
Commit
642294f6
authored
Oct 14, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apdet
parent
b315698d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
21 deletions
+30
-21
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+25
-19
Constant.js
src/library/Constant.js
+5
-2
No files found.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
642294f6
...
@@ -591,18 +591,34 @@ export default class FixedAssetsMovement extends Component {
...
@@ -591,18 +591,34 @@ export default class FixedAssetsMovement extends Component {
}
}
}
}
}
}
const
handleForecast
=
(
tableMeta
)
=>
{
let
total
=
0
// if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
// total = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex - 1]
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
// }
return
total
}
const
handleTotal
=
(
tableMeta
)
=>
{
const
handleTotal
=
(
tableMeta
)
=>
{
let
total
=
0
let
total
=
0
// if (tableMeta.rowData[5] == 'Beginning balance') {
// if (tableMeta.rowData[5] == 'Beginning balance') {
// console.log(tableMeta.rowData)
// console.log(tableMeta.rowData)
// }
// }
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'ending balance'
)
{
if
(
index
>=
7
&&
index
<=
18
)
{
total
=
dataTable2
[
tableMeta
.
rowIndex
][
18
].
value
let
valItem
=
item
.
value
==
undefined
?
item
==
undefined
||
item
==
""
?
0
:
item
:
item
.
value
==
""
?
0
:
item
.
value
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
total
+=
Number
(
valItem
)
}
else
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
'beginning balance'
)
{
}
total
=
dataTable2
[
tableMeta
.
rowIndex
][
7
].
value
})
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
}
else
{
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
>=
7
&&
index
<=
18
)
{
let
valItem
=
item
.
value
==
undefined
?
item
==
undefined
||
item
==
""
?
0
:
item
:
item
.
value
==
""
?
0
:
item
.
value
total
+=
Number
(
valItem
)
}
})
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
}
return
total
return
total
// console.log(total);
// console.log(total);
}
}
...
@@ -799,7 +815,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -799,7 +815,7 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
...
@@ -1984,18 +2000,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1984,18 +2000,8 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
value
=
{
Number
(
handleForecast
(
tableMeta
)
).
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
)}
/
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
// value === "" ?
// value === "" ?
...
...
src/library/Constant.js
View file @
642294f6
...
@@ -2,8 +2,11 @@ const Constant = {
...
@@ -2,8 +2,11 @@ const Constant = {
TOKEN
:
null
,
TOKEN
:
null
,
USER
:
0
,
USER
:
0
,
EMAIL
:
'TOKEN'
,
EMAIL
:
'TOKEN'
,
PASSWORD
:
'PASSWORD'
PASSWORD
:
'PASSWORD'
,
URL_BE_DEFAULT
:
'https://tia.eksad.com/tia-reporting-dev'
,
URL_FE_DEFAULT
:
'https://tia.eksad.com/tia-web-dev'
,
URL_BE_DEMO
:
'https://tia.eksad.com/tia-reporting-demo'
,
URL_FE_DEMO
:
'https://tia.eksad.com/tia-web-demo'
,
}
}
export
default
Constant
;
export
default
Constant
;
\ No newline at end of file
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