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
95e326df
Commit
95e326df
authored
Apr 15, 2021
by
r.kurnia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formula tp olpa
parent
0a799d7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
224 additions
and
93 deletions
+224
-93
TaxPlanningOLPA.js
src/container/OutlookPA/TaxPlanningOLPA.js
+224
-93
No files found.
src/container/OutlookPA/TaxPlanningOLPA.js
View file @
95e326df
...
@@ -206,8 +206,8 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -206,8 +206,8 @@ export default class TaxPlanningOLPA extends Component {
fcp
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
item
.
tax_planning
.
august
.
tbf
},
fcp
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
item
.
tax_planning
.
august
.
tbf
},
{
tbc
:
item
.
tax_planning
.
september
.
tbc
,
fcp
:
item
.
tax_planning
.
september
.
fcp
,
tbf
:
item
.
tax_planning
.
september
.
tbf
},
{
tbc
:
item
.
tax_planning
.
september
.
tbc
,
fcp
:
item
.
tax_planning
.
september
.
fcp
,
tbf
:
item
.
tax_planning
.
september
.
tbf
},
{
tbc
:
item
.
tax_planning
.
october
.
tbc
,
fcp
:
item
.
tax_planning
.
october
.
fcp
,
tbf
:
item
.
tax_planning
.
october
.
tbf
},
{
tbc
:
item
.
tax_planning
.
october
.
tbc
,
fcp
:
item
.
tax_planning
.
october
.
fcp
,
tbf
:
item
.
tax_planning
.
october
.
tbf
},
{
tbc
:
item
.
tax_planning
.
november
.
tbc
,
fcp
:
item
.
tax_planning
.
november
.
fcp
,
tbf
:
item
.
tax_planning
.
november
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
tbc
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
fcp
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
tbf
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
tbf
},
{
tbc
:
item
.
tax_planning
.
december
.
tbc
,
fcp
:
item
.
tax_planning
.
december
.
fcp
,
tbf
:
item
.
tax_planning
.
december
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
tbc
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
fcp
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
tbf
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
tbf
},
item
.
tax_planning
.
total_current_year
,
item
.
tax_planning
.
total_current_year
,
0
,
0
,
0
,
0
,
...
@@ -247,8 +247,8 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -247,8 +247,8 @@ export default class TaxPlanningOLPA extends Component {
fcp
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
item
.
tax_planning
.
august
.
tbf
},
fcp
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
item
.
tax_planning
.
august
.
tbf
},
{
tbc
:
item
.
tax_planning
.
september
.
tbc
,
fcp
:
item
.
tax_planning
.
september
.
fcp
,
tbf
:
item
.
tax_planning
.
september
.
tbf
},
{
tbc
:
item
.
tax_planning
.
september
.
tbc
,
fcp
:
item
.
tax_planning
.
september
.
fcp
,
tbf
:
item
.
tax_planning
.
september
.
tbf
},
{
tbc
:
item
.
tax_planning
.
october
.
tbc
,
fcp
:
item
.
tax_planning
.
october
.
fcp
,
tbf
:
item
.
tax_planning
.
october
.
tbf
},
{
tbc
:
item
.
tax_planning
.
october
.
tbc
,
fcp
:
item
.
tax_planning
.
october
.
fcp
,
tbf
:
item
.
tax_planning
.
october
.
tbf
},
{
tbc
:
item
.
tax_planning
.
november
.
tbc
,
fcp
:
item
.
tax_planning
.
november
.
fcp
,
tbf
:
item
.
tax_planning
.
november
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
tbc
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
fcp
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
november
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
november
.
tbf
,
formula
:
item
.
tax_planning
.
november_formula
}
:
item
.
tax_planning
.
november
.
tbf
},
{
tbc
:
item
.
tax_planning
.
december
.
tbc
,
fcp
:
item
.
tax_planning
.
december
.
fcp
,
tbf
:
item
.
tax_planning
.
december
.
tbf
},
{
tbc
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
tbc
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
tbc
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
tbc
,
fcp
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
fcp
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_fc
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_fc
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
fcp
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
fcp
,
tbf
:
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
tax_planning
.
december
.
tbf
).
toFixed
(
1
)
:
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
5
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
6
||
item
.
type_report_tax
.
value_tbf
.
type_report_id
==
7
?
{
value
:
item
.
tax_planning
.
december
.
tbf
,
formula
:
item
.
tax_planning
.
december_formula
}
:
item
.
tax_planning
.
december
.
tbf
},
item
.
tax_planning
.
total_current_year
,
item
.
tax_planning
.
total_current_year
,
0
,
0
,
0
,
0
,
...
@@ -504,7 +504,7 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -504,7 +504,7 @@ export default class TaxPlanningOLPA extends Component {
checkUpload
()
{
checkUpload
()
{
api
.
create
().
checkUploadOLPA
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadOLPA
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
// console.log(JSON.stringify(this.state.payload));
//
console.log(response)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visibleTP
:
false
,
loading
:
true
})
this
.
setState
({
visibleUpload
:
false
,
visibleTP
:
false
,
loading
:
true
})
...
@@ -870,11 +870,11 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -870,11 +870,11 @@ export default class TaxPlanningOLPA extends Component {
let
dataFormula
=
[]
let
dataFormula
=
[]
let
id
=
0
let
id
=
0
let
double
=
false
let
double
=
false
const
handleValueFormula
=
(
value
,
tableMeta
,
dex
,
xntd
,
forecast
,
periode
)
=>
{
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
form
=
dex
===
1
?
tableMeta
.
rowData
[
6
].
tbc
:
dex
===
2
?
tableMeta
.
rowData
[
6
].
fcp
:
tableMeta
.
rowData
[
6
].
tbf
let
splitFormula
=
String
(
form
).
split
(
'@'
)
let
splitFormula
=
String
(
form
).
split
(
'@'
)
// console.log(form)
// console.log(splitFormula)
let
baru
=
[]
let
baru
=
[]
let
anjay
=
[]
let
anjay
=
[]
splitFormula
.
map
((
item
,
index
)
=>
{
splitFormula
.
map
((
item
,
index
)
=>
{
...
@@ -882,20 +882,24 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -882,20 +882,24 @@ export default class TaxPlanningOLPA extends Component {
let
re
=
/^
[
a-zA-Z0-9_
]
+$/
;
let
re
=
/^
[
a-zA-Z0-9_
]
+$/
;
let
asd
=
''
let
asd
=
''
if
(
item
!==
""
)
{
if
(
item
!==
""
)
{
// console.log(item)
// console.log(items)
// re.test(items) ngecek angka
if
(
!
re
.
test
(
items
))
{
if
(
!
re
.
test
(
items
))
{
baru
.
push
(
String
(
item
).
substr
(
0
,
Number
(
String
(
item
).
length
)
-
1
))
baru
.
push
(
String
(
item
).
substr
(
0
,
Number
(
String
(
item
).
length
)
-
1
))
baru
.
push
(
String
(
item
).
substr
(
Number
(
String
(
item
).
length
)
-
1
,
1
))
baru
.
push
(
String
(
item
).
substr
(
Number
(
String
(
item
).
length
)
-
1
,
1
))
}
else
{
}
else
{
baru
.
push
(
String
(
item
))
baru
.
push
(
String
(
item
))
}
}
// console.log(baru)
}
}
})
})
// console.log(baru);
// if (forecast !== undefined) {
// console.log(splitFormula)
// }
if
(
tableMeta
.
rowData
[
8
]
==
"Under payment /(Over Payment ) Income Tax Art. 29"
||
forecast
!==
undefined
)
{
if
(
tableMeta
.
rowData
[
8
]
==
"Under payment /(Over Payment ) Income Tax Art. 29"
||
forecast
!==
undefined
)
{
// form.replace("(", "")
// form.replace(")", "")
let
opgab
=
[]
let
opgab
=
[]
baru
.
map
((
item
,
index
)
=>
{
baru
.
map
((
item
,
index
)
=>
{
if
(
item
.
length
>
1
&&
(
item
.
includes
(
"+"
)
||
item
.
includes
(
"-"
)
||
item
.
includes
(
"*"
)
||
item
.
includes
(
"/"
)))
{
if
(
item
.
length
>
1
&&
(
item
.
includes
(
"+"
)
||
item
.
includes
(
"-"
)
||
item
.
includes
(
"*"
)
||
item
.
includes
(
"/"
)))
{
...
@@ -915,14 +919,17 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -915,14 +919,17 @@ export default class TaxPlanningOLPA extends Component {
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
||
item
==
'('
||
item
==
')'
)
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
||
item
==
'('
||
item
==
')'
)
{
anjay
.
push
(
item
)
anjay
.
push
(
item
)
}
else
{
}
else
{
// console.log(item)
if
(
String
(
item
).
includes
(
'#'
))
{
if
(
String
(
item
).
includes
(
'#'
))
{
let
splitform
=
String
(
item
).
split
(
'#'
)
let
splitform
=
String
(
item
).
split
(
'#'
)
if
(
splitform
[
1
]
==
'TP1'
||
splitform
[
1
]
==
'TP2'
||
splitform
[
1
]
==
'TP3'
)
{
if
(
splitform
[
1
]
==
'TP1'
||
splitform
[
1
]
==
'TP2'
||
splitform
[
1
]
==
'TP3'
)
{
// console.log(dataTable2)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
24
]
==
splitform
[
0
])
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
24
]
==
splitform
[
0
])
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
// console.log(splitform)
let
data
=
splitform
[
1
]
==
'TP1'
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbc
:
splitform
[
1
]
==
'TP2'
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
fcp
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbf
let
data
=
splitform
[
1
]
==
'TP1'
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbc
:
splitform
[
1
]
==
'TP2'
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
fcp
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbf
// console.log(data)
// if(value == null){
// console.log(tableMeta);
// }
let
valuezz
=
data
.
value
==
undefined
?
data
:
data
.
value
let
valuezz
=
data
.
value
==
undefined
?
data
:
data
.
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
...
@@ -944,17 +951,19 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -944,17 +951,19 @@ export default class TaxPlanningOLPA extends Component {
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
}
}
else
{
// else {
// console.log(value);
// let data = dex == 1 ? value.tbc : dex == 2 ? value.fcp : value.tbf
// if(value == null){
// // let data = dex == 1 ? tableMeta.rowData[data].tbc : dex == 2 ? tableMeta.rowData[data].fcp : tableMeta.rowData[data].tbf
// console.log(tableMeta);
// console.log(data);
// }
// let indexID = data.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
let
data
=
dex
==
1
?
value
.
tbc
:
dex
==
2
?
value
.
fcp
:
value
.
tbf
// if (indexID !== -1) {
// console.log(data);
// let valuezz = data.formula[indexID].value
let
indexID
=
data
.
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
))
// anjay.push(valuezz == "" ? 0 : valuezz)
if
(
indexID
!==
-
1
)
{
// }
let
valuezz
=
data
.
formula
[
indexID
].
value
// }
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
}
}
}
else
{
}
else
{
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
24
]
==
item
)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
24
]
==
item
)
...
@@ -962,7 +971,7 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -962,7 +971,7 @@ export default class TaxPlanningOLPA extends Component {
if
(
dataTable2
[
indexID
][
24
]
==
tableMeta
.
rowData
[
24
])
{
if
(
dataTable2
[
indexID
][
24
]
==
tableMeta
.
rowData
[
24
])
{
anjay
.
push
(
0
)
anjay
.
push
(
0
)
}
else
{
}
else
{
let
data
=
dex
==
1
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbc
:
dex
==
2
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
fcp
:
d
ex
==
3
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbf
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
]
let
data
=
dex
==
1
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbc
:
dex
==
2
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
fcp
:
d
ataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbf
let
valuezz
=
data
.
value
==
undefined
?
data
:
data
.
value
let
valuezz
=
data
.
value
==
undefined
?
data
:
data
.
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
...
@@ -1076,12 +1085,25 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -1076,12 +1085,25 @@ export default class TaxPlanningOLPA extends Component {
}
else
{
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
.
value
=
Number
(
total
).
toFixed
(
1
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
.
value
=
Number
(
total
).
toFixed
(
1
)
}
}
}
else
{
}
else
if
(
dex
==
3
)
{
if
(
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
.
value
==
undefined
)
{
if
(
tableMeta
.
rowData
[
8
]
==
"Corporate Income Tax"
)
{
if
(
total
<
0
)
{
total
=
0
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
=
Number
(
total
).
toFixed
(
2
)
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
=
Number
(
total
).
toFixed
(
2
)
}
}
else
if
(
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
.
value
==
undefined
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
=
Number
(
total
).
toFixed
(
1
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
=
Number
(
total
).
toFixed
(
1
)
}
else
{
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
.
value
=
Number
(
total
).
toFixed
(
1
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
.
value
=
Number
(
total
).
toFixed
(
1
)
}
}
}
else
{
if
(
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
value
==
undefined
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
total
).
toFixed
(
1
)
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
value
=
Number
(
total
).
toFixed
(
1
)
}
}
}
return
Number
(
total
).
toFixed
(
1
)
return
Number
(
total
).
toFixed
(
1
)
...
@@ -1110,6 +1132,7 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -1110,6 +1132,7 @@ export default class TaxPlanningOLPA extends Component {
}
}
}
}
}
}
const
handleTotal
=
(
tableMeta
,
dex
)
=>
{
const
handleTotal
=
(
tableMeta
,
dex
)
=>
{
// console.log(tableMeta)
// console.log(tableMeta)
let
total
=
0
let
total
=
0
...
@@ -1971,22 +1994,40 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -1971,22 +1994,40 @@ export default class TaxPlanningOLPA extends Component {
null
null
:
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
div
style
=
{{
flex
:
1
}}
>
tableMeta
.
rowData
[
1
]
===
5
||
tableMeta
.
rowData
[
1
]
===
6
||
tableMeta
.
rowData
[
1
]
===
7
?
<
FormControlLabel
<
div
style
=
{{
flex
:
1
}}
>
style
=
{{
margin
:
0
}}
<
FormControlLabel
value
=
{
value
.
tbc
}
style
=
{{
margin
:
0
}}
control
=
{
value
=
{
value
.
tbc
}
<
NumberFormat
control
=
{
thousandSeparator
=
{
true
}
<
NumberFormat
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
thousandSeparator
=
{
true
}
type
=
"text"
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
placeholder
=
""
type
=
"text"
disabled
=
{
true
}
placeholder
=
""
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
tbc
).
toFixed
(
2
)
:
Number
(
value
.
tbc
).
toFixed
(
1
)}
disabled
=
{
true
}
/
>
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
tbc
.
value
).
toFixed
(
2
)
:
Number
(
value
.
tbc
.
value
).
toFixed
(
1
)}
}
/
>
/
>
}
<
/div
>
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
.
tbc
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
tbc
).
toFixed
(
2
)
:
Number
(
value
.
tbc
).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
:
:
tableMeta
.
rowData
[
1
]
===
3
?
tableMeta
.
rowData
[
1
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
...
@@ -2090,22 +2131,40 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -2090,22 +2131,40 @@ export default class TaxPlanningOLPA extends Component {
null
null
:
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
div
style
=
{{
flex
:
1
}}
>
tableMeta
.
rowData
[
2
]
===
5
||
tableMeta
.
rowData
[
2
]
===
6
||
tableMeta
.
rowData
[
2
]
===
7
?
<
FormControlLabel
<
div
style
=
{{
flex
:
1
}}
>
style
=
{{
margin
:
0
}}
<
FormControlLabel
value
=
{
value
.
fcp
}
style
=
{{
margin
:
0
}}
control
=
{
value
=
{
value
.
fcp
}
<
NumberFormat
control
=
{
thousandSeparator
=
{
true
}
<
NumberFormat
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
thousandSeparator
=
{
true
}
type
=
"text"
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
placeholder
=
""
type
=
"text"
disabled
=
{
true
}
placeholder
=
""
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
fcp
).
toFixed
(
2
)
:
Number
(
value
.
fcp
).
toFixed
(
1
)}
disabled
=
{
true
}
/
>
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
fcp
.
value
).
toFixed
(
2
)
:
Number
(
value
.
fcp
.
value
).
toFixed
(
1
)}
}
/
>
/
>
}
<
/div
>
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
.
fcp
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
fcp
).
toFixed
(
2
)
:
Number
(
value
.
fcp
).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
:
:
tableMeta
.
rowData
[
2
]
===
3
?
tableMeta
.
rowData
[
2
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
...
@@ -2207,7 +2266,25 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -2207,7 +2266,25 @@ export default class TaxPlanningOLPA extends Component {
null
null
:
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
div
style
=
{{
flex
:
1
}}
>
tableMeta
.
rowData
[
3
]
===
5
||
tableMeta
.
rowData
[
3
]
===
6
||
tableMeta
.
rowData
[
3
]
===
7
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
.
tbf
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
tbf
.
value
).
toFixed
(
2
)
:
Number
(
value
.
tbf
.
value
).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
value
.
tbf
}
value
=
{
value
.
tbf
}
...
@@ -2358,22 +2435,40 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -2358,22 +2435,40 @@ export default class TaxPlanningOLPA extends Component {
null
null
:
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
div
style
=
{{
flex
:
1
}}
>
tableMeta
.
rowData
[
1
]
===
5
||
tableMeta
.
rowData
[
1
]
===
6
||
tableMeta
.
rowData
[
1
]
===
7
?
<
FormControlLabel
<
div
style
=
{{
flex
:
1
}}
>
style
=
{{
margin
:
0
}}
<
FormControlLabel
value
=
{
value
.
tbc
}
style
=
{{
margin
:
0
}}
control
=
{
value
=
{
value
.
tbc
}
<
NumberFormat
control
=
{
thousandSeparator
=
{
true
}
<
NumberFormat
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
thousandSeparator
=
{
true
}
type
=
"text"
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
placeholder
=
""
type
=
"text"
disabled
=
{
true
}
placeholder
=
""
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
tbc
).
toFixed
(
2
)
:
Number
(
value
.
tbc
).
toFixed
(
1
)}
disabled
=
{
true
}
/
>
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
tbc
.
value
).
toFixed
(
2
)
:
Number
(
value
.
tbc
.
value
).
toFixed
(
1
)}
}
/
>
/
>
}
<
/div
>
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
.
tbc
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
tbc
).
toFixed
(
2
)
:
Number
(
value
.
tbc
).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
:
:
tableMeta
.
rowData
[
1
]
===
3
?
tableMeta
.
rowData
[
1
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
...
@@ -2477,22 +2572,40 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -2477,22 +2572,40 @@ export default class TaxPlanningOLPA extends Component {
null
null
:
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
div
style
=
{{
flex
:
1
}}
>
tableMeta
.
rowData
[
2
]
===
5
||
tableMeta
.
rowData
[
2
]
===
6
||
tableMeta
.
rowData
[
2
]
===
7
?
<
FormControlLabel
<
div
style
=
{{
flex
:
1
}}
>
style
=
{{
margin
:
0
}}
<
FormControlLabel
value
=
{
value
.
fcp
}
style
=
{{
margin
:
0
}}
control
=
{
value
=
{
value
.
fcp
}
<
NumberFormat
control
=
{
thousandSeparator
=
{
true
}
<
NumberFormat
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
thousandSeparator
=
{
true
}
type
=
"text"
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
placeholder
=
""
type
=
"text"
disabled
=
{
true
}
placeholder
=
""
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
fcp
).
toFixed
(
2
)
:
Number
(
value
.
fcp
).
toFixed
(
1
)}
disabled
=
{
true
}
/
>
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
fcp
.
value
).
toFixed
(
2
)
:
Number
(
value
.
fcp
.
value
).
toFixed
(
1
)}
}
/
>
/
>
}
<
/div
>
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
.
fcp
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
fcp
).
toFixed
(
2
)
:
Number
(
value
.
fcp
).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
:
:
tableMeta
.
rowData
[
2
]
===
3
?
tableMeta
.
rowData
[
2
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
...
@@ -2594,7 +2707,25 @@ export default class TaxPlanningOLPA extends Component {
...
@@ -2594,7 +2707,25 @@ export default class TaxPlanningOLPA extends Component {
null
null
:
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
div
style
=
{{
flex
:
1
}}
>
tableMeta
.
rowData
[
3
]
===
5
||
tableMeta
.
rowData
[
3
]
===
6
||
tableMeta
.
rowData
[
3
]
===
7
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
.
tbf
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
String
(
tableMeta
.
rowData
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
Number
(
value
.
tbf
.
value
).
toFixed
(
2
)
:
Number
(
value
.
tbf
.
value
).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
value
.
tbf
}
value
=
{
value
.
tbf
}
...
...
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