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
735f1791
Commit
735f1791
authored
Dec 04, 2020
by
r.kurnia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formula tp mr
parent
58116afd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
62 deletions
+81
-62
TaxPlanningMR.js
src/container/MonthlyReport/TaxPlanningMR.js
+81
-62
No files found.
src/container/MonthlyReport/TaxPlanningMR.js
View file @
735f1791
...
...
@@ -113,7 +113,7 @@ export default class TaxPlanningMR extends Component {
}
api
.
create
().
getHierarkiMontlyReportTP
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
payload
);
//
console.log(payload);
let
dataTable
=
[]
if
(
response
.
data
)
{
if
(
response
.
data
.
status
==
'success'
)
{
...
...
@@ -138,6 +138,7 @@ export default class TaxPlanningMR extends Component {
},
item
.
tax_planning
.
trial_balance_fiscal_actual
===
null
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_actual
===
""
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_actual
,
item
.
tax_planning
.
trial_balance_fiscal_mb
===
null
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_mb
===
""
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_mb
,
item
.
tax_planning
.
actual_formula
,
item
.
order
,
{
tbc
:
item
.
condition_it_should_be_tax
.
value_tbc
,
fcp
:
item
.
condition_it_should_be_tax
.
value_fc
,
tbf
:
item
.
condition_it_should_be_tax
.
value_tbf
},
{
tbc
:
item
.
condition_if_wrong_tax
.
value_tbc
,
fcp
:
item
.
condition_if_wrong_tax
.
value_fc
,
tbf
:
item
.
condition_if_wrong_tax
.
value_tbf
},
...
...
@@ -169,6 +170,7 @@ export default class TaxPlanningMR extends Component {
},
item
.
tax_planning
.
trial_balance_fiscal_actual
===
null
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_actual
===
""
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_actual
,
item
.
tax_planning
.
trial_balance_fiscal_mb
===
null
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_mb
===
""
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_mb
,
item
.
tax_planning
.
actual_formula
,
item
.
order
,
{
tbc
:
item
.
condition_it_should_be_tax
.
value_tbc
,
fcp
:
item
.
condition_it_should_be_tax
.
value_fc
,
tbf
:
item
.
condition_it_should_be_tax
.
value_tbf
},
{
tbc
:
item
.
condition_if_wrong_tax
.
value_tbc
,
fcp
:
item
.
condition_if_wrong_tax
.
value_fc
,
tbf
:
item
.
condition_if_wrong_tax
.
value_tbf
},
...
...
@@ -195,7 +197,7 @@ export default class TaxPlanningMR extends Component {
}
else
{
this
.
setState
({
dataTable
,
loading
:
false
,
editable
:
true
})
}
console
.
log
(
this
.
state
.
dataTable
)
//
console.log(this.state.dataTable)
})
}
...
...
@@ -241,7 +243,7 @@ export default class TaxPlanningMR extends Component {
}
api
.
create
(
'UPLOAD'
).
createMonthlyReportTP
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
//
console.log(payload);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -307,7 +309,7 @@ export default class TaxPlanningMR extends Component {
checkUpload
()
{
api
.
create
().
checkUploadMonthlyReportTP
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
this
.
state
.
payload
)
//
console.log(this.state.payload)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
...
...
@@ -343,7 +345,7 @@ export default class TaxPlanningMR extends Component {
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
,
saveDraft
:
true
})
}
})
console
.
log
(
this
.
state
.
dataTable
);
//
console.log(this.state.dataTable);
})
}
}
...
...
@@ -373,8 +375,8 @@ export default class TaxPlanningMR extends Component {
}
// console.log(data);
api
.
create
(
'UPLOAD'
).
uploadMonthlyReportTP
(
body
).
then
(
response
=>
{
console
.
log
(
body
);
console
.
log
(
JSON
.
stringify
(
body
));
//
console.log(body);
//
console.log(JSON.stringify(body));
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -521,7 +523,7 @@ export default class TaxPlanningMR extends Component {
if
(
String
(
item
).
includes
(
'#'
))
{
let
splitform
=
String
(
item
).
split
(
'#'
)
if
(
splitform
[
1
]
==
'TP1'
||
splitform
[
1
]
==
'TP2'
||
splitform
[
1
]
==
'TP3'
)
{
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
24
]
==
splitform
[
0
])
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
13
]
==
splitform
[
0
])
if
(
indexID
!==
-
1
)
{
let
data
=
splitform
[
1
]
==
'TP1'
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbc
:
splitform
[
1
]
==
'TP2'
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
fcp
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
tbf
let
valuezz
=
data
.
value
==
undefined
?
data
:
data
.
value
...
...
@@ -546,19 +548,19 @@ export default class TaxPlanningMR extends Component {
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
else
{
let
data
=
dex
==
1
?
value
.
tbc
:
dex
==
2
?
value
.
fcp
:
value
.
tbf
let
data
=
tableMeta
.
rowData
[
12
]
// console.log(data);
let
indexID
=
data
.
f
ormula
.
f
indIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
))
let
indexID
=
data
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
))
if
(
indexID
!==
-
1
)
{
let
valuezz
=
data
.
formula
[
indexID
].
value
let
valuezz
=
data
[
indexID
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
}
}
else
{
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
24
]
==
item
)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
13
]
==
item
)
if
(
indexID
!==
-
1
)
{
if
(
dataTable2
[
indexID
][
24
]
==
tableMeta
.
rowData
[
24
])
{
if
(
dataTable2
[
indexID
][
13
]
==
tableMeta
.
rowData
[
13
])
{
anjay
.
push
(
0
)
}
else
{
// console.log(dataTable2[indexID][tableMeta.columnIndex]);
...
...
@@ -927,7 +929,7 @@ export default class TaxPlanningMR extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
value
.
tbc
).
toFixed
(
1
)}
value
=
{
Number
(
handleValueFormula
(
value
,
tableMeta
,
1
)
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -979,7 +981,7 @@ export default class TaxPlanningMR extends Component {
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
.
fcp
}
value
=
{
value
.
tbc
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -987,7 +989,7 @@ export default class TaxPlanningMR extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
value
.
fcp
).
toFixed
(
1
)}
value
=
{
Number
(
handleValueFormula
(
value
,
tableMeta
,
2
)
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1035,15 +1037,32 @@ export default class TaxPlanningMR extends Component {
/
>
<
/div>
:
// tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 ?
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleTotal(tableMeta, 6)).toFixed(1)}
// />
tableMeta
.
rowData
[
3
]
===
5
||
tableMeta
.
rowData
[
3
]
===
6
?
<
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
=
{
Number
(
handleTotal
(
tableMeta
,
6
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValueFormula
(
value
,
tableMeta
,
3
)).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
:
tableMeta
.
rowData
[
3
]
===
7
?
null
// (Number(handleValueFormula(value, tableMeta, 3)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 3)).toFixed(1) <= Number(this.state.maxValue)) ?
...
...
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