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
d92ca86a
Commit
d92ca86a
authored
Sep 22, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
update See merge request
!355
parents
5340be35
89e0a0bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
260 additions
and
139 deletions
+260
-139
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+258
-137
CreateManagementDoc.js
src/container/DocumentManagement/CreateManagementDoc.js
+1
-1
EditManagementDoc.js
src/container/DocumentManagement/EditManagementDoc.js
+1
-1
No files found.
src/container/BudgetTahunan/TaxPlanning.js
View file @
d92ca86a
...
...
@@ -93,7 +93,8 @@ export default class TaxPlanning extends Component {
{
tbc
:
item
.
tax_planning
.
may
.
tbc
,
fcp
:
item
.
tax_planning
.
may
.
fcp
,
tbf
:
item
.
tax_planning
.
may
.
tbf
},
{
tbc
:
item
.
tax_planning
.
june
.
tbc
,
fcp
:
item
.
tax_planning
.
june
.
fcp
,
tbf
:
item
.
tax_planning
.
june
.
tbf
},
{
tbc
:
item
.
tax_planning
.
july
.
tbc
,
fcp
:
item
.
tax_planning
.
july
.
fcp
,
tbf
:
item
.
tax_planning
.
july
.
tbf
},
{
tbc
:
item
.
tax_planning
.
august
.
tbc
,
fcp
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
item
.
tax_planning
.
august
.
tbf
},
{
tbc
:
item
.
tax_planning
.
august
.
tbc
===
null
?
"0"
:
item
.
tax_planning
.
august
.
tbc
===
""
?
"0"
:
item
.
tax_planning
.
august
.
tbc
,
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
.
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
},
...
...
@@ -129,7 +130,8 @@ export default class TaxPlanning extends Component {
{
tbc
:
item
.
tax_planning
.
may
.
tbc
,
fcp
:
item
.
tax_planning
.
may
.
fcp
,
tbf
:
item
.
tax_planning
.
may
.
tbf
},
{
tbc
:
item
.
tax_planning
.
june
.
tbc
,
fcp
:
item
.
tax_planning
.
june
.
fcp
,
tbf
:
item
.
tax_planning
.
june
.
tbf
},
{
tbc
:
item
.
tax_planning
.
july
.
tbc
,
fcp
:
item
.
tax_planning
.
july
.
fcp
,
tbf
:
item
.
tax_planning
.
july
.
tbf
},
{
tbc
:
item
.
tax_planning
.
august
.
tbc
,
fcp
:
item
.
tax_planning
.
august
.
fcp
,
tbf
:
item
.
tax_planning
.
august
.
tbf
},
{
tbc
:
item
.
tax_planning
.
august
.
tbc
===
null
?
"0"
:
item
.
tax_planning
.
august
.
tbc
===
""
?
"0"
:
item
.
tax_planning
.
august
.
tbc
,
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
.
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
},
...
...
@@ -191,75 +193,75 @@ export default class TaxPlanning extends Component {
data
.
push
({
item_report_id
:
i
[
4
],
january
:
{
TBC
:
String
(
i
[
9
].
tbc
),
FCP
:
String
(
i
[
9
].
fcp
),
TBF
:
String
(
i
[
9
].
tbf
)
tbc
:
String
(
i
[
9
].
tbc
),
fcp
:
String
(
i
[
9
].
fcp
),
tbf
:
String
(
i
[
9
].
tbf
)
},
february
:
{
TBC
:
String
(
i
[
10
].
tbc
),
FCP
:
String
(
i
[
10
].
fcp
),
TBF
:
String
(
i
[
10
].
tbf
)
tbc
:
String
(
i
[
10
].
tbc
),
fcp
:
String
(
i
[
10
].
fcp
),
tbf
:
String
(
i
[
10
].
tbf
)
},
march
:
{
TBC
:
String
(
i
[
11
].
tbc
),
FCP
:
String
(
i
[
11
].
fcp
),
TBF
:
String
(
i
[
11
].
tbf
)
tbc
:
String
(
i
[
11
].
tbc
),
fcp
:
String
(
i
[
11
].
fcp
),
tbf
:
String
(
i
[
11
].
tbf
)
},
april
:
{
TBC
:
String
(
i
[
12
].
tbc
),
FCP
:
String
(
i
[
12
].
fcp
),
TBF
:
String
(
i
[
12
].
tbf
)
tbc
:
String
(
i
[
12
].
tbc
),
fcp
:
String
(
i
[
12
].
fcp
),
tbf
:
String
(
i
[
12
].
tbf
)
},
may
:
{
TBC
:
String
(
i
[
13
].
tbc
),
FCP
:
String
(
i
[
13
].
fcp
),
TBF
:
String
(
i
[
13
].
tbf
)
tbc
:
String
(
i
[
13
].
tbc
),
fcp
:
String
(
i
[
13
].
fcp
),
tbf
:
String
(
i
[
13
].
tbf
)
},
june
:
{
TBC
:
String
(
i
[
14
].
tbc
),
FCP
:
String
(
i
[
14
].
fcp
),
TBF
:
String
(
i
[
14
].
tbf
)
tbc
:
String
(
i
[
14
].
tbc
),
fcp
:
String
(
i
[
14
].
fcp
),
tbf
:
String
(
i
[
14
].
tbf
)
},
july
:
{
TBC
:
String
(
i
[
15
].
tbc
),
FCP
:
String
(
i
[
15
].
fcp
),
TBF
:
String
(
i
[
15
].
tbf
)
tbc
:
String
(
i
[
15
].
tbc
),
fcp
:
String
(
i
[
15
].
fcp
),
tbf
:
String
(
i
[
15
].
tbf
)
},
august
:
{
TBC
:
String
(
i
[
16
].
tbc
),
FCP
:
String
(
i
[
16
].
fcp
),
TBF
:
String
(
i
[
16
].
tbf
)
tbc
:
String
(
i
[
16
].
tbc
),
fcp
:
String
(
i
[
16
].
fcp
),
tbf
:
String
(
i
[
16
].
tbf
)
},
september
:
{
TBC
:
String
(
i
[
17
].
tbc
),
FCP
:
String
(
i
[
17
].
fcp
),
TBF
:
String
(
i
[
17
].
tbf
)
tbc
:
String
(
i
[
17
].
tbc
),
fcp
:
String
(
i
[
17
].
fcp
),
tbf
:
String
(
i
[
17
].
tbf
)
},
october
:
{
TBC
:
String
(
i
[
18
].
tbc
),
FCP
:
String
(
i
[
18
].
fcp
),
TBF
:
String
(
i
[
18
].
tbf
)
tbc
:
String
(
i
[
18
].
tbc
),
fcp
:
String
(
i
[
18
].
fcp
),
tbf
:
String
(
i
[
18
].
tbf
)
},
november
:
{
TBC
:
String
(
i
[
19
].
tbc
),
FCP
:
String
(
i
[
19
].
fcp
),
TBF
:
String
(
i
[
19
].
tbf
)
tbc
:
String
(
i
[
19
].
tbc
),
fcp
:
String
(
i
[
19
].
fcp
),
tbf
:
String
(
i
[
19
].
tbf
)
},
december
:
{
TBC
:
String
(
i
[
20
].
tbc
),
FCP
:
String
(
i
[
20
].
fcp
),
TBF
:
String
(
i
[
20
].
tbf
)
tbc
:
String
(
i
[
20
].
tbc
),
fcp
:
String
(
i
[
20
].
fcp
),
tbf
:
String
(
i
[
20
].
tbf
)
},
total_current_year
:
String
(
i
[
21
]),
total_next_year
:
{
TBC
:
String
(
i
[
22
].
tbc
),
FCP
:
String
(
i
[
22
].
fcp
),
TBF
:
String
(
i
[
22
].
tbf
)
tbc
:
String
(
i
[
22
].
tbc
),
fcp
:
String
(
i
[
22
].
fcp
),
tbf
:
String
(
i
[
22
].
tbf
)
},
total_more_year
:
{
TBC
:
String
(
i
[
23
].
tbc
),
FCP
:
String
(
i
[
23
].
fcp
),
TBF
:
String
(
i
[
23
].
tbf
)
tbc
:
String
(
i
[
23
].
tbc
),
fcp
:
String
(
i
[
23
].
fcp
),
tbf
:
String
(
i
[
23
].
tbf
)
}
})
})
...
...
@@ -296,75 +298,75 @@ export default class TaxPlanning extends Component {
// item_report_name: this.state.reportName,
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
january
:
{
TBC
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
FCP
:
i
[
3
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
"0"
:
String
(
i
[
3
]).
trim
(),
TBF
:
i
[
4
]
===
undefined
?
""
:
String
(
i
[
4
]).
trim
()
tbc
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
fcp
:
i
[
3
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
"0"
:
String
(
i
[
3
]).
trim
(),
tbf
:
i
[
4
]
===
undefined
?
""
:
String
(
i
[
4
]).
trim
()
},
february
:
{
TBC
:
String
(
i
[
10
].
tbc
),
FCP
:
String
(
i
[
10
].
fcp
),
TBF
:
String
(
i
[
10
].
tbf
)
tbc
:
i
[
5
]
===
undefined
?
""
:
String
(
i
[
5
]).
trim
(
),
fcp
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(
),
tbf
:
i
[
7
]
===
undefined
?
""
:
String
(
i
[
7
]).
trim
(
)
},
march
:
{
TBC
:
String
(
i
[
11
].
tbc
),
FCP
:
String
(
i
[
11
].
fcp
),
TBF
:
String
(
i
[
11
].
tbf
)
tbc
:
i
[
8
]
===
undefined
?
""
:
String
(
i
[
8
]).
trim
(
),
fcp
:
i
[
9
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
9
]))
===
false
?
"0"
:
String
(
i
[
9
]).
trim
(
),
tbf
:
i
[
10
]
===
undefined
?
""
:
String
(
i
[
10
]).
trim
(),
},
april
:
{
TBC
:
String
(
i
[
12
].
tbc
),
FCP
:
String
(
i
[
12
].
fcp
),
TBF
:
String
(
i
[
12
].
tbf
)
tbc
:
i
[
11
]
===
undefined
?
""
:
String
(
i
[
11
]).
trim
(
),
fcp
:
i
[
12
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
12
]))
===
false
?
"0"
:
String
(
i
[
12
]).
trim
(
),
tbf
:
i
[
13
]
===
undefined
?
""
:
String
(
i
[
13
]).
trim
(
)
},
may
:
{
TBC
:
String
(
i
[
13
].
tbc
),
FCP
:
String
(
i
[
13
].
fcp
),
TBF
:
String
(
i
[
13
].
tbf
)
tbc
:
i
[
14
]
===
undefined
?
""
:
String
(
i
[
14
]).
trim
(
),
fcp
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0"
:
String
(
i
[
15
]).
trim
(
),
tbf
:
i
[
16
]
===
undefined
?
""
:
String
(
i
[
16
]).
trim
(
)
},
june
:
{
TBC
:
String
(
i
[
14
].
tbc
),
FCP
:
String
(
i
[
14
].
fcp
),
TBF
:
String
(
i
[
14
].
tbf
)
tbc
:
i
[
17
]
===
undefined
?
""
:
String
(
i
[
17
]).
trim
(
),
fcp
:
i
[
18
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
18
]))
===
false
?
"0"
:
String
(
i
[
18
]).
trim
(
),
tbf
:
i
[
19
]
===
undefined
?
""
:
String
(
i
[
19
]).
trim
(
)
},
july
:
{
TBC
:
String
(
i
[
15
].
tbc
),
FCP
:
String
(
i
[
15
].
fcp
),
TBF
:
String
(
i
[
15
].
tbf
)
tbc
:
i
[
20
]
===
undefined
?
""
:
String
(
i
[
20
]).
trim
(
),
fcp
:
i
[
21
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
21
]))
===
false
?
"0"
:
String
(
i
[
21
]).
trim
(
),
tbf
:
i
[
22
]
===
undefined
?
""
:
String
(
i
[
22
]).
trim
(
)
},
august
:
{
TBC
:
String
(
i
[
16
].
tbc
),
FCP
:
String
(
i
[
16
].
fcp
),
TBF
:
String
(
i
[
16
].
tbf
)
tbc
:
i
[
23
]
===
undefined
?
""
:
String
(
i
[
23
]).
trim
(
),
fcp
:
i
[
24
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
24
]))
===
false
?
"0"
:
String
(
i
[
24
]).
trim
(
),
tbf
:
i
[
25
]
===
undefined
?
""
:
String
(
i
[
25
]).
trim
(
)
},
september
:
{
TBC
:
String
(
i
[
17
].
tbc
),
FCP
:
String
(
i
[
17
].
fcp
),
TBF
:
String
(
i
[
17
].
tbf
)
tbc
:
i
[
26
]
===
undefined
?
""
:
String
(
i
[
26
]).
trim
(
),
fcp
:
i
[
27
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
27
]))
===
false
?
"0"
:
String
(
i
[
27
]).
trim
(
),
tbf
:
i
[
28
]
===
undefined
?
""
:
String
(
i
[
28
]).
trim
(
)
},
october
:
{
TBC
:
String
(
i
[
18
].
tbc
),
FCP
:
String
(
i
[
18
].
fcp
),
TBF
:
String
(
i
[
18
].
tbf
)
tbc
:
i
[
29
]
===
undefined
?
""
:
String
(
i
[
29
]).
trim
(
),
fcp
:
i
[
30
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
30
]))
===
false
?
"0"
:
String
(
i
[
30
]).
trim
(
),
tbf
:
i
[
31
]
===
undefined
?
""
:
String
(
i
[
31
]).
trim
(
)
},
november
:
{
TBC
:
String
(
i
[
19
].
tbc
),
FCP
:
String
(
i
[
19
].
fcp
),
TBF
:
String
(
i
[
19
].
tbf
)
tbc
:
i
[
32
]
===
undefined
?
""
:
String
(
i
[
32
]).
trim
(
),
fcp
:
i
[
33
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
33
]))
===
false
?
"0"
:
String
(
i
[
33
]).
trim
(
),
tbf
:
i
[
34
]
===
undefined
?
""
:
String
(
i
[
34
]).
trim
(
)
},
december
:
{
TBC
:
String
(
i
[
20
].
tbc
),
FCP
:
String
(
i
[
20
].
fcp
),
TBF
:
String
(
i
[
20
].
tbf
)
tbc
:
i
[
35
]
===
undefined
?
""
:
String
(
i
[
35
]).
trim
(
),
fcp
:
i
[
36
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
36
]))
===
false
?
"0"
:
String
(
i
[
36
]).
trim
(
),
tbf
:
i
[
37
]
===
undefined
?
""
:
String
(
i
[
37
]).
trim
(
)
},
total_current_year
:
String
(
i
[
21
]
),
total_current_year
:
i
[
38
]
===
undefined
?
""
:
String
(
i
[
38
]).
trim
(
),
total_next_year
:
{
TBC
:
String
(
i
[
22
].
tbc
),
FCP
:
String
(
i
[
22
].
fcp
),
TBF
:
String
(
i
[
22
].
tbf
)
tbc
:
i
[
39
]
===
undefined
?
""
:
String
(
i
[
39
]).
trim
(
),
fcp
:
i
[
40
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
40
]))
===
false
?
"0"
:
String
(
i
[
40
]).
trim
(
),
tbf
:
i
[
41
]
===
undefined
?
""
:
String
(
i
[
41
]).
trim
(
)
},
total_more_year
:
{
TBC
:
String
(
i
[
23
].
tbc
),
FCP
:
String
(
i
[
23
].
fcp
),
TBF
:
String
(
i
[
23
].
tbf
)
tbc
:
i
[
42
]
===
undefined
?
""
:
String
(
i
[
42
]).
trim
(
),
fcp
:
i
[
43
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
43
]))
===
false
?
"0"
:
String
(
i
[
43
]).
trim
(
),
tbf
:
i
[
44
]
===
undefined
?
""
:
String
(
i
[
44
]).
trim
(
)
}
})
}
...
...
@@ -373,7 +375,7 @@ export default class TaxPlanning extends Component {
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
balance_sheet
:
payload
tax_planning
:
payload
}
console
.
log
(
body
)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
...
...
@@ -383,49 +385,154 @@ export default class TaxPlanning extends Component {
checkUpload
()
{
api
.
create
().
checkUploadMB
(
this
.
state
.
payload
).
then
(
response
=>
{
//
console.log(JSON.stringify(this.state.payload));
console
.
log
(
JSON
.
stringify
(
this
.
state
.
payload
));
console
.
log
(
response
)
// if (response.data) {
// if (response.data.status === 'success') {
// this.setState({ visibleUpload: false, visibleTP: false, loading: true })
// let dataTable = response.data.data.map((item, index) => {
// return [
// item.type_report_id,
// item.item_report_id,
// item.parent,
// item.formula,
// item.level,
// item.item_report,
// item.total_actual_before,
// item.january,
// item.february,
// item.march,
// item.april,
// item.may,
// item.june,
// item.july,
// item.august,
// item.september,
// item.october,
// item.november,
// item.december,
// item.total_current_year,
// item.total_next_year,
// item.total_more_year,
// item.error
// ]
// })
// this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false }, () => {
// this.state.dataTable.map(item => {
// if (item[22].length > 0) {
// console.log('masuk')
// this.setState({ buttonError: true, errorPreview: true })
// }
// })
// // console.log(this.state.dataTable);
// })
// }
// }
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visibleTP
:
false
,
loading
:
true
})
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
// item.type_report_id,
0
,
Number
(
item
.
type_report_id
.
tbc
),
Number
(
item
.
type_report_id
.
fcp
),
Number
(
item
.
type_report_id
.
tbf
),
item
.
item_report_id
,
item
.
parent
,
item
.
formula
,
// {tbc: item.formula.tbc, fcp: item.formula.fcp, tbf: item.formula.tbf},
item
.
level
,
item
.
item_report
,
{
tbc
:
item
.
january
.
tbc
,
fcp
:
item
.
january
.
fcp
,
tbf
:
item
.
january
.
tbf
},
{
tbc
:
item
.
february
.
tbc
,
fcp
:
item
.
february
.
fcp
,
tbf
:
item
.
february
.
tbf
},
{
tbc
:
item
.
march
.
tbc
,
fcp
:
item
.
march
.
fcp
,
tbf
:
item
.
march
.
tbf
},
{
tbc
:
item
.
april
.
tbc
,
fcp
:
item
.
april
.
fcp
,
tbf
:
item
.
april
.
tbf
},
{
tbc
:
item
.
may
.
tbc
,
fcp
:
item
.
may
.
fcp
,
tbf
:
item
.
may
.
tbf
},
{
tbc
:
item
.
june
.
tbc
,
fcp
:
item
.
june
.
fcp
,
tbf
:
item
.
june
.
tbf
},
{
tbc
:
item
.
july
.
tbc
,
fcp
:
item
.
july
.
fcp
,
tbf
:
item
.
july
.
tbf
},
{
tbc
:
item
.
august
.
tbc
,
fcp
:
item
.
august
.
fcp
,
tbf
:
item
.
august
.
tbf
},
{
tbc
:
item
.
september
.
tbc
,
fcp
:
item
.
september
.
fcp
,
tbf
:
item
.
september
.
tbf
},
{
tbc
:
item
.
october
.
tbc
,
fcp
:
item
.
october
.
fcp
,
tbf
:
item
.
october
.
tbf
},
{
tbc
:
item
.
november
.
tbc
,
fcp
:
item
.
november
.
fcp
,
tbf
:
item
.
november
.
tbf
},
{
tbc
:
item
.
december
.
tbc
,
fcp
:
item
.
december
.
fcp
,
tbf
:
item
.
december
.
tbf
},
item
.
total_current_year
,
{
tbc
:
item
.
total_next_year
.
tbc
,
fcp
:
item
.
total_next_year
.
fcp
,
tbf
:
item
.
total_next_year
.
tbf
},
{
tbc
:
item
.
total_more_year
.
tbc
,
fcp
:
item
.
total_more_year
.
fcp
,
tbf
:
item
.
total_more_year
.
tbf
},
item
.
error
]
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
24
].
length
>
0
)
{
console
.
log
(
'masuk'
)
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
})
}
})
console
.
log
(
this
.
state
.
dataTable
);
})
}
}
})
}
uploadTP
()
{
let
data
=
[]
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
4
],
january
:
{
tbc
:
String
(
i
[
9
].
tbc
),
fcp
:
String
(
i
[
9
].
fcp
),
tbf
:
String
(
i
[
9
].
tbf
)
},
february
:
{
tbc
:
String
(
i
[
10
].
tbc
),
fcp
:
String
(
i
[
10
].
fcp
),
tbf
:
String
(
i
[
10
].
tbf
)
},
march
:
{
tbc
:
String
(
i
[
11
].
tbc
),
fcp
:
String
(
i
[
11
].
fcp
),
tbf
:
String
(
i
[
11
].
tbf
)
},
april
:
{
tbc
:
String
(
i
[
12
].
tbc
),
fcp
:
String
(
i
[
12
].
fcp
),
tbf
:
String
(
i
[
12
].
tbf
)
},
may
:
{
tbc
:
String
(
i
[
13
].
tbc
),
fcp
:
String
(
i
[
13
].
fcp
),
tbf
:
String
(
i
[
13
].
tbf
)
},
june
:
{
tbc
:
String
(
i
[
14
].
tbc
),
fcp
:
String
(
i
[
14
].
fcp
),
tbf
:
String
(
i
[
14
].
tbf
)
},
july
:
{
tbc
:
String
(
i
[
15
].
tbc
),
fcp
:
String
(
i
[
15
].
fcp
),
tbf
:
String
(
i
[
15
].
tbf
)
},
august
:
{
tbc
:
String
(
i
[
16
].
tbc
),
fcp
:
String
(
i
[
16
].
fcp
),
tbf
:
String
(
i
[
16
].
tbf
)
},
september
:
{
tbc
:
String
(
i
[
17
].
tbc
),
fcp
:
String
(
i
[
17
].
fcp
),
tbf
:
String
(
i
[
17
].
tbf
)
},
october
:
{
tbc
:
String
(
i
[
18
].
tbc
),
fcp
:
String
(
i
[
18
].
fcp
),
tbf
:
String
(
i
[
18
].
tbf
)
},
november
:
{
tbc
:
String
(
i
[
19
].
tbc
),
fcp
:
String
(
i
[
19
].
fcp
),
tbf
:
String
(
i
[
19
].
tbf
)
},
december
:
{
tbc
:
String
(
i
[
20
].
tbc
),
fcp
:
String
(
i
[
20
].
fcp
),
tbf
:
String
(
i
[
20
].
tbf
)
},
total_current_year
:
String
(
i
[
21
]),
total_next_year
:
{
tbc
:
String
(
i
[
22
].
tbc
),
fcp
:
String
(
i
[
22
].
fcp
),
tbf
:
String
(
i
[
22
].
tbf
)
},
total_more_year
:
{
tbc
:
String
(
i
[
23
].
tbc
),
fcp
:
String
(
i
[
23
].
fcp
),
tbf
:
String
(
i
[
23
].
tbf
)
}
})
})
let
body
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
tax_planning
:
data
}
console
.
log
(
data
);
api
.
create
(
'UPLOAD'
).
uploadMasterBudget
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
}
else
{
alert
(
response
.
data
.
status
)
}
}
else
{
alert
(
response
.
problem
)
}
})
}
...
...
@@ -476,6 +583,18 @@ export default class TaxPlanning extends Component {
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
=
Number
(
val
)
}
}
const
handleTotal
=
(
tableMeta
)
=>
{
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
>=
9
&&
index
<=
20
)
{
let
valItem
=
item
==
undefined
||
item
==
""
?
0
:
item
total
+=
Number
(
valItem
)
}
})
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
return
total
// console.log(total);
}
const
handleValue
=
(
data
)
=>
{
let
total
=
0
// console.log(dataTable2)
...
...
@@ -586,8 +705,8 @@ export default class TaxPlanning extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
width
:
300
}}
>
{
tableMeta
.
rowData
[
2
2
]
?
tableMeta
.
rowData
[
2
2
].
length
>
0
?
{
tableMeta
.
rowData
[
2
4
]
?
tableMeta
.
rowData
[
2
4
].
length
>
0
?
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
LightTooltip
title
=
{
"Report Items Not Registered"
}
arrow
>
<
span
style
=
{{
fontSize
:
12
,
color
:
'red'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
...
...
@@ -4514,13 +4633,14 @@ export default class TaxPlanning extends Component {
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
!
this
.
state
.
loading
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider>
}
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
...
...
@@ -4623,13 +4743,14 @@ export default class TaxPlanning extends Component {
<
/div
>
{
this
.
state
.
dataLoaded
&&
(
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
!
this
.
state
.
loading
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider>
}
<
/MuiThemeProvider
>
<
/div
>
)}
<
/div
>
...
...
@@ -4675,7 +4796,7 @@ export default class TaxPlanning extends Component {
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
upload
BalanceSheet
()
this
.
upload
TP
()
},
100
);
})}
>
...
...
src/container/DocumentManagement/CreateManagementDoc.js
View file @
d92ca86a
...
...
@@ -362,7 +362,7 @@ export default class CreateManagementDoc extends Component {
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
result
=
{
this
.
state
.
result
}
acceptedFiles
=
{[
"xls"
,
"xlsx"
,
"pdf"
,
"PDF"
]}
acceptedFiles
=
{[
"xls"
,
"xlsx"
,
"pdf"
,
"PDF"
,
"docx"
,
"doc"
,
"pptx"
,
"ppt"
,
"ods"
,
"odf"
]}
intent
=
{
"management"
}
onHandle
=
{(
dt
)
=>
{
this
.
fileHandler
(
dt
)
...
...
src/container/DocumentManagement/EditManagementDoc.js
View file @
d92ca86a
...
...
@@ -407,7 +407,7 @@ export default class EditManagementDoc extends Component {
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
result
=
{
this
.
state
.
result
}
acceptedFiles
=
{[
"xls"
,
"xlsx"
,
"pdf"
,
"PDF"
]}
acceptedFiles
=
{[
"xls"
,
"xlsx"
,
"pdf"
,
"PDF"
,
"docx"
,
"doc"
,
"pptx"
,
"ppt"
,
"ods"
,
"odf"
]}
intent
=
{
"management"
}
onHandle
=
{(
dt
)
=>
{
this
.
fileHandler
(
dt
)
...
...
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