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
fa6bc23e
Commit
fa6bc23e
authored
Sep 25, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into didam
parents
18bebb7a
e57dcc56
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
740 additions
and
605 deletions
+740
-605
index.js
src/api/index.js
+3
-1
BudgetTahunan.js
src/container/BudgetTahunan.js
+4
-4
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+234
-199
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+139
-110
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+243
-183
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+117
-108
No files found.
src/api/index.js
View file @
fa6bc23e
...
...
@@ -191,6 +191,7 @@ const create = (type = "") => {
const
getPeriodeTransaction
=
()
=>
api
.
get
(
'transaction/get_periode'
)
const
deleteAttachment
=
(
id
)
=>
api
.
post
(
`transaction/delete_attachment/
${
id
}
`
)
const
getDetailReportMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_report_hierarki'
,
body
)
const
getLastestUpdateMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_latest_update'
,
body
)
const
createSubmitReport
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/create_submission_report'
,
body
)
const
getSubmission
=
(
body
)
=>
api
.
post
(
'transaction/get_submission_id'
,
body
)
const
checkUploadMB
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/check_import'
,
body
)
...
...
@@ -348,7 +349,8 @@ const create = (type = "") => {
deleteAllItemReport
,
validateSubmitReport
,
checkUploadOperatingInd
,
uploadOperatingInd
uploadOperatingInd
,
getLastestUpdateMB
}
}
...
...
src/container/BudgetTahunan.js
View file @
fa6bc23e
...
...
@@ -349,7 +349,7 @@ export default class BudgetTahunan extends Component {
render
()
{
const
columns
=
[
"#"
,
"
Jenis Laporan
"
,
const
columns
=
[
"#"
,
"
Report Type
"
,
{
name
:
"Revision"
,
options
:
{
...
...
@@ -464,12 +464,12 @@ export default class BudgetTahunan extends Component {
{
this
.
state
.
visibleBudgetTahunan
&&
(
<
div
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Pengajuan
Budget
Tahuna
n
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Master
Budget
Submissio
n
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Budget
Tahunan
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
...
...
@@ -484,7 +484,7 @@ export default class BudgetTahunan extends Component {
disableClearable
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Period
e
"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
<
TextField
{...
params
}
label
=
"Period"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
periode
}
/
>
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
fa6bc23e
...
...
@@ -44,7 +44,8 @@ export default class BalanceSheet extends Component {
disabledSave
:
true
,
editable
:
false
,
buttonError
:
false
,
judulColumn
:
null
judulColumn
:
null
,
updateBy
:
'-'
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -52,9 +53,29 @@ export default class BalanceSheet extends Component {
componentDidMount
()
{
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
console
.
log
(
this
.
props
);
}
getLatestUpdate
()
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"submission_id"
:
this
.
props
.
submissionID
}
api
.
create
().
getLastestUpdateMB
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
updateBy
:
response
.
data
.
data
.
latest_update
===
null
?
'-'
:
response
.
data
.
data
.
latest_update
})
}
}
})
}
getItemHierarki
()
{
this
.
setState
({
loading
:
true
,
judulColumn
:
null
})
let
payload
=
{
...
...
@@ -177,22 +198,22 @@ export default class BalanceSheet extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
i
[
6
]
),
january
:
String
(
i
[
7
]
),
february
:
String
(
i
[
8
]
),
march
:
String
(
i
[
9
]
),
april
:
String
(
i
[
10
]
),
may
:
String
(
i
[
11
]
),
june
:
String
(
i
[
12
]
),
july
:
String
(
i
[
13
]
),
august
:
String
(
i
[
14
]
),
september
:
String
(
i
[
15
]
),
october
:
String
(
i
[
16
]
),
november
:
String
(
i
[
17
]
),
december
:
String
(
i
[
18
]
),
total_current_year
:
String
(
i
[
19
]
),
total_next_year
:
String
(
i
[
20
]
),
total_more_year
:
String
(
i
[
21
]
)
total_actual_before
:
String
(
Number
(
i
[
6
]).
toFixed
(
1
)
),
january
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)
),
february
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)
),
march
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)
),
april
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)
),
may
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)
),
june
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)
),
july
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)
),
august
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)
),
september
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)
),
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)
),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)
),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)
),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)
),
total_next_year
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
)
),
total_more_year
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)
)
})
})
let
payload
=
{
...
...
@@ -218,7 +239,7 @@ export default class BalanceSheet extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Template Balance Sheet.xlsx'
;
a
.
download
=
'Template
Master Budget
Balance Sheet.xlsx'
;
a
.
click
();
}
}
...
...
@@ -319,27 +340,27 @@ export default class BalanceSheet extends Component {
})
}
uploadBalanceSheet
()
{
uploadBalanceSheet
(
type
)
{
let
data
=
[]
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
i
[
6
]
),
january
:
String
(
i
[
7
]
),
february
:
String
(
i
[
8
]
),
march
:
String
(
i
[
9
]
),
april
:
String
(
i
[
10
]
),
may
:
String
(
i
[
11
]
),
june
:
String
(
i
[
12
]
),
july
:
String
(
i
[
13
]
),
august
:
String
(
i
[
14
]
),
september
:
String
(
i
[
15
]
),
october
:
String
(
i
[
16
]
),
november
:
String
(
i
[
17
]
),
december
:
String
(
i
[
18
]
),
total_current_year
:
String
(
i
[
19
]
),
total_next_year
:
String
(
i
[
20
]
),
total_more_year
:
String
(
i
[
21
]
)
total_actual_before
:
String
(
Number
(
i
[
6
]).
toFixed
(
1
)
),
january
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)
),
february
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)
),
march
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)
),
april
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)
),
may
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)
),
june
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)
),
july
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)
),
august
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)
),
september
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)
),
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)
),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)
),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)
),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)
),
total_next_year
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
)
),
total_more_year
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)
)
})
})
let
body
=
{
...
...
@@ -347,9 +368,10 @@ export default class BalanceSheet extends Component {
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
balance_sheet
:
data
balance_sheet
:
data
,
status
:
type
}
console
.
log
(
data
);
//
console.log(data);
api
.
create
(
'UPLOAD'
).
uploadMasterBudget
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
...
...
@@ -360,13 +382,14 @@ export default class BalanceSheet extends Component {
alert
(
response
.
data
.
status
)
}
}
else
{
this
.
setState
({
loading
:
false
})
alert
(
response
.
problem
)
}
})
}
async
downloadAllData
()
{
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
...
...
@@ -377,36 +400,36 @@ export default class BalanceSheet extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Balance Sheet.xlsx'
;
a
.
download
=
'
Master Budget
Balance Sheet.xlsx'
;
a
.
click
();
}
}
handleValidate
()
{
let
data
=
[]
console
.
log
(
this
.
state
.
dataTable
)
//
console.log(this.state.dataTable)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
i
[
6
]),
january
:
String
(
i
[
7
]),
february
:
String
(
i
[
8
]),
march
:
String
(
i
[
9
]),
april
:
String
(
i
[
10
]),
may
:
String
(
i
[
11
]),
june
:
String
(
i
[
12
]),
july
:
String
(
i
[
13
]),
august
:
String
(
i
[
14
]),
september
:
String
(
i
[
15
]),
october
:
String
(
i
[
16
]),
november
:
String
(
i
[
17
]),
december
:
String
(
i
[
18
]),
total_current_year
:
String
(
i
[
19
]),
total_next_year
:
String
(
i
[
20
]),
total_more_year
:
String
(
i
[
21
])
january
:
i
[
0
]
===
3
&&
i
[
7
]
===
""
?
"0"
:
String
(
i
[
7
]),
february
:
i
[
0
]
===
3
&&
i
[
8
]
===
""
?
"0"
:
String
(
i
[
8
]),
march
:
i
[
0
]
===
3
&&
i
[
9
]
===
""
?
"0"
:
String
(
i
[
9
]),
april
:
i
[
0
]
===
3
&&
i
[
10
]
===
""
?
"0"
:
String
(
i
[
10
]),
may
:
i
[
0
]
===
3
&&
i
[
11
]
===
""
?
"0"
:
String
(
i
[
11
]),
june
:
i
[
0
]
===
3
&&
i
[
12
]
===
""
?
"0"
:
String
(
i
[
12
]),
july
:
i
[
0
]
===
3
&&
i
[
13
]
===
""
?
"0"
:
String
(
i
[
13
]),
august
:
i
[
0
]
===
3
&&
i
[
14
]
===
""
?
"0"
:
String
(
i
[
14
]),
september
:
i
[
0
]
===
3
&&
i
[
15
]
===
""
?
"0"
:
String
(
i
[
15
]),
october
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0"
:
String
(
i
[
16
]),
november
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0"
:
String
(
i
[
17
]),
december
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0"
:
String
(
i
[
18
]),
total_current_year
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0"
:
String
(
i
[
19
]),
total_next_year
:
i
[
0
]
===
3
&&
i
[
20
]
===
""
?
"0"
:
String
(
i
[
20
]),
total_more_year
:
i
[
0
]
===
3
&&
i
[
21
]
===
""
?
"0"
:
String
(
i
[
21
]),
})
})
console
.
log
(
JSON
.
stringify
(
data
))
//
console.log(JSON.stringify(data))
let
payload
=
{
"submission_id"
:
this
.
props
.
submissionID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
...
...
@@ -448,14 +471,7 @@ export default class BalanceSheet extends Component {
}
}
const
handleTotal
=
(
tableMeta
)
=>
{
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
>=
7
&&
index
<=
18
)
{
let
valItem
=
item
==
undefined
||
item
==
""
?
0
:
item
total
+=
Number
(
valItem
)
}
})
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
let
total
=
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
dataTable2
[
tableMeta
.
rowIndex
][
18
]
return
total
// console.log(total);
}
...
...
@@ -605,7 +621,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
/
>
}
/
>
...
...
@@ -635,11 +651,10 @@ export default class BalanceSheet extends Component {
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
decimalSeparator
=
{
"."
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
...
...
@@ -656,7 +671,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -670,7 +685,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -680,7 +695,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -725,7 +740,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -743,7 +758,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -757,7 +772,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -767,7 +782,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -812,7 +827,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -830,7 +845,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -844,7 +859,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -854,7 +869,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -899,7 +914,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -917,7 +932,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -931,7 +946,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -941,7 +956,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -986,7 +1001,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1004,7 +1019,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1018,7 +1033,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1028,7 +1043,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1073,7 +1088,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1091,7 +1106,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1105,7 +1120,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1115,7 +1130,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1160,7 +1175,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1178,7 +1193,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1192,7 +1207,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1202,7 +1217,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1247,7 +1262,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1265,7 +1280,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1279,7 +1294,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1289,7 +1304,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1334,7 +1349,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1352,7 +1367,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1366,7 +1381,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1376,7 +1391,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1421,7 +1436,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1439,7 +1454,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1453,7 +1468,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1463,7 +1478,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1508,7 +1523,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1526,7 +1541,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1540,7 +1555,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1550,7 +1565,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1595,7 +1610,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1613,7 +1628,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1627,7 +1642,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1637,7 +1652,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1680,7 +1695,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span>
:
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
...
...
@@ -1690,7 +1705,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleTotal
(
tableMeta
)}
value
=
{
Number
(
handleTotal
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span>
}
<
/div
>
...
...
@@ -1720,7 +1735,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1738,7 +1753,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1752,7 +1767,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1762,7 +1777,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1807,7 +1822,7 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1825,7 +1840,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1839,7 +1854,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1849,7 +1864,7 @@ export default class BalanceSheet extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleFormula
(
value
,
tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
@@ -1893,7 +1908,7 @@ export default class BalanceSheet extends Component {
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Pengajuan
Budget
Tahuna
n
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Master
Budget
Submissio
n
<
/Typography
>
<
/div
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
...
...
@@ -1905,7 +1920,7 @@ export default class BalanceSheet extends Component {
{
this
.
state
.
visibleBalanceSheet
===
true
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Budget
Tahunan
-
Balance
Sheet
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
-
Balance
Sheet
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
...
...
@@ -1977,22 +1992,17 @@ export default class BalanceSheet extends Component {
/
>
<
/MuiThemeProvider
>
<
/div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
20
}}
>
Last
Updated
by
:
{
this
.
state
.
updateBy
}
<
/Typography
>
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
...
...
@@ -2001,7 +2011,7 @@ export default class BalanceSheet extends Component {
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
@@ -2016,14 +2026,16 @@ export default class BalanceSheet extends Component {
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
handleValidate
()
},
100
);
})
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Ca
ncel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Ca
lculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
...
...
@@ -2036,21 +2048,25 @@ export default class BalanceSheet extends Component {
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
handleValidate
(
)
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
}}
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
//
disabled={this.state.buttonError}
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
{
this
.
state
.
buttonError
?
this
.
setState
({
loading
:
true
},
()
=>
{
...
...
@@ -2068,7 +2084,7 @@ export default class BalanceSheet extends Component {
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
@@ -2096,56 +2112,75 @@ export default class BalanceSheet extends Component {
<
/div
>
)}
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
width
:
'100%'
,
placeContent
:
'flex-end'
,
padding
:
20
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
,
visibleBalanceSheet
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
getItemHierarki
()
},
100
);
})}
style
=
{{
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/button
>
<
button
className
=
"button"
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
,
visibleBalanceSheet
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
,
buttonError
:
this
.
state
.
errorPreview
===
true
?
true
:
false
}
)
this
.
getItemHierarki
(
)
},
100
);
})
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadBalanceSheet
()
},
100
);
})}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
<
/Typography
>
<
/div
>
<
/button
>
})}
style
=
{{
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
,
buttonError
:
this
.
state
.
errorPreview
===
true
?
true
:
false
})
},
100
);
})
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadBalanceSheet
(
'draft'
)
},
100
);
})}
style
=
{{
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadBalanceSheet
(
'submitted'
)
},
100
);
})}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/Paper>
}
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
fa6bc23e
...
...
@@ -46,7 +46,8 @@ export default class FixedAssetsMovement extends Component {
disabledSave
:
true
,
editable
:
false
,
buttonError
:
false
,
judulColumn
:
null
judulColumn
:
null
,
updateBy
:
'-'
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -54,9 +55,29 @@ export default class FixedAssetsMovement extends Component {
componentDidMount
()
{
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
console
.
log
(
this
.
props
);
}
getLatestUpdate
()
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"submission_id"
:
this
.
props
.
submissionID
}
api
.
create
().
getLastestUpdateMB
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
updateBy
:
response
.
data
.
data
.
latest_update
===
null
?
'-'
:
response
.
data
.
data
.
latest_update
})
}
}
})
}
getItemHierarki
()
{
this
.
setState
({
loading
:
true
})
let
payload
=
{
...
...
@@ -180,22 +201,22 @@ export default class FixedAssetsMovement extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
i
[
6
]
),
january
:
String
(
i
[
7
]
),
february
:
String
(
i
[
8
]
),
march
:
String
(
i
[
9
]
),
april
:
String
(
i
[
10
]
),
may
:
String
(
i
[
11
]
),
june
:
String
(
i
[
12
]
),
july
:
String
(
i
[
13
]
),
august
:
String
(
i
[
14
]
),
september
:
String
(
i
[
15
]
),
october
:
String
(
i
[
16
]
),
november
:
String
(
i
[
17
]
),
december
:
String
(
i
[
18
]
),
total_current_year
:
String
(
i
[
19
]
),
total_next_year
:
String
(
i
[
20
]
),
total_more_year
:
String
(
i
[
21
]
)
total_actual_before
:
String
(
Number
(
i
[
6
]).
toFixed
(
1
)
),
january
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)
),
february
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)
),
march
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)
),
april
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)
),
may
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)
),
june
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)
),
july
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)
),
august
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)
),
september
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)
),
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)
),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)
),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)
),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)
),
total_next_year
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
)
),
total_more_year
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)
)
})
})
...
...
@@ -207,7 +228,7 @@ export default class FixedAssetsMovement extends Component {
"status"
:
type
,
"fixed_asset_movement"
:
data
}
console
.
log
(
data
);
//
console.log(data);
this
.
props
.
saveToMasterBudget
(
payload
)
this
.
props
.
onClickClose
()
}
...
...
@@ -222,7 +243,7 @@ export default class FixedAssetsMovement extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Template Fixed Assets Movement.xlsx'
;
a
.
download
=
'Template
Master Budget
Fixed Assets Movement.xlsx'
;
a
.
click
();
}
}
...
...
@@ -264,10 +285,12 @@ export default class FixedAssetsMovement extends Component {
}
})
let
body
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
fixed_asset_movement
:
payload
}
console
.
log
(
body
)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
...
...
@@ -370,7 +393,8 @@ export default class FixedAssetsMovement extends Component {
}
async
downloadAllData
()
{
console
.
log
(
this
.
props
)
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
)
...
...
@@ -380,45 +404,45 @@ export default class FixedAssetsMovement extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Fixed Assets Movement.xlsx'
;
a
.
download
=
'
Master Budget
Fixed Assets Movement.xlsx'
;
a
.
click
();
}
}
handleValidate
()
{
let
data
=
[]
//
console.log(this.state.dataTable)
console
.
log
(
this
.
state
.
dataTable
)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
i
[
6
]),
january
:
String
(
i
[
7
]),
february
:
String
(
i
[
8
]),
march
:
String
(
i
[
9
]),
april
:
String
(
i
[
10
]),
may
:
String
(
i
[
11
]),
june
:
String
(
i
[
12
]),
july
:
String
(
i
[
13
]),
august
:
String
(
i
[
14
]),
september
:
String
(
i
[
15
]),
october
:
String
(
i
[
16
]),
november
:
String
(
i
[
17
]),
december
:
String
(
i
[
18
]),
total_current_year
:
String
(
i
[
19
]),
total_next_year
:
String
(
i
[
20
]),
total_more_year
:
String
(
i
[
21
])
january
:
i
[
0
]
===
3
&&
i
[
7
]
===
""
?
"0"
:
String
(
i
[
7
]),
february
:
i
[
0
]
===
3
&&
i
[
8
]
===
""
?
"0"
:
String
(
i
[
8
]),
march
:
i
[
0
]
===
3
&&
i
[
9
]
===
""
?
"0"
:
String
(
i
[
9
]),
april
:
i
[
0
]
===
3
&&
i
[
10
]
===
""
?
"0"
:
String
(
i
[
10
]),
may
:
i
[
0
]
===
3
&&
i
[
11
]
===
""
?
"0"
:
String
(
i
[
11
]),
june
:
i
[
0
]
===
3
&&
i
[
12
]
===
""
?
"0"
:
String
(
i
[
12
]),
july
:
i
[
0
]
===
3
&&
i
[
13
]
===
""
?
"0"
:
String
(
i
[
13
]),
august
:
i
[
0
]
===
3
&&
i
[
14
]
===
""
?
"0"
:
String
(
i
[
14
]),
september
:
i
[
0
]
===
3
&&
i
[
15
]
===
""
?
"0"
:
String
(
i
[
15
]),
october
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0"
:
String
(
i
[
16
]),
november
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0"
:
String
(
i
[
17
]),
december
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0"
:
String
(
i
[
18
]),
total_current_year
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0"
:
String
(
i
[
19
]),
total_next_year
:
i
[
0
]
===
3
&&
i
[
20
]
===
""
?
"0"
:
String
(
i
[
20
]),
total_more_year
:
i
[
0
]
===
3
&&
i
[
21
]
===
""
?
"0"
:
String
(
i
[
21
])
})
})
// console.log(JSON.stringify(data))
let
payload
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
fixed_asset_movement
:
data
,
status
:
"submitted"
"submission_id"
:
this
.
props
.
submissionID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"fixed_asset_movement"
:
data
,
"status"
:
"submitted"
}
console
.
log
(
payload
)
//
console.log(payload)
api
.
create
().
validateSubmitReport
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
data
.
result
)
{
...
...
@@ -609,7 +633,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
/
>
}
/
>
...
...
@@ -642,7 +666,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
...
...
@@ -659,7 +683,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -730,7 +754,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -748,7 +772,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -819,7 +843,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -837,7 +861,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -908,7 +932,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -926,7 +950,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -997,7 +1021,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1015,7 +1039,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1086,7 +1110,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1104,7 +1128,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1175,7 +1199,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1193,7 +1217,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1264,7 +1288,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1282,7 +1306,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1353,7 +1377,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1371,7 +1395,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1442,7 +1466,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1460,7 +1484,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1531,7 +1555,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1549,7 +1573,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1620,7 +1644,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1638,7 +1662,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1707,7 +1731,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span>
:
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
...
...
@@ -1717,7 +1741,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleTotal
(
tableMeta
)}
value
=
{
Number
(
handleTotal
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span>
}
<
/div
>
...
...
@@ -1747,7 +1771,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1765,7 +1789,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1836,7 +1860,7 @@ export default class FixedAssetsMovement extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1854,7 +1878,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1918,19 +1942,19 @@ export default class FixedAssetsMovement extends Component {
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Pengajuan
Budget
Tahuna
n
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Master
Budget
Submissio
n
<
/Typography
>
<
/div
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
{
this
.
state
.
loading
&&
loadingComponent
}
{
/* {this.state.loading && loadingComponent} */
}
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
{
this
.
state
.
visibleFixedAssetsMovement
===
true
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Budget
Tahunan
-
Fixed
Assets
Movement
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
-
Fixed
Assets
Movement
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
...
...
@@ -1993,43 +2017,19 @@ export default class FixedAssetsMovement 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>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
20
}}
>
Last
Updated
by
:
{
this
.
state
.
updateBy
}
<
/Typography
>
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
...
...
@@ -2046,10 +2046,12 @@ export default class FixedAssetsMovement extends Component {
},
100
);
})}
>
<
div
style
=
{{
backgroundColor
:
'#
fff
'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#
354960
'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
div
style
=
{{
backgroundColor
:
'#
019ce5
'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#
fff
'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
...
...
@@ -2073,6 +2075,32 @@ export default class FixedAssetsMovement extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
className
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
...
...
@@ -2110,13 +2138,14 @@ export default class FixedAssetsMovement 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
>
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
fa6bc23e
...
...
@@ -3,8 +3,6 @@ import { Typography, Paper, createMuiTheme, MuiThemeProvider, TableCell, FormCon
import
MUIDataTable
from
'mui-datatables'
;
import
NumberFormat
from
'react-number-format'
;
import
api
from
'../../api'
;
import
AddIcon
from
'@material-ui/icons/Add'
;
import
{
values
,
type
}
from
'ramda'
;
import
PropagateLoader
from
"react-spinners/PropagateLoader"
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
...
...
@@ -46,7 +44,8 @@ export default class ProfitLoss extends Component {
disabledSave
:
true
,
editable
:
false
,
buttonError
:
false
,
judulColumn
:
null
judulColumn
:
null
,
updateBy
:
'-'
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -54,9 +53,29 @@ export default class ProfitLoss extends Component {
componentDidMount
()
{
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
console
.
log
(
this
.
props
);
}
getLatestUpdate
()
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"submission_id"
:
this
.
props
.
submissionID
}
api
.
create
().
getLastestUpdateMB
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
updateBy
:
response
.
data
.
data
.
latest_update
===
null
?
'-'
:
response
.
data
.
data
.
latest_update
})
}
}
})
}
getItemHierarki
()
{
this
.
setState
({
loading
:
true
,
judulColumn
:
null
})
let
payload
=
{
...
...
@@ -71,7 +90,6 @@ export default class ProfitLoss extends Component {
let
dataTable
=
[]
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
console
.
log
(
res
)
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
...
...
@@ -184,22 +202,22 @@ export default class ProfitLoss extends Component {
data
.
push
({
item_report_id
:
i
[
1
],
notes
:
i
[
6
]
==
null
||
i
[
6
]
==
""
?
""
:
String
(
i
[
6
]),
total_actual_before
:
String
(
i
[
7
]
),
january
:
String
(
i
[
8
]
),
february
:
String
(
i
[
9
]
),
march
:
String
(
i
[
10
]
),
april
:
String
(
i
[
11
]
),
may
:
String
(
i
[
12
]
),
june
:
String
(
i
[
13
]
),
july
:
String
(
i
[
14
]
),
august
:
String
(
i
[
15
]
),
september
:
String
(
i
[
16
]
),
october
:
String
(
i
[
17
]
),
november
:
String
(
i
[
18
]
),
december
:
String
(
i
[
19
]
),
total_current_year
:
String
(
i
[
20
]
),
total_next_year
:
String
(
i
[
21
]
),
total_more_year
:
String
(
i
[
22
]
)
total_actual_before
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)
),
january
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)
),
february
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)
),
march
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)
),
april
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)
),
may
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)
),
june
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)
),
july
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)
),
august
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)
),
september
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)
),
october
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)
),
november
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)
),
december
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)
),
total_current_year
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
)
),
total_next_year
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)
),
total_more_year
:
String
(
Number
(
i
[
22
]).
toFixed
(
1
)
)
})
})
let
payload
=
{
...
...
@@ -210,7 +228,7 @@ export default class ProfitLoss extends Component {
"status"
:
type
,
"profit_loss"
:
data
}
console
.
log
(
data
);
//
console.log(data);
this
.
props
.
saveToMasterBudget
(
payload
)
this
.
props
.
onClickClose
()
}
...
...
@@ -225,7 +243,7 @@ export default class ProfitLoss extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Template
Profit
Loss.xlsx'
;
a
.
download
=
'Template
Master Budget Profit &
Loss.xlsx'
;
a
.
click
();
}
}
...
...
@@ -321,35 +339,35 @@ export default class ProfitLoss extends Component {
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
})
}
})
// console.log(
dataTable
)
// console.log(
this.state.buttonError
)
})
}
}
})
}
uploadProfitLoss
()
{
uploadProfitLoss
(
type
)
{
let
data
=
[]
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
notes
:
String
(
i
[
6
]),
total_actual_before
:
String
(
i
[
7
]
),
january
:
String
(
i
[
8
]
),
february
:
String
(
i
[
9
]
),
march
:
String
(
i
[
10
]
),
april
:
String
(
i
[
11
]
),
may
:
String
(
i
[
12
]
),
june
:
String
(
i
[
13
]
),
july
:
String
(
i
[
14
]
),
august
:
String
(
i
[
15
]
),
september
:
String
(
i
[
16
]
),
october
:
String
(
i
[
17
]
),
november
:
String
(
i
[
18
]
),
december
:
String
(
i
[
19
]
),
total_current_year
:
String
(
i
[
20
]
),
total_next_year
:
String
(
i
[
21
]
),
total_more_year
:
String
(
i
[
22
])
total_actual_before
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)
),
january
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)
),
february
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)
),
march
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
)
),
april
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)
),
may
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
)
),
june
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
)
),
july
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)
),
august
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)
),
september
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)
),
october
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)
),
november
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)
),
december
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)
),
total_current_year
:
String
(
Number
(
i
[
20
]).
toFixed
(
1
)
),
total_next_year
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)
),
total_more_year
:
String
(
Number
(
i
[
22
]).
toFixed
(
1
)),
})
})
let
body
=
{
...
...
@@ -357,10 +375,10 @@ export default class ProfitLoss extends Component {
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
profit_loss
:
data
profit_loss
:
data
,
status
:
type
}
console
.
log
(
data
);
// console.log(JSON.stringify(body));
api
.
create
(
'UPLOAD'
).
uploadMasterBudget
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
...
...
@@ -371,15 +389,17 @@ export default class ProfitLoss extends Component {
alert
(
response
.
data
.
status
)
}
}
else
{
alert
(
response
.
problem
)
this
.
setState
({
loading
:
false
})
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
alert
(
response
.
problem
)
// this.props.onClickClose()
// this.props.getReport()
}
})
}
async
downloadAllData
()
{
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
)
...
...
@@ -389,33 +409,34 @@ export default class ProfitLoss extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'
Profit
Loss.xlsx'
;
a
.
download
=
'
Master Budget Profit &
Loss.xlsx'
;
a
.
click
();
}
}
handleValidate
()
{
let
data
=
[]
console
.
log
(
this
.
state
.
dataTable
)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
notes
:
i
[
6
]
==
null
||
i
[
6
]
==
""
?
""
:
String
(
i
[
6
]),
total_actual_before
:
String
(
i
[
7
]),
january
:
String
(
i
[
8
]),
february
:
String
(
i
[
9
]),
march
:
String
(
i
[
10
]),
april
:
String
(
i
[
11
]),
may
:
String
(
i
[
12
]),
june
:
String
(
i
[
13
]),
july
:
String
(
i
[
14
]),
august
:
String
(
i
[
15
]),
september
:
String
(
i
[
16
]),
october
:
String
(
i
[
17
]),
november
:
String
(
i
[
18
]),
december
:
String
(
i
[
19
]),
total_current_year
:
String
(
i
[
20
]),
total_next_year
:
String
(
i
[
21
]),
total_more_year
:
String
(
i
[
22
])
january
:
i
[
0
]
===
3
&&
i
[
8
]
===
""
?
"0"
:
String
(
i
[
8
]),
february
:
i
[
0
]
===
3
&&
i
[
9
]
===
""
?
"0"
:
String
(
i
[
9
]),
march
:
i
[
0
]
===
3
&&
i
[
10
]
===
""
?
"0"
:
String
(
i
[
10
]),
april
:
i
[
0
]
===
3
&&
i
[
11
]
===
""
?
"0"
:
String
(
i
[
11
]),
may
:
i
[
0
]
===
3
&&
i
[
12
]
===
""
?
"0"
:
String
(
i
[
12
]),
june
:
i
[
0
]
===
3
&&
i
[
13
]
===
""
?
"0"
:
String
(
i
[
13
]),
july
:
i
[
0
]
===
3
&&
i
[
14
]
===
""
?
"0"
:
String
(
i
[
14
]),
august
:
i
[
0
]
===
3
&&
i
[
15
]
===
""
?
"0"
:
String
(
i
[
15
]),
september
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0"
:
String
(
i
[
16
]),
october
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0"
:
String
(
i
[
17
]),
november
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0"
:
String
(
i
[
18
]),
december
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0"
:
String
(
i
[
19
]),
total_current_year
:
i
[
0
]
===
3
&&
i
[
20
]
===
""
?
"0"
:
String
(
i
[
20
]),
total_next_year
:
i
[
0
]
===
3
&&
i
[
21
]
===
""
?
"0"
:
String
(
i
[
21
]),
total_more_year
:
i
[
0
]
===
3
&&
i
[
22
]
===
""
?
"0"
:
String
(
i
[
22
])
})
})
let
payload
=
{
...
...
@@ -423,9 +444,10 @@ export default class ProfitLoss extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"
status"
:
type
,
"
profit_loss"
:
data
"
profit_loss"
:
data
,
"
status"
:
"submitted"
}
console
.
log
(
payload
)
api
.
create
().
validateSubmitReport
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
data
.
result
)
{
...
...
@@ -436,11 +458,14 @@ export default class ProfitLoss extends Component {
})
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
// let data = this.state.dataTable2
if
(
type
===
"actual"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
else
{
...
...
@@ -464,8 +489,15 @@ export default class ProfitLoss extends Component {
total
+=
Number
(
valItem
)
}
})
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
total
return
total
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
return
value
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
total
return
total
}
// console.log(total);
}
const
handleNotes
=
(
value
,
tableMeta
)
=>
{
...
...
@@ -656,7 +688,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
/
>
}
/
>
...
...
@@ -689,7 +721,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
...
...
@@ -706,7 +738,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -777,7 +809,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -795,7 +827,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -866,7 +898,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -884,7 +916,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -955,7 +987,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -973,7 +1005,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1044,7 +1076,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1062,7 +1094,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1133,7 +1165,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1151,7 +1183,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1222,7 +1254,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1240,7 +1272,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1311,7 +1343,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1329,7 +1361,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1400,7 +1432,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1418,7 +1450,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1489,7 +1521,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1507,7 +1539,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1578,7 +1610,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1596,7 +1628,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1667,7 +1699,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1685,7 +1717,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1754,7 +1786,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span>
:
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
...
...
@@ -1764,7 +1796,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleTotal
(
tableMeta
)}
value
=
{
Number
(
handleTotal
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span>
}
<
/div
>
...
...
@@ -1794,7 +1826,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1812,7 +1844,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1883,7 +1915,7 @@ export default class ProfitLoss extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1901,7 +1933,7 @@ export default class ProfitLoss extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
handleValue
(
tableMeta
)}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1971,25 +2003,25 @@ export default class ProfitLoss extends Component {
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Pengajuan
Budget
Tahuna
n
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Master
Budget
Submissio
n
<
/Typography
>
<
/div
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
{
this
.
state
.
loading
&&
loadingComponent
}
{
/* {this.state.loading && loadingComponent} */
}
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
{
this
.
state
.
visibleProfitLoss
===
true
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Budget
Tahunan
-
Profit
&
Loss
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
-
Profit
&
Loss
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
e
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
...
...
@@ -2046,30 +2078,26 @@ export default class ProfitLoss 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
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
20
}}
>
Last
Updated
by
:
{
this
.
state
.
updateBy
}
<
/Typography
>
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
...
...
@@ -2078,7 +2106,7 @@ export default class ProfitLoss extends Component {
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
@@ -2093,14 +2121,16 @@ export default class ProfitLoss extends Component {
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
handleValidate
()
},
100
);
})
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Ca
ncel
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Ca
lculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
...
...
@@ -2113,24 +2143,34 @@ export default class ProfitLoss extends Component {
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
handleValidate
(
)
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
}}
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
this
.
backToMasterBudget
(
'submitted'
)}
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
{
this
.
state
.
buttonError
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
,
loading
:
false
})
},
100
);
})
:
this
.
backToMasterBudget
(
'submitted'
)
}}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
...
...
@@ -2139,7 +2179,7 @@ export default class ProfitLoss extends Component {
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complate
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
@@ -2151,71 +2191,91 @@ export default class ProfitLoss extends Component {
<
div
style
=
{{
padding
:
25
}}
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
e
:
{
this
.
props
.
periode
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/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
>
<
div
style
=
{{
display
:
'flex'
,
width
:
'100%'
,
placeContent
:
'flex-end'
,
padding
:
20
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
,
visibleProfitLoss
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
getItemHierarki
()
},
100
);
})}
style
=
{{
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/button
>
<
button
className
=
"button"
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
,
visibleProfitLoss
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
,
buttonError
:
this
.
state
.
errorPreview
===
true
?
true
:
false
}
)
this
.
getItemHierarki
(
)
},
100
);
})
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadProfitLoss
()
},
100
);
})}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
<
/Typography
>
<
/div
>
<
/button
>
})}
style
=
{{
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
// disabled={this.state.buttonError}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
,
buttonError
:
this
.
state
.
errorPreview
===
true
?
true
:
false
})
},
100
);
})
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadProfitLoss
(
'draft'
)
},
100
);
})}
style
=
{{
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadProfitLoss
(
'submitted'
)
},
100
);
})}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/Paper>
}
...
...
src/container/BudgetTahunan/TaxPlanning.js
View file @
fa6bc23e
...
...
@@ -375,8 +375,8 @@ export default class TaxPlanning extends Component {
report_id
:
this
.
props
.
report_id
,
tax_planning
:
payload
}
console
.
log
(
body
)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
console
.
log
(
this
.
state
.
judulColumn
)
}
});
}
...
...
@@ -578,7 +578,6 @@ export default class TaxPlanning extends Component {
handleValidate
()
{
let
data
=
[]
console
.
log
(
this
.
state
.
dataTable
)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
4
],
...
...
@@ -661,13 +660,14 @@ 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
"
:
data
,
"
tax_planning
"
:
data
,
"status"
:
"submitted"
}
api
.
create
().
validateSubmitReport
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
data
.
result
)
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
true
})
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
true
,
})
alert
(
"Type Input Can't be Empty"
)
}
else
{
this
.
setState
({
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
...
...
@@ -684,7 +684,7 @@ export default class TaxPlanning extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Template Tax Planning.xlsx'
;
a
.
download
=
'Template
Master Budget
Tax Planning.xlsx'
;
a
.
click
();
}
}
...
...
@@ -699,7 +699,7 @@ export default class TaxPlanning extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Tax Planning.xlsx'
;
a
.
download
=
'
Master Budget
Tax Planning.xlsx'
;
a
.
click
();
}
}
...
...
@@ -710,22 +710,31 @@ export default class TaxPlanning extends Component {
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
// let data = this.state.dataTable2
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
4
]
===
dataTable2
[
tableMeta
.
rowIndex
][
5
])
// ini buat input untuk perhitungan parent nya
if
(
indexParent
>
0
)
{
// console.log(indexParent)
if
(
indexChilds
==
1
)
{
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
=
Number
(
val
)
let
jagain
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
].
fcp
a
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
].
fcp
=
jagain
===
undefined
?
(
0
+
Number
(
val
))
:
(
Number
(
jagain
)
+
Number
(
val
))
}
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
=
Number
(
val
)
console
.
log
(
tableMeta
)
if
(
indexChilds
==
0
){
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbc
=
Number
(
val
)
}
else
if
(
indexChilds
==
1
){
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
fcp
=
Number
(
val
)
}
else
if
(
indexChilds
==
2
){
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
tbf
=
Number
(
val
)
}
}
}
const
handleTotal
=
(
tableMeta
)
=>
{
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
>=
9
&&
index
<=
20
)
{
console
.
log
(
item
);
//
console.log(item);
let
valItem
=
item
.
fcp
==
undefined
||
item
.
fcp
==
""
?
0
:
item
.
fcp
total
+=
Number
(
valItem
)
}
...
...
@@ -870,7 +879,7 @@ export default class TaxPlanning extends Component {
}
}
},
{
name
:
`Jan
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
2
]
:
`Jan
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -910,12 +919,12 @@ export default class TaxPlanning extends Component {
decimalSeparator
=
{
"."
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// handleChange(event.target.value, tableMeta
)
console
.
log
(
event
.
target
.
value
)
handleChange
(
event
.
target
.
value
,
tableMeta
,
0
)
console
.
log
(
dataTable2
)
}}
/
>
}
...
...
@@ -988,7 +997,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1066,11 +1075,11 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// handleChange(event.target.value, tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
,
2
)
console
.
log
(
dataTable2
)
}}
/
>
...
...
@@ -1137,7 +1146,7 @@ export default class TaxPlanning extends Component {
}
}
},
{
name
:
`Feb
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
5
]
:
`Feb
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -1176,7 +1185,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1253,7 +1262,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1331,7 +1340,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1403,7 +1412,7 @@ export default class TaxPlanning extends Component {
}
},
{
name
:
`Mar
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
8
]
:
`Mar
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -1442,7 +1451,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1519,7 +1528,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1597,7 +1606,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1668,7 +1677,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`Apr
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
11
]
:
`Apr
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -1707,7 +1716,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1784,7 +1793,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1862,7 +1871,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1933,7 +1942,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`May
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
14
]
:
`May
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -1972,7 +1981,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2049,7 +2058,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2127,7 +2136,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2198,7 +2207,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`Jun
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
17
]
:
`Jun
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -2237,7 +2246,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2314,7 +2323,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2392,7 +2401,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2463,7 +2472,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`Jul
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
20
]
:
`Jul
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -2502,7 +2511,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2579,7 +2588,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2657,7 +2666,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2728,7 +2737,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`Aug
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
23
]
:
`Aug
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -2767,7 +2776,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2844,7 +2853,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2922,7 +2931,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -2993,7 +3002,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`Sep
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
26
]
:
`Sep
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -3032,7 +3041,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3109,7 +3118,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3187,7 +3196,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3258,7 +3267,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`Oct
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
29
]
:
`Oct
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -3297,7 +3306,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3374,7 +3383,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3452,7 +3461,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3523,7 +3532,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`Nov
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
32
]
:
`Nov
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -3562,7 +3571,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3639,7 +3648,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3717,7 +3726,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3788,7 +3797,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`Dec
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
35
]
:
`Dec
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -3827,7 +3836,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3904,7 +3913,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -3982,7 +3991,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -4053,7 +4062,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`
${
this
.
props
.
periode
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
38
]
:
`
${
this
.
props
.
periode
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
div
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -4075,7 +4084,7 @@ export default class TaxPlanning extends Component {
<
div
className
=
"grid grid-3x content-center"
>
{
/* <div className="col-1"> */
}
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
1
]
===
3
?
{
tableMeta
.
rowData
[
2
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -4097,7 +4106,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
disabled
=
{
true
}
value
=
{
handleTotal
(
tableMeta
)}
/
>
...
...
@@ -4164,7 +4173,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`
${
Number
(
this
.
props
.
periode
)
+
1
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
39
]
:
`
${
Number
(
this
.
props
.
periode
)
+
1
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#37b5e6'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -4203,7 +4212,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -4280,7 +4289,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -4358,7 +4367,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -4429,7 +4438,7 @@ export default class TaxPlanning extends Component {
}
}
},{
name
:
`
${
Number
(
this
.
props
.
periode
)
+
2
}
`
,
name
:
this
.
state
.
judulColumn
!==
null
?
this
.
state
.
judulColumn
[
42
]
:
`
${
Number
(
this
.
props
.
periode
)
+
2
}
`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#37b5e6'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
...
...
@@ -4468,7 +4477,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbc
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -4545,7 +4554,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
fcp
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -4623,7 +4632,7 @@ export default class TaxPlanning extends Component {
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
placeholder
=
"
input
"
value
=
{
value
.
tbf
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -4709,14 +4718,14 @@ export default class TaxPlanning extends Component {
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Pengajuan
Budget
Tahuna
n
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Master
Budget
Submissio
n
<
/Typography
>
<
/div
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
{
this
.
state
.
visibleTP
===
true
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Budget
Tahunan
-
Tax
Planning
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
-
Tax
Planning
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
...
...
@@ -4792,34 +4801,6 @@ export default class TaxPlanning extends Component {
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
...
...
@@ -4833,10 +4814,12 @@ export default class TaxPlanning extends Component {
},
100
);
})}
>
<
div
style
=
{{
backgroundColor
:
'#
fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
,
marginRight
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#
354960
'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
div
style
=
{{
backgroundColor
:
'#
019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#
fff
'
,
textAlign
:
'center'
}}
>
Cancel
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
...
...
@@ -4851,16 +4834,42 @@ export default class TaxPlanning extends Component {
// this.forceUpdate()
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
true
})
//
this.handleValidate()
//
this.setState({ loading: false, buttonError: false, editable: true })
this
.
handleValidate
()
},
100
);
})
}}
>
<
div
style
=
{{
backgroundColor
:
'#
354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center
'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#
fff
'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
div
style
=
{{
backgroundColor
:
'#
fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960
'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#
354960
'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginRight
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
...
...
@@ -4873,7 +4882,7 @@ export default class TaxPlanning extends Component {
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginRight
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
...
...
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