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
ffae2654
Commit
ffae2654
authored
Oct 15, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
Didam See merge request
!542
parents
d1061a03
5235ad91
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
19 deletions
+35
-19
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+35
-19
No files found.
src/container/BudgetTahunan/TaxPlanning.js
View file @
ffae2654
...
...
@@ -728,7 +728,7 @@ export default class TaxPlanning extends Component {
let
dataFormula
=
[]
let
id
=
0
let
double
=
false
const
handleValueFormula
=
(
value
,
tableMeta
,
dex
,
xntd
)
=>
{
const
handleValueFormula
=
(
value
,
tableMeta
,
dex
,
xntd
,
forecast
,
periode
)
=>
{
// console.log(xntd)
let
form
=
dex
===
1
?
tableMeta
.
rowData
[
6
].
tbc
:
dex
===
2
?
tableMeta
.
rowData
[
6
].
fcp
:
tableMeta
.
rowData
[
6
].
tbf
let
splitFormula
=
String
(
form
).
split
(
'@'
)
...
...
@@ -748,7 +748,11 @@ export default class TaxPlanning extends Component {
}
})
if
(
tableMeta
.
rowData
[
8
]
==
"Under payment /(Over Payment ) Income Tax Art. 29"
)
{
// if (forecast !== undefined) {
// console.log(splitFormula)
// }
if
(
tableMeta
.
rowData
[
8
]
==
"Under payment /(Over Payment ) Income Tax Art. 29"
||
forecast
!==
undefined
)
{
// form.replace("(", "")
// form.replace(")", "")
let
opgab
=
[]
...
...
@@ -764,7 +768,7 @@ export default class TaxPlanning extends Component {
baru
=
opgab
}
}
let
totalShldBeNil
=
0
baru
.
map
((
item
,
index
)
=>
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
||
item
==
'('
||
item
==
')'
)
{
anjay
.
push
(
item
)
...
...
@@ -779,7 +783,14 @@ export default class TaxPlanning extends Component {
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
else
{
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
if
(
forecast
!==
undefined
)
{
forecast
.
map
((
item
,
index
)
=>
{
if
(
periode
==
item
.
periode
)
{
totalShldBeNil
+=
Number
(
item
.
value
)
}
})
anjay
.
push
(
totalShldBeNil
)
}
else
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
''
)
let
data
=
tableMeta
.
columnIndex
==
9
?
20
:
tableMeta
.
columnIndex
-
1
let
dataSub
=
dex
==
1
?
tableMeta
.
rowData
[
data
].
tbc
:
dex
==
2
?
tableMeta
.
rowData
[
data
].
fcp
:
tableMeta
.
rowData
[
data
].
tbf
...
...
@@ -899,16 +910,16 @@ export default class TaxPlanning extends Component {
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
total
// console.log(tableMeta.rowData[8])
if
(
xntd
!==
undefined
&&
tableMeta
.
rowData
[
8
]
==
"Under payment /(Over Payment ) Income Tax Art. 29"
)
{
console
.
log
(
tableMeta
.
rowData
[
8
])
// console.log(splitFormula)
console
.
log
(
xntd
)
console
.
log
(
baru
)
console
.
log
(
anjay
)
console
.
log
(
total
)
console
.
log
(
total2
)
console
.
log
(
opt
)
}
//
if (xntd !== undefined && tableMeta.rowData[8] == "Under payment /(Over Payment ) Income Tax Art. 29") {
//
console.log(tableMeta.rowData[8])
//
// console.log(splitFormula)
//
console.log(xntd)
//
console.log(baru)
//
console.log(anjay)
//
console.log(total)
//
console.log(total2)
//
console.log(opt)
//
}
// let dataSub = dex == 1? dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc : dex == 2? dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp : dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf
if
(
dex
==
1
)
{
...
...
@@ -940,14 +951,19 @@ export default class TaxPlanning extends Component {
// console.log(dex)
let
data
=
dex
==
1
?
dataTable2
[
tableMeta
.
rowIndex
][
6
].
tbc
:
dex
==
2
?
dataTable2
[
tableMeta
.
rowIndex
][
6
].
fcp
:
dataTable2
[
tableMeta
.
rowIndex
][
6
].
tbf
// let valuue =
// if (tableMeta.rowData[8] == '')
let
forecast
=
dex
==
1
?
dataTable2
[
tableMeta
.
rowIndex
][
27
]
:
dex
==
2
?
dataTable2
[
tableMeta
.
rowIndex
][
28
]
:
dataTable2
[
tableMeta
.
rowIndex
][
29
]
if
(
data
.
includes
(
'#PL'
))
{
// console.log(tableMeta.rowData[8])
if
(
tableMeta
.
rowData
[
8
]
==
"Control (should be nil)"
)
{
total
=
handleValueFormula
(
5
,
tableMeta
,
dex
,
data
,
forecast
,
periode
)
}
else
{
forecast
.
map
((
item
,
index
)
=>
{
if
(
periode
==
item
.
periode
)
{
total
+=
Number
(
item
.
value
)
}
})
}
}
else
{
// console.log(tableMeta.rowData[8])
// console.log(data)
...
...
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