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
a314218e
Commit
a314218e
authored
Dec 11, 2020
by
r.kurnia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handlevalidate tp
parent
211786bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
19 deletions
+33
-19
TaxPlanningMR.js
src/container/MonthlyReport/TaxPlanningMR.js
+33
-19
No files found.
src/container/MonthlyReport/TaxPlanningMR.js
View file @
a314218e
...
@@ -407,32 +407,46 @@ export default class TaxPlanningMR extends Component {
...
@@ -407,32 +407,46 @@ export default class TaxPlanningMR extends Component {
// console.log(this.state.dataTable)
// console.log(this.state.dataTable)
this
.
state
.
dataTable
.
map
(
i
=>
{
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
data
.
push
({
item_report_id
:
i
[
1
],
item_report_id
:
i
[
4
],
trial_balance_commercial
:
String
(
Number
(
i
[
6
].
tbc
).
toFixed
(
1
)),
trial_balance_commercial
:
String
(
Number
(
i
[
9
].
tbc
).
toFixed
(
1
)),
fiscal_correction
:
String
(
Number
(
i
[
6
].
fcp
).
toFixed
(
1
)),
fiscal_correction
:
String
(
i
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
String
(
Number
(
i
[
9
].
fcp
).
toFixed
(
2
))
:
String
(
Number
(
i
[
9
].
fcp
).
toFixed
(
1
)),
trial_balance_fiscal
:
String
(
Number
(
i
[
6
].
tbf
).
toFixed
(
1
)),
trial_balance_fiscal
:
String
(
i
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
String
(
Number
(
i
[
9
].
tbf
).
toFixed
(
2
))
:
String
(
Number
(
i
[
9
].
tbf
).
toFixed
(
1
)),
trial_balance_fiscal_actual
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
trial_balance_fiscal_actual
:
String
(
i
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
String
(
Number
(
i
[
10
]).
toFixed
(
2
))
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)),
trial_balance_fiscal_mb
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
))
trial_balance_fiscal_mb
:
String
(
i
[
8
]).
toLocaleUpperCase
()
==
"CORPORATE INCOME TAX"
?
String
(
Number
(
i
[
11
]).
toFixed
(
2
))
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
))
})
})
})
})
let
payload
=
{
let
payload
=
{
"
submission_id"
:
this
.
props
.
submissionID
,
"
monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"tax_planning"
:
data
,
"status"
:
"submitted"
,
"status"
:
"submitted"
"months"
:
this
.
props
.
month
.
month_id
,
}
"tax_planning"
:
data
// console.log(JSON.stringify(payload));
}
// api.create().validateSubmitReport(payload).then((response) => {
api
.
create
().
validateSubmitReportMRTP
(
payload
).
then
((
response
)
=>
{
// // console.log(response)
console
.
log
(
response
)
// if (response.data.data.result) {
if
(
response
.
data
)
{
// this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
if
(
response
.
data
.
status
===
"success"
)
{
// // alert("Type Input Can't be Empty")
if
(
response
.
data
.
data
.
result
)
{
// } else {
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
false
,
saveDraft
:
false
})
this
.
setState
({
loading
:
false
,
editable
:
true
,
saveDraft
:
false
,
buttonError
:
false
})
}
else
{
// }
this
.
setState
({
loading
:
false
,
buttonError
:
true
,
editable
:
true
,
saveDraft
:
false
})
// })
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
}
}
downloadTemplate
=
async
()
=>
{
downloadTemplate
=
async
()
=>
{
...
...
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