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
992ed7ec
Commit
992ed7ec
authored
Nov 24, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
add index api, tp mr checkupload See merge request
!687
parents
9690bcc5
77e8cf8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
139 deletions
+43
-139
index.js
src/api/index.js
+6
-3
MonthlyReport.js
src/container/MonthlyReport.js
+2
-2
TaxPlanningMR.js
src/container/MonthlyReport/TaxPlanningMR.js
+35
-134
No files found.
src/api/index.js
View file @
992ed7ec
...
@@ -265,8 +265,10 @@ const create = (type = "") => {
...
@@ -265,8 +265,10 @@ const create = (type = "") => {
const
uploadAttachmentMonthly
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/upload_attachment'
,
body
)
const
uploadAttachmentMonthly
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/upload_attachment'
,
body
)
const
deleteAttachmentMonthly
=
(
id
)
=>
api
.
post
(
`transaction/monthly_report/delete_attachment/
${
id
}
`
)
const
deleteAttachmentMonthly
=
(
id
)
=>
api
.
post
(
`transaction/monthly_report/delete_attachment/
${
id
}
`
)
const
createMonthlyReportBS
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/create_monthly_report'
,
body
)
const
createMonthlyReportBS
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/create_monthly_report'
,
body
)
const
create
TaxPlanningMR
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/create_monthly_report'
,
body
)
const
create
MonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/create_monthly_report'
,
body
)
const
getHierarkiMontlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/get_report_hierarki'
,
body
)
const
checkUploadMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/check_import'
,
body
)
// MonthlyPL
// MonthlyPL
const
getHierarkiMontlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/get_report_hierarki'
,
body
)
...
@@ -402,6 +404,7 @@ const create = (type = "") => {
...
@@ -402,6 +404,7 @@ const create = (type = "") => {
deleteDocument
,
deleteDocument
,
createSubmitReport
,
createSubmitReport
,
createMonthlyReportBS
,
createMonthlyReportBS
,
createMonthlyReportTP
,
getSubmission
,
getSubmission
,
checkUploadMB
,
checkUploadMB
,
getAllOperatingInd
,
getAllOperatingInd
,
...
@@ -434,7 +437,6 @@ const create = (type = "") => {
...
@@ -434,7 +437,6 @@ const create = (type = "") => {
uploadAttachmentMonthly
,
uploadAttachmentMonthly
,
getMontlyReportAtt
,
getMontlyReportAtt
,
deleteAttachmentMonthly
,
deleteAttachmentMonthly
,
createTaxPlanningMR
,
getSubmitMasterBudget
,
getSubmitMasterBudget
,
createPeriodeRevision
,
createPeriodeRevision
,
getLastestUpdateOI
,
getLastestUpdateOI
,
...
@@ -471,7 +473,8 @@ const create = (type = "") => {
...
@@ -471,7 +473,8 @@ const create = (type = "") => {
getDetailHierarkiCF
,
getDetailHierarkiCF
,
getHierarkiMontlyReportPL
,
getHierarkiMontlyReportPL
,
getHierarkiMontlyReportLOCF
,
getHierarkiMontlyReportLOCF
,
getHierarkiMontlyReportFAM
getHierarkiMontlyReportFAM
,
checkUploadMonthlyReportTP
}
}
}
}
...
...
src/container/MonthlyReport.js
View file @
992ed7ec
...
@@ -1083,9 +1083,9 @@ export default class MonthlyReport extends Component {
...
@@ -1083,9 +1083,9 @@ export default class MonthlyReport extends Component {
periode
=
{
this
.
state
.
periode
.
periode
}
periode
=
{
this
.
state
.
periode
.
periode
}
monthlyReportId
=
{
this
.
state
.
monthlyReportId
}
monthlyReportId
=
{
this
.
state
.
monthlyReportId
}
month
=
{
this
.
state
.
month
}
month
=
{
this
.
state
.
month
}
// saveToMasterBudget={this.saveToMasterBudget.bind(this)}
saveToMonthlyReport
=
{
this
.
saveToMonthlyReport
.
bind
(
this
)}
// getReport={this.getCompanyActive.bind(this)}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleMonthlyReport
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleMonthlyReport
:
true
})}
// getReport={this.getCompanyActive.bind(this)}
/
>
/
>
)}
)}
{
this
.
state
.
visibleFAM
&&
(
{
this
.
state
.
visibleFAM
&&
(
...
...
src/container/MonthlyReport/TaxPlanningMR.js
View file @
992ed7ec
...
@@ -226,16 +226,13 @@ export default class TaxPlanningMR extends Component {
...
@@ -226,16 +226,13 @@ export default class TaxPlanningMR extends Component {
"months"
:
this
.
props
.
month
.
month_id
,
"months"
:
this
.
props
.
month
.
month_id
,
"tax_planning"
:
data
"tax_planning"
:
data
}
}
console
.
log
(
JSON
.
stringify
(
payload
));
console
.
log
(
payload
);
// this.props.saveToMasterBudget(payload)
// this.props.onClickClose()
api
.
create
(
'UPLOAD'
).
createTaxPlanningMR
(
payload
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
createMonthlyReportTP
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
saveToMonthlyReport
()
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
submissionID
:
null
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
submissionID
:
null
,
loading
:
false
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
document
.
body
.
style
.
overflow
=
'unset'
;
...
@@ -245,10 +242,11 @@ export default class TaxPlanningMR extends Component {
...
@@ -245,10 +242,11 @@ export default class TaxPlanningMR extends Component {
window
.
location
.
reload
();
window
.
location
.
reload
();
},
1000
);
},
1000
);
}
}
this
.
props
.
saveToMonthlyReport
()
})
})
}
}
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
}
})
})
}
}
...
@@ -271,77 +269,11 @@ export default class TaxPlanningMR extends Component {
...
@@ -271,77 +269,11 @@ export default class TaxPlanningMR extends Component {
payload
.
push
({
payload
.
push
({
item_report_id
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
item_report_id
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
january
:
{
trial_balance_commercial
:
i
[
2
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
2
]))
===
false
?
"0"
:
String
(
i
[
2
]).
trim
(),
tbc
:
i
[
2
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
2
]))
===
false
?
"0"
:
String
(
i
[
2
]).
trim
(),
fiscal_correction
:
i
[
3
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
"0"
:
String
(
i
[
3
]).
trim
(),
fcp
:
i
[
3
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
"0"
:
String
(
i
[
3
]).
trim
(),
trial_balance_fiscal
:
i
[
4
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
"0"
:
String
(
i
[
4
]).
trim
(),
tbf
:
i
[
4
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
"0"
:
String
(
i
[
4
]).
trim
(),
trial_balance_fiscal_actual
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]).
trim
(),
},
trial_balance_fiscal_mb
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
february
:
{
tbc
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]).
trim
(),
fcp
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
tbf
:
i
[
7
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
7
]))
===
false
?
"0"
:
String
(
i
[
7
]).
trim
(),
},
march
:
{
tbc
:
i
[
8
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
8
]))
===
false
?
"0"
:
String
(
i
[
8
]).
trim
(),
fcp
:
i
[
9
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
9
]))
===
false
?
"0"
:
String
(
i
[
9
]).
trim
(),
tbf
:
i
[
10
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
10
]))
===
false
?
"0"
:
String
(
i
[
10
]).
trim
(),
},
april
:
{
tbc
:
i
[
11
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
11
]))
===
false
?
"0"
:
String
(
i
[
11
]).
trim
(),
fcp
:
i
[
12
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
12
]))
===
false
?
"0"
:
String
(
i
[
12
]).
trim
(),
tbf
:
i
[
13
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
13
]))
===
false
?
"0"
:
String
(
i
[
13
]).
trim
(),
},
may
:
{
tbc
:
i
[
14
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
14
]))
===
false
?
"0"
:
String
(
i
[
14
]).
trim
(),
fcp
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0"
:
String
(
i
[
15
]).
trim
(),
tbf
:
i
[
16
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
16
]))
===
false
?
"0"
:
String
(
i
[
16
]).
trim
(),
},
june
:
{
tbc
:
i
[
17
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
17
]))
===
false
?
"0"
:
String
(
i
[
17
]).
trim
(),
fcp
:
i
[
18
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
18
]))
===
false
?
"0"
:
String
(
i
[
18
]).
trim
(),
tbf
:
i
[
19
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
19
]))
===
false
?
"0"
:
String
(
i
[
19
]).
trim
(),
},
july
:
{
tbc
:
i
[
20
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
20
]))
===
false
?
"0"
:
String
(
i
[
20
]).
trim
(),
fcp
:
i
[
21
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
21
]))
===
false
?
"0"
:
String
(
i
[
21
]).
trim
(),
tbf
:
i
[
22
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
22
]))
===
false
?
"0"
:
String
(
i
[
22
]).
trim
(),
},
august
:
{
tbc
:
i
[
23
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
23
]))
===
false
?
"0"
:
String
(
i
[
23
]).
trim
(),
fcp
:
i
[
24
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
24
]))
===
false
?
"0"
:
String
(
i
[
24
]).
trim
(),
tbf
:
i
[
25
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
25
]))
===
false
?
"0"
:
String
(
i
[
25
]).
trim
(),
},
september
:
{
tbc
:
i
[
26
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
26
]))
===
false
?
"0"
:
String
(
i
[
26
]).
trim
(),
fcp
:
i
[
27
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
27
]))
===
false
?
"0"
:
String
(
i
[
27
]).
trim
(),
tbf
:
i
[
28
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
28
]))
===
false
?
"0"
:
String
(
i
[
28
]).
trim
(),
},
october
:
{
tbc
:
i
[
29
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
29
]))
===
false
?
"0"
:
String
(
i
[
29
]).
trim
(),
fcp
:
i
[
30
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
30
]))
===
false
?
"0"
:
String
(
i
[
30
]).
trim
(),
tbf
:
i
[
31
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
31
]))
===
false
?
"0"
:
String
(
i
[
31
]).
trim
(),
},
november
:
{
tbc
:
i
[
32
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
32
]))
===
false
?
"0"
:
String
(
i
[
32
]).
trim
(),
fcp
:
i
[
33
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
33
]))
===
false
?
"0"
:
String
(
i
[
33
]).
trim
(),
tbf
:
i
[
34
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
34
]))
===
false
?
"0"
:
String
(
i
[
34
]).
trim
(),
},
december
:
{
tbc
:
i
[
35
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
35
]))
===
false
?
"0"
:
String
(
i
[
35
]).
trim
(),
fcp
:
i
[
36
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
36
]))
===
false
?
"0"
:
String
(
i
[
36
]).
trim
(),
tbf
:
i
[
37
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
37
]))
===
false
?
"0"
:
String
(
i
[
37
]).
trim
(),
},
total_current_year
:
i
[
38
]
===
undefined
?
""
:
String
(
i
[
38
]).
trim
(),
total_next_year
:
{
tbc
:
i
[
39
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
39
]))
===
false
?
"0"
:
String
(
i
[
39
]).
trim
(),
fcp
:
i
[
40
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
40
]))
===
false
?
"0"
:
String
(
i
[
40
]).
trim
(),
tbf
:
i
[
41
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
41
]))
===
false
?
"0"
:
String
(
i
[
41
]).
trim
(),
},
total_more_year
:
{
tbc
:
i
[
42
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
42
]))
===
false
?
"0"
:
String
(
i
[
42
]).
trim
(),
fcp
:
i
[
43
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
43
]))
===
false
?
"0"
:
String
(
i
[
43
]).
trim
(),
tbf
:
i
[
44
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
44
]))
===
false
?
"0"
:
String
(
i
[
44
]).
trim
(),
}
})
})
}
}
})
})
...
@@ -349,6 +281,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -349,6 +281,7 @@ export default class TaxPlanningMR extends Component {
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
,
months
:
this
.
props
.
month
.
month_id
,
tax_planning
:
payload
tax_planning
:
payload
}
}
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
...
@@ -358,7 +291,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -358,7 +291,7 @@ export default class TaxPlanningMR extends Component {
}
}
checkUpload
()
{
checkUpload
()
{
api
.
create
().
checkUploadM
B
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadM
onthlyReportTP
(
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
)
{
...
@@ -366,52 +299,28 @@ export default class TaxPlanningMR extends Component {
...
@@ -366,52 +299,28 @@ export default class TaxPlanningMR extends Component {
this
.
setState
({
visibleUpload
:
false
,
visibleTP
:
false
,
loading
:
true
})
this
.
setState
({
visibleUpload
:
false
,
visibleTP
:
false
,
loading
:
true
})
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
return
[
// item.type_report_id,
0
,
0
,
Number
(
item
.
type_report_id
.
tbc
),
Number
(
item
.
type_report_id
.
fcp
),
Number
(
item
.
type_report_id
.
tbf
),
item
.
item_report_id
,
item
.
item_report_id
,
item
.
parent
,
item
.
parent
,
item
.
formula
,
item
.
formula
,
// {tbc: item.formula.tbc, fcp: item.formula.fcp, tbf: item.formula.tbf},
item
.
level
,
item
.
level
,
item
.
item_report
,
item
.
item_report
,
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
january
.
tbc
,
formula
:
item
.
january_formula
}
:
item
.
january
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
january
.
fcp
,
formula
:
item
.
january_formula
}
:
item
.
january
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
january
.
tbf
,
formula
:
item
.
january_formula
}
:
item
.
january
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
february
.
tbc
,
formula
:
item
.
february_formula
}
:
item
.
february
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
february
.
fcp
,
formula
:
item
.
february_formula
}
:
item
.
february
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
february
.
tbf
,
formula
:
item
.
february_formula
}
:
item
.
february
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
march
.
tbc
,
formula
:
item
.
march_formula
}
:
item
.
march
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
march
.
fcp
,
formula
:
item
.
march_formula
}
:
item
.
march
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
march
.
tbf
,
formula
:
item
.
march_formula
}
:
item
.
march
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
april
.
tbc
,
formula
:
item
.
april_formula
}
:
item
.
april
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
april
.
fcp
,
formula
:
item
.
april_formula
}
:
item
.
april
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
april
.
tbf
,
formula
:
item
.
april_formula
}
:
item
.
april
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
may
.
tbc
,
formula
:
item
.
may_formula
}
:
item
.
may
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
may
.
fcp
,
formula
:
item
.
may_formula
}
:
item
.
may
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
may
.
tbf
,
formula
:
item
.
may_formula
}
:
item
.
may
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
june
.
tbc
,
formula
:
item
.
june_formula
}
:
item
.
june
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
june
.
fcp
,
formula
:
item
.
june_formula
}
:
item
.
june
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
june
.
tbf
,
formula
:
item
.
june_formula
}
:
item
.
june
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
july
.
tbc
,
formula
:
item
.
july_formula
}
:
item
.
july
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
july
.
fcp
,
formula
:
item
.
july_formula
}
:
item
.
july
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
july
.
tbf
,
formula
:
item
.
july_formula
}
:
item
.
july
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
august
.
tbc
,
formula
:
item
.
august_formula
}
:
item
.
august
.
tbc
===
null
?
"0"
:
item
.
august
.
tbc
===
""
?
"0"
:
item
.
august
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
august
.
fcp
,
formula
:
item
.
august_formula
}
:
item
.
august
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
august
.
tbf
,
formula
:
item
.
august_formula
}
:
item
.
august
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
september
.
tbc
,
formula
:
item
.
september_formula
}
:
item
.
september
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
september
.
fcp
,
formula
:
item
.
september_formula
}
:
item
.
september
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
september
.
tbf
,
formula
:
item
.
september_formula
}
:
item
.
september
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
october
.
tbc
,
formula
:
item
.
october_formula
}
:
item
.
october
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
october
.
fcp
,
formula
:
item
.
october_formula
}
:
item
.
october
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
october
.
tbf
,
formula
:
item
.
october_formula
}
:
item
.
october
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
november
.
tbc
,
formula
:
item
.
november_formula
}
:
item
.
november
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
november
.
fcp
,
formula
:
item
.
november_formula
}
:
item
.
november
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
november
.
tbf
,
formula
:
item
.
november_formula
}
:
item
.
november
.
tbf
},
{
tbc
:
item
.
type_report_id
.
tbc
==
5
||
item
.
type_report_id
.
tbc
==
6
||
item
.
type_report_id
.
tbc
==
7
?
{
value
:
item
.
december
.
tbc
,
formula
:
item
.
december_formula
}
:
item
.
december
.
tbc
,
fcp
:
item
.
type_report_id
.
fcp
==
5
||
item
.
type_report_id
.
fcp
==
6
||
item
.
type_report_id
.
fcp
==
7
?
{
value
:
item
.
december
.
fcp
,
formula
:
item
.
december_formula
}
:
item
.
december
.
fcp
,
tbf
:
item
.
type_report_id
.
tbf
==
5
||
item
.
type_report_id
.
tbf
==
6
||
item
.
type_report_id
.
tbf
==
7
?
{
value
:
item
.
december
.
tbf
,
formula
:
item
.
december_formula
}
:
item
.
december
.
tbf
},
item
.
total_current_year
,
{
tbc
:
Number
(
item
.
type_report_id
.
tbc
)
===
3
&&
item
.
total_next_year
.
tbc
===
""
?
"0"
:
item
.
total_next_year
.
tbc
,
fcp
:
Number
(
item
.
type_report_id
.
fcp
)
===
3
&&
item
.
total_next_year
.
fcp
===
""
?
"0"
:
item
.
total_next_year
.
fcp
,
tbf
:
Number
(
item
.
type_report_id
.
tbf
)
===
3
&&
item
.
total_next_year
.
tbf
===
""
?
"0"
:
item
.
total_next_year
.
tbf
},
{
{
tbc
:
Number
(
item
.
type_report_id
.
tbc
)
===
3
&&
item
.
total_more_year
.
tbc
===
""
?
"0"
:
item
.
total_more_year
.
tbc
,
tbc
:
item
.
trial_balance_commercial
===
""
?
"0"
:
item
.
trial_balance_commercial
,
fcp
:
Number
(
item
.
type_report_id
.
fcp
)
===
3
&&
item
.
total_more_year
.
fcp
===
""
?
"0"
:
item
.
total_more_year
.
fcp
,
fcp
:
item
.
fiscal_correction
===
""
?
"0"
:
item
.
fiscal_correction
,
tbf
:
Number
(
item
.
type_report_id
.
tbf
)
===
3
&&
item
.
total_more_year
.
tbf
===
""
?
"0"
:
item
.
total_more_year
.
tbf
tbf
:
item
.
trial_balance_fiscal
===
""
?
"0"
:
item
.
trial_balance_fiscal
},
},
item
.
orders
,
item
.
tax_planning
.
trial_balance_fiscal_actual
===
""
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_actual
,
{
tbc
:
item
.
condition_it_should_be
.
tbc
,
fcp
:
item
.
condition_it_should_be
.
fcp
,
tbf
:
item
.
condition_it_should_be
.
tbf
},
item
.
tax_planning
.
trial_balance_fiscal_mb
===
""
?
"0.0"
:
item
.
tax_planning
.
trial_balance_fiscal_mb
,
{
tbc
:
item
.
condition_if_wrong
.
tbc
,
fcp
:
item
.
condition_if_wrong
.
fcp
,
tbf
:
item
.
condition_if_wrong
.
tbf
},
item
.
order
,
item
.
forecast_tbc_formula
,
item
.
condition_it_should_be
,
item
.
forecast_fcp_formula
,
item
.
condition_if_wrong
,
item
.
forecast_tbf_formula
,
item
.
error
item
.
error
]
]
})
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
,
saveDraft
:
true
},
()
=>
{
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
,
saveDraft
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
27
].
length
>
0
)
{
if
(
item
[
12
].
length
>
0
)
{
// console.log('masuk')
// console.log('masuk')
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
,
saveDraft
:
true
})
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
,
saveDraft
:
true
})
}
}
...
@@ -537,15 +446,13 @@ export default class TaxPlanningMR extends Component {
...
@@ -537,15 +446,13 @@ export default class TaxPlanningMR extends Component {
let
data
=
[]
let
data
=
[]
// console.log(this.state.dataTable)
// console.log(this.state.dataTable)
this
.
state
.
dataTable
.
map
(
i
=>
{
this
.
state
.
dataTable
.
map
(
i
=>
{
// console.log(i[0])
data
.
push
({
data
.
push
({
item_report_id
:
i
[
4
],
item_report_id
:
i
[
1
],
january
:
{
trial_balance_commercial
:
String
(
Number
(
i
[
6
].
tbc
).
toFixed
(
1
)),
tbc
:
i
[
1
]
===
3
&&
i
[
9
].
tbc
===
""
?
"0.0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
Number
(
i
[
9
].
tbc
.
value
).
toFixed
(
1
))
:
String
(
Number
(
i
[
9
].
tbc
).
toFixed
(
1
)),
fiscal_correction
:
String
(
Number
(
i
[
6
].
fcp
).
toFixed
(
1
)),
fcp
:
i
[
2
]
===
3
&&
i
[
9
].
fcp
===
""
?
"0.0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
Number
(
i
[
9
].
fcp
.
value
).
toFixed
(
1
))
:
String
(
Number
(
i
[
9
].
fcp
).
toFixed
(
1
)),
trial_balance_fiscal
:
String
(
Number
(
i
[
6
].
tbf
).
toFixed
(
1
)),
tbf
:
i
[
3
]
===
3
&&
i
[
9
].
tbf
===
""
?
"0.0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
Number
(
i
[
9
].
tbf
.
value
).
toFixed
(
1
))
:
String
(
Number
(
i
[
9
].
tbf
).
toFixed
(
1
))
trial_balance_fiscal_actual
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)),
},
trial_balance_fiscal_mb
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
))
total_current_year
:
i
[
2
]
===
3
&&
i
[
21
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)),
})
})
})
})
let
payload
=
{
let
payload
=
{
...
@@ -1401,8 +1308,9 @@ export default class TaxPlanningMR extends Component {
...
@@ -1401,8 +1308,9 @@ export default class TaxPlanningMR extends Component {
}
}
},
},
]
]
const
loadingComponent
=
(
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'
absolute
'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
div
style
=
{{
position
:
'
fixed
'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
PropagateLoader
<
PropagateLoader
// css={override}
// css={override}
size
=
{
20
}
size
=
{
20
}
...
@@ -1472,10 +1380,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -1472,10 +1380,7 @@ export default class TaxPlanningMR extends Component {
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
margin
:
5
margin
:
5
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
this
.
downloadTemplate
()}
// null
this
.
downloadTemplate
()
}
>
>
<
img
src
=
{
Images
.
template
}
/
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
/button
>
...
@@ -1493,8 +1398,8 @@ export default class TaxPlanningMR extends Component {
...
@@ -1493,8 +1398,8 @@ export default class TaxPlanningMR extends Component {
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
margin
:
5
margin
:
5
}}
}}
onClick
=
{()
=>
null
onClick
=
{()
=>
//
this.setState({ visibleUpload: true })
this
.
setState
({
visibleUpload
:
true
})
}
}
>
>
<
img
src
=
{
Images
.
upload
}
/
>
<
img
src
=
{
Images
.
upload
}
/
>
...
@@ -1512,7 +1417,6 @@ export default class TaxPlanningMR extends Component {
...
@@ -1512,7 +1417,6 @@ export default class TaxPlanningMR extends Component {
margin
:
5
margin
:
5
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
// null
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
downloadAllData
()
this
.
downloadAllData
()
...
@@ -1565,7 +1469,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -1565,7 +1469,7 @@ export default class TaxPlanningMR extends Component {
<
/div
>
<
/div
>
{
/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
{
/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */
}
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */
}
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
marginTop
:
20
}}
>
<
button
<
button
className
=
"button"
className
=
"button"
type
=
"button"
type
=
"button"
...
@@ -1577,9 +1481,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -1577,9 +1481,7 @@ export default class TaxPlanningMR extends Component {
marginRight
:
20
marginRight
:
20
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
// null
{
{
// this.forceUpdate()
this
.
setState
({
loading
:
true
,
buttonDraft
:
false
},
()
=>
{
this
.
setState
({
loading
:
true
,
buttonDraft
:
false
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
// this.setState({ loading: false, buttonError: false, editable: true })
// this.setState({ loading: false, buttonError: false, editable: true })
...
@@ -1621,9 +1523,8 @@ export default class TaxPlanningMR extends Component {
...
@@ -1621,9 +1523,8 @@ export default class TaxPlanningMR extends Component {
<
/button
>
<
/button
>
<
button
<
button
type
=
"button"
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
//
disabled={this.state.buttonError}
onClick
=
{()
=>
onClick
=
{()
=>
// null
this
.
state
.
buttonError
?
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
:
...
@@ -1793,7 +1694,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -1793,7 +1694,7 @@ export default class TaxPlanningMR extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
}}
onUpload
=
{()
=>
{
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"
MASTER BUDGET - TAX PLANNING
"
?
this
.
state
.
judul
===
"
TAX PLANNING - MONTHLY REPORT
"
?
this
.
checkUpload
()
:
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
}}
...
...
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