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
ba5e4559
Commit
ba5e4559
authored
Oct 15, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' of
http://103.44.149.204/d.arizona/tia-dev
into deni-dev(pc)
parents
cd80763b
49e23dea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1532 additions
and
206 deletions
+1532
-206
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+1090
-166
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+442
-40
No files found.
src/container/BudgetTahunan/CashFlow.js
View file @
ba5e4559
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/container/BudgetTahunan/TaxPlanning.js
View file @
ba5e4559
...
...
@@ -463,9 +463,9 @@ export default class TaxPlanning extends Component {
item
.
orders
,
{
tbc
:
item
.
condition_it_should_be
.
tbc
,
fcp
:
item
.
condition_it_should_be
.
fcp
,
tbf
:
item
.
condition_it_should_be
.
tbf
},
{
tbc
:
item
.
condition_if_wrong
.
tbc
,
fcp
:
item
.
condition_if_wrong
.
fcp
,
tbf
:
item
.
condition_if_wrong
.
tbf
},
item
.
tax_planning
.
forecast_tbc_formula
,
item
.
tax_planning
.
forecast_fcp_formula
,
item
.
tax_planning
.
forecast_tbf_formula
,
item
.
forecast_tbc_formula
,
item
.
forecast_fcp_formula
,
item
.
forecast_tbf_formula
,
item
.
error
]
})
...
...
@@ -748,8 +748,25 @@ export default class TaxPlanning extends Component {
}
})
if
(
tableMeta
.
rowData
[
8
]
==
"Under payment /(Over Payment ) Income Tax Art. 29"
)
{
// form.replace("(", "")
// form.replace(")", "")
let
opgab
=
[]
baru
.
map
((
item
,
index
)
=>
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
if
(
item
.
length
>
1
&&
(
item
.
includes
(
"+"
)
||
item
.
includes
(
"-"
)
||
item
.
includes
(
"*"
)
||
item
.
includes
(
"/"
))){
opgab
.
push
(
String
(
item
).
substr
(
0
,
Number
(
String
(
item
).
length
)
-
1
))
opgab
.
push
(
String
(
item
).
substr
(
Number
(
String
(
item
).
length
)
-
1
,
1
))
}
else
{
opgab
.
push
(
item
)
}
})
if
(
opgab
.
length
>
0
){
baru
=
opgab
}
}
baru
.
map
((
item
,
index
)
=>
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
||
item
==
'('
||
item
==
')'
)
{
anjay
.
push
(
item
)
}
else
{
if
(
String
(
item
).
includes
(
'#'
))
{
...
...
@@ -803,16 +820,55 @@ export default class TaxPlanning extends Component {
})
let
total
=
0
let
total2
=
0
let
opt
=
""
let
opt2
=
""
let
prio
=
false
let
simpen2
=
""
anjay
.
map
((
item
,
index
)
=>
{
if
(
item
==
"+"
)
{
if
(
prio
)
{
opt2
=
"tambah"
}
else
{
opt
=
"tambah"
}
}
else
if
(
item
==
"-"
)
{
if
(
prio
)
{
opt2
=
"kurang"
}
else
{
opt
=
"kurang"
}
}
else
if
(
item
==
"*"
)
{
if
(
prio
)
{
opt2
=
"kali"
}
else
{
opt
=
"kali"
}
}
else
if
(
item
==
"/"
)
{
if
(
prio
)
{
opt2
=
"bagi"
}
else
{
opt
=
"bagi"
}
}
else
if
(
item
==
"("
)
{
prio
=
true
simpen2
=
"active"
}
else
if
(
item
==
")"
)
{
prio
=
false
}
else
{
if
(
prio
)
{
if
(
opt2
==
"tambah"
)
{
total2
=
Number
(
total2
)
+
Number
(
item
)
}
else
if
(
opt2
==
"kurang"
)
{
total2
=
Number
(
total2
)
-
Number
(
item
)
}
else
if
(
opt2
==
"kali"
)
{
total2
=
Number
(
total2
)
*
Number
(
item
)
}
else
if
(
opt2
==
"bagi"
)
{
total2
=
Number
(
total2
)
/
Number
(
item
)
==
NaN
?
0
:
Number
(
total2
)
/
Number
(
item
)
}
else
{
total2
+=
Number
(
item
)
}
}
else
{
if
(
opt
==
"tambah"
)
{
total
=
Number
(
total
)
+
Number
(
item
)
...
...
@@ -826,40 +882,56 @@ export default class TaxPlanning extends Component {
total
+=
Number
(
item
)
}
}
}
})
if
(
simpen2
==
"active"
)
{
if
(
opt
==
"tambah"
)
{
total
=
Number
(
total
)
+
Number
(
total2
)
}
else
if
(
opt
==
"kurang"
)
{
total
=
Number
(
total
)
-
Number
(
total2
)
}
else
if
(
opt
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
total2
)
}
else
if
(
opt
==
"bagi"
)
{
total
=
Number
(
total
)
/
Number
(
total2
)
==
NaN
?
0
:
Number
(
total
)
/
Number
(
total2
)
}
}
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
total
// console.log(tableMeta.rowData[8])
// if (xntd !== undefined) {
// console.log(tableMeta.rowData[8])
// console.log(xntd)
// console.log(baru)
// console.log(anjay)
// console.log(total)
// }
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
)
{
if
(
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbc
.
value
==
undefined
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbc
=
total
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbc
=
Number
(
total
).
toFixed
(
1
)
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbc
.
value
=
total
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbc
.
value
=
Number
(
total
).
toFixed
(
1
)
}
}
else
if
(
dex
==
2
)
{
if
(
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
.
value
==
undefined
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
=
total
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
=
Number
(
total
).
toFixed
(
1
)
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
.
value
=
total
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
.
value
=
Number
(
total
).
toFixed
(
1
)
}
}
else
{
if
(
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
.
value
==
undefined
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
=
total
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
=
Number
(
total
).
toFixed
(
1
)
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
.
value
=
total
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
.
value
=
Number
(
total
).
toFixed
(
1
)
}
}
return
total
return
Number
(
total
).
toFixed
(
1
)
}
const
handleForecast
=
(
tableMeta
,
periode
,
dex
)
=>
{
...
...
@@ -6523,6 +6595,61 @@ export default class TaxPlanning extends Component {
// />
null
:
// tableMeta.rowData[1] === 7 ?
// Number(handleValueFormula(value, tableMeta, 1)).toFixed(1) === Number(tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc).toFixed(1) ?
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'black'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// /> : tableMeta.rowData[26].tbc === "STOPPER" ?
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// </LightTooltip> :
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// </LightTooltip>
// :
null
}
<
/div
>
...
...
@@ -6601,6 +6728,61 @@ export default class TaxPlanning extends Component {
// />
null
:
// tableMeta.rowData[2] === 7 ?
// Number(handleValueFormula(value, tableMeta, 2)).toFixed(1) === Number(tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp).toFixed(1) ?
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'black'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// /> : tableMeta.rowData[26].fcp === "STOPPER" ?
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// />
// </LightTooltip> :
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// />
// </LightTooltip>
// :
null
}
<
/div
>
...
...
@@ -6678,6 +6860,61 @@ export default class TaxPlanning extends Component {
// />
null
:
tableMeta
.
rowData
[
3
]
===
7
?
Number
(
handleForecast
(
tableMeta
,
Number
(
this
.
props
.
periode
)
+
2
,
3
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
25
].
tbf
===
""
?
"0"
:
tableMeta
.
rowData
[
25
].
tbf
).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'black'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleForecast
(
tableMeta
,
Number
(
this
.
props
.
periode
)
+
2
,
3
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
26
]
.tbf === "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
25
].
tbf
===
""
?
"0"
:
tableMeta
.
rowData
[
25
].
tbf
}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'red'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleForecast
(
tableMeta
,
Number
(
this
.
props
.
periode
)
+
2
,
3
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
25
].
tbf
===
""
?
"0"
:
tableMeta
.
rowData
[
25
].
tbf
}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'red'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleForecast
(
tableMeta
,
Number
(
this
.
props
.
periode
)
+
2
,
3
)).
toFixed
(
1
)}
/
>
<
/LightTooltip
>
:
null
}
<
/div
>
...
...
@@ -6788,6 +7025,61 @@ export default class TaxPlanning extends Component {
// />
null
:
// tableMeta.rowData[1] === 7 ?
// Number(handleValueFormula(value, tableMeta, 1)).toFixed(1) === Number(tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc).toFixed(1) ?
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'black'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// /> : tableMeta.rowData[26].tbc === "STOPPER" ?
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// </LightTooltip> :
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// </LightTooltip>
// :
null
}
<
/div
>
...
...
@@ -6866,6 +7158,61 @@ export default class TaxPlanning extends Component {
// />
null
:
// tableMeta.rowData[2] === 7 ?
// Number(handleValueFormula(value, tableMeta, 2)).toFixed(1) === Number(tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp).toFixed(1) ?
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'black'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// /> : tableMeta.rowData[26].fcp === "STOPPER" ?
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// />
// </LightTooltip> :
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// />
// </LightTooltip>
// :
null
}
<
/div
>
...
...
@@ -6943,6 +7290,61 @@ export default class TaxPlanning extends Component {
// />
null
:
tableMeta
.
rowData
[
3
]
===
7
?
Number
(
handleForecast
(
tableMeta
,
Number
(
this
.
props
.
periode
)
+
2
,
3
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
25
].
tbf
===
""
?
"0"
:
tableMeta
.
rowData
[
25
].
tbf
).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'black'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleForecast
(
tableMeta
,
Number
(
this
.
props
.
periode
)
+
2
,
3
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
26
]
.tbf === "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
25
].
tbf
===
""
?
"0"
:
tableMeta
.
rowData
[
25
].
tbf
}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'red'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleForecast
(
tableMeta
,
Number
(
this
.
props
.
periode
)
+
2
,
3
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
25
].
tbf
===
""
?
"0"
:
tableMeta
.
rowData
[
25
].
tbf
}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'red'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleForecast
(
tableMeta
,
Number
(
this
.
props
.
periode
)
+
2
,
3
)).
toFixed
(
1
)}
/
>
<
/LightTooltip
>
:
null
}
<
/div
>
...
...
@@ -7246,7 +7648,7 @@ export default class TaxPlanning extends Component {
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
...
...
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