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
f12a4977
Commit
f12a4977
authored
Nov 30, 2021
by
syadziy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update issue cf
parent
b7516f7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
31 deletions
+42
-31
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+38
-30
CashFlowOLPA.js
src/container/OutlookPA/CashFlowOLPA.js
+4
-1
No files found.
src/container/BudgetTahunan/CashFlow.js
View file @
f12a4977
...
...
@@ -394,6 +394,11 @@ export default class CashFlow extends Component {
const
handleValueFormula
=
(
value
,
tableMeta
,
column
,
periode
,
forecast
)
=>
{
loading
=
true
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
/
([
()@
])
/
)
// if (tableMeta.rowData[5] == "Cash at the end of the period" && column == 7) {
// console.log(splitFormula + " aaa");
// splitFormula = String("@2#BS").split(/([()@])/);
// console.log(splitFormula + " bbb");
// }
let
baru
=
[]
let
anjay
=
[]
...
...
@@ -427,14 +432,14 @@ export default class CashFlow extends Component {
let
indexID
=
tableMeta
.
rowData
[
data
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
)
&&
val
.
periode
==
period
)
if
(
indexID
!==
-
1
)
{
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
if
(
tableMeta
.
rowData
[
5
]
==
"Cash at the beginning period"
)
{
// console.log(dataTable2[tableMeta.rowIndex+1])
// console.log(dataTable2[tableMeta.rowIndex+1][data].value)
let
valuezzz
=
dataTable2
[
tableMeta
.
rowIndex
][
7
].
value
forecastt
+=
Number
(
valuezzz
==
""
?
0
:
valuezzz
)
}
else
{
//
if (tableMeta.rowData[5] == "Cash at the beginning period") {
//
// console.log(dataTable2[tableMeta.rowIndex+1])
//
// console.log(dataTable2[tableMeta.rowIndex+1][data].value)
//
let valuezzz = dataTable2[tableMeta.rowIndex][7].value
//
forecastt += Number(valuezzz == "" ? 0 : valuezzz)
//
} else {
forecastt
+=
Number
(
valuezz
==
""
?
0
:
valuezz
)
}
//
}
}
}
...
...
@@ -445,12 +450,12 @@ export default class CashFlow extends Component {
let
indexID
=
tableMeta
.
rowData
[
data
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
)
&&
val
.
periode
==
period
)
if
(
indexID
!==
-
1
)
{
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
if
(
tableMeta
.
rowData
[
5
]
==
"Cash at the beginning period"
)
{
let
valuezzz
=
dataTable2
[
tableMeta
.
rowIndex
+
1
][
19
]
forecastt
+=
Number
(
valuezzz
==
""
?
0
:
valuezzz
)
}
else
{
//
if (tableMeta.rowData[5] == "Cash at the beginning period") {
//
let valuezzz = dataTable2[tableMeta.rowIndex + 1][19]
//
forecastt += Number(valuezzz == "" ? 0 : valuezzz)
//
} else {
forecastt
+=
Number
(
valuezz
==
""
?
0
:
valuezz
)
}
//
}
}
}
...
...
@@ -460,12 +465,12 @@ export default class CashFlow extends Component {
let
indexID
=
forecast
.
findIndex
((
val
)
=>
String
(
val
.
item_formula
).
replace
(
'forecast_'
,
''
)
==
String
(
`@
${
tst
}
`
)
&&
val
.
periode
==
period
)
if
(
indexID
!==
-
1
)
{
let
valuezz
=
forecast
[
indexID
].
value
if
(
tableMeta
.
rowData
[
5
]
==
"Cash at the beginning period"
)
{
let
valuezzz
=
dataTable2
[
tableMeta
.
rowIndex
+
1
][
20
]
forecastt
+=
Number
(
valuezzz
==
""
?
0
:
valuezzz
)
}
else
{
//
if (tableMeta.rowData[5] == "Cash at the beginning period") {
//
let valuezzz = dataTable2[tableMeta.rowIndex + 1][20]
//
forecastt += Number(valuezzz == "" ? 0 : valuezzz)
//
} else {
forecastt
+=
Number
(
valuezz
==
""
?
0
:
valuezz
)
}
//
}
}
}
...
...
@@ -477,19 +482,19 @@ export default class CashFlow extends Component {
let
indexID
=
tableMeta
.
rowData
[
data
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
)
&&
val
.
periode
==
period
)
if
(
indexID
!==
-
1
)
{
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
if
(
tableMeta
.
rowData
[
5
]
==
"Cash at the beginning period"
&&
column
!=
7
)
{
// console.log(data)
// console.log(dataTable2[tableMeta.rowIndex+1][5])
// console.log(dataTable2[tableMeta.rowIndex+1][data])
// console.log(dataTable2[tableMeta.rowIndex-1][data].value)
// console.log(dataTable2[tableMeta.rowIndex][data].value)
// console.log(dataTable2[tableMeta.rowIndex+1][data].value)
let
valuezzz
=
dataTable2
[
tableMeta
.
rowIndex
+
1
][
data
].
value
anjay
.
push
(
valuezzz
==
""
?
0
:
valuezzz
)
}
else
{
let
valuezz
=
tableMeta
.
rowData
[
5
]
==
"Audit and other adjustment"
&&
column
==
7
?
0
:
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
//
if (tableMeta.rowData[5] == "Cash at the beginning period" && column != 7) {
//
// console.log(data)
//
// console.log(dataTable2[tableMeta.rowIndex+1][5])
//
// console.log(dataTable2[tableMeta.rowIndex+1][data])
//
// console.log(dataTable2[tableMeta.rowIndex-1][data].value)
//
// console.log(dataTable2[tableMeta.rowIndex][data].value)
//
// console.log(dataTable2[tableMeta.rowIndex+1][data].value)
//
let valuezzz = dataTable2[tableMeta.rowIndex + 1][data].value
//
anjay.push(valuezzz == "" ? 0 : valuezzz)
//
} else {
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
//
}
}
}
}
else
{
...
...
@@ -708,12 +713,15 @@ export default class CashFlow extends Component {
// }
// }
if
(
tableMeta
.
rowData
[
5
]
==
'2.1 Additional fixed assets and CIP'
&&
column
==
7
)
{
if
(
tableMeta
.
rowData
[
5
]
==
"Cash at the end of the period"
&&
column
==
7
)
{
console
.
log
(
splitFormula
)
console
.
log
(
baru
)
console
.
log
(
anjay
)
console
.
log
(
anjay2
)
console
.
log
(
total
)
let
testttt
=
dataTable2
[
tableMeta
.
rowIndex
-
1
][
8
].
value
console
.
log
(
testttt
)
total
=
testttt
}
if
(
dataTable2
[
tableMeta
.
rowIndex
][
column
].
value
==
undefined
)
{
...
...
src/container/OutlookPA/CashFlowOLPA.js
View file @
f12a4977
...
...
@@ -683,13 +683,16 @@ export default class CashFlow extends Component {
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
total
if
(
tableMeta
.
rowData
[
2
]
==
'Income Tax'
)
{
if
(
tableMeta
.
rowData
[
5
]
==
"Cash at the end of the period"
&&
column
==
6
)
{
console
.
log
(
tableMeta
.
rowData
)
console
.
log
(
splitFormula
)
console
.
log
(
baru
)
console
.
log
(
anjay
)
console
.
log
(
anjay2
)
console
.
log
(
total
)
let
testttt
=
dataTable2
[
tableMeta
.
rowIndex
-
1
][
7
].
value
console
.
log
(
testttt
)
total
=
testttt
}
if
(
dataTable2
[
tableMeta
.
rowIndex
][
column
].
value
==
undefined
)
{
...
...
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