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
9b65fcff
Commit
9b65fcff
authored
May 05, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'GGMAC' into 'master'
update CF See merge request
!1459
parents
568739bb
9084700c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
8 deletions
+46
-8
CashFlowMR.js
src/container/MonthlyReport/CashFlowMR.js
+46
-8
No files found.
src/container/MonthlyReport/CashFlowMR.js
View file @
9b65fcff
...
@@ -88,6 +88,7 @@ export default class CashFlowMR extends Component {
...
@@ -88,6 +88,7 @@ export default class CashFlowMR extends Component {
// console.log(checkApprover)
// console.log(checkApprover)
// console.log(checkPrevRev)
// console.log(checkPrevRev)
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
&&
checkPrevRev
})
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
&&
checkPrevRev
})
// this.setState({viewOnly: true})
}
}
componentDidMount
()
{
componentDidMount
()
{
...
@@ -346,10 +347,7 @@ export default class CashFlowMR extends Component {
...
@@ -346,10 +347,7 @@ export default class CashFlowMR extends Component {
}
}
})
})
// console.log(tableMeta.rowData[5])
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
let
anjay2
=
[]
let
anjay2
=
[]
let
kurung
=
false
let
kurung
=
false
...
@@ -402,24 +400,52 @@ export default class CashFlowMR extends Component {
...
@@ -402,24 +400,52 @@ export default class CashFlowMR extends Component {
}
}
})
})
if
(
index
==
anjay2
.
length
-
1
)
{
// if (index == anjay2.length - 1) {
// if (opt == "tambah") {
// total = Number(total) + Number(totalPrio)
// } else if (opt == "kurang") {
// total = Number(total) - Number(totalPrio)
// } else if (opt == "kali") {
// total = Number(total) * Number(totalPrio)
// } else if (opt == "bagi") {
// total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
// } else {
// total += Number(totalPrio)
// }
// }
// if (opt == "") {
// total = Number(Number(total) + Number(totalPrio))
// } else {
if
(
opt
==
"tambah"
)
{
if
(
opt
==
"tambah"
)
{
total
=
Number
(
total
)
+
Number
(
totalPrio
)
total
=
Number
(
total
)
+
Number
(
totalPrio
)
totalPrio
=
0
}
else
if
(
opt
==
"kurang"
)
{
}
else
if
(
opt
==
"kurang"
)
{
total
=
Number
(
total
)
-
Number
(
totalPrio
)
total
=
Number
(
total
)
-
Number
(
totalPrio
)
totalPrio
=
0
}
else
if
(
opt
==
"kali"
)
{
}
else
if
(
opt
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
totalPrio
)
total
=
Number
(
total
)
*
Number
(
totalPrio
)
totalPrio
=
0
}
else
if
(
opt
==
"bagi"
)
{
}
else
if
(
opt
==
"bagi"
)
{
total
=
Number
(
total
)
/
Number
(
totalPrio
)
==
NaN
?
0
:
Number
(
total
)
/
Number
(
totalPrio
)
total
=
Number
(
total
)
/
Number
(
totalPrio
)
==
NaN
?
0
:
Number
(
total
)
/
Number
(
totalPrio
)
}
else
{
totalPrio
=
0
total
+=
Number
(
totalPrio
)
}
}
}
// }
// if (tableMeta.rowData[5] == '3.2 Movement of SHL and intercompany loan (nett)') {
// console.log(totalPrio)
// console.log(opt)
// console.log(total)
// }
}
else
{
}
else
{
// const handleReturn = (x,y) => {
// return Number(totalXYZ)
// }
if
(
item
==
"+"
)
{
if
(
item
==
"+"
)
{
opt
=
"tambah"
opt
=
"tambah"
if
(
prio
)
{
if
(
prio
)
{
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
// total = handleReturn()
prio
=
false
prio
=
false
totalPrio
=
0
totalPrio
=
0
optPrio
=
""
optPrio
=
""
...
@@ -428,6 +454,7 @@ export default class CashFlowMR extends Component {
...
@@ -428,6 +454,7 @@ export default class CashFlowMR extends Component {
opt
=
"kurang"
opt
=
"kurang"
if
(
prio
)
{
if
(
prio
)
{
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
// total = handleReturn()
prio
=
false
prio
=
false
totalPrio
=
0
totalPrio
=
0
optPrio
=
""
optPrio
=
""
...
@@ -436,6 +463,7 @@ export default class CashFlowMR extends Component {
...
@@ -436,6 +463,7 @@ export default class CashFlowMR extends Component {
opt
=
"kali"
opt
=
"kali"
if
(
prio
)
{
if
(
prio
)
{
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
// total = handleReturn()
prio
=
false
prio
=
false
totalPrio
=
0
totalPrio
=
0
optPrio
=
""
optPrio
=
""
...
@@ -444,6 +472,7 @@ export default class CashFlowMR extends Component {
...
@@ -444,6 +472,7 @@ export default class CashFlowMR extends Component {
opt
=
"bagi"
opt
=
"bagi"
if
(
prio
)
{
if
(
prio
)
{
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
// total = handleReturn()
prio
=
false
prio
=
false
totalPrio
=
0
totalPrio
=
0
optPrio
=
""
optPrio
=
""
...
@@ -464,6 +493,15 @@ export default class CashFlowMR extends Component {
...
@@ -464,6 +493,15 @@ export default class CashFlowMR extends Component {
}
}
})
})
// if (tableMeta.rowData[5] == '3.2 Movement of SHL and intercompany loan (nett)' || tableMeta.rowData[5] == '3.6 Other') {
// console.log(tableMeta.rowData[5])
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
// console.log(anjay2)
// console.log(total)
// }
dataTable2
[
tableMeta
.
rowIndex
][
6
].
value
=
total
dataTable2
[
tableMeta
.
rowIndex
][
6
].
value
=
total
return
total
return
total
...
...
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