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
6150d3b8
Commit
6150d3b8
authored
Jul 03, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
aa37ad95
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
3762 additions
and
3483 deletions
+3762
-3483
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+2
-0
SubHolding.js
src/container/Reports/SubHolding.js
+2
-1
BalanceSheetRO.js
src/container/RollingOutlook/BalanceSheetRO.js
+105
-41
CashFlowRO.js
src/container/RollingOutlook/CashFlowRO.js
+62
-13
CorporateAnnualTargetRO.js
src/container/RollingOutlook/CorporateAnnualTargetRO.js
+102
-39
OperatingIndicatorRO.js
src/container/RollingOutlook/OperatingIndicatorRO.js
+27
-5
RollingOutlook.js
src/container/RollingOutlook/RollingOutlook.js
+15
-9
TaxPlanningRO.js
src/container/RollingOutlook/TaxPlanningRO.js
+3447
-3375
No files found.
src/container/MonthlyReport/OperatingIndicatorMR.js
View file @
6150d3b8
...
@@ -72,6 +72,8 @@ export default class OperatingIndicatorMR extends Component {
...
@@ -72,6 +72,8 @@ export default class OperatingIndicatorMR extends Component {
alert
:
false
,
alert
:
false
,
tipeAlert
:
''
,
tipeAlert
:
''
,
messageAlert
:
''
,
messageAlert
:
''
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
...
...
src/container/Reports/SubHolding.js
View file @
6150d3b8
...
@@ -1881,7 +1881,8 @@ export default class SubHolding extends Component {
...
@@ -1881,7 +1881,8 @@ export default class SubHolding extends Component {
"company_id"
:
this
.
state
.
company
.
company_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"operating_indicator_id"
:
this
.
state
.
OPID
,
"operating_indicator_id"
:
this
.
state
.
OPID
,
"periode"
:
this
.
state
.
periode
.
periode
,
"periode"
:
this
.
state
.
periode
.
periode
,
"report_id"
:
21
"report_id"
:
21
,
"currency_id"
:
this
.
state
.
defaultCurrency
.
id
}
}
api
.
create
().
getAllReportOI
(
payloadOI
).
then
(
response
=>
{
api
.
create
().
getAllReportOI
(
payloadOI
).
then
(
response
=>
{
...
...
src/container/RollingOutlook/BalanceSheetRO.js
View file @
6150d3b8
...
@@ -57,7 +57,9 @@ export default class BalanceSheetRO extends Component {
...
@@ -57,7 +57,9 @@ export default class BalanceSheetRO extends Component {
messageAlert
:
''
,
messageAlert
:
''
,
visibleUpload
:
false
,
visibleUpload
:
false
,
visibleBSRO
:
true
,
visibleBSRO
:
true
,
kansas
:
0
kansas
:
0
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
}
}
}
...
@@ -186,7 +188,8 @@ export default class BalanceSheetRO extends Component {
...
@@ -186,7 +188,8 @@ export default class BalanceSheetRO extends Component {
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"revision"
:
Number
(
this
.
props
.
revision
),
"quartal"
:
this
.
props
.
quarter
,
"quartal"
:
this
.
props
.
quarter
,
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
}
}
api
.
create
().
getRollingOutlookBS
(
payload
).
then
(
response
=>
{
api
.
create
().
getRollingOutlookBS
(
payload
).
then
(
response
=>
{
// console.log(response);
// console.log(response);
...
@@ -364,6 +367,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -364,6 +367,7 @@ export default class BalanceSheetRO extends Component {
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"quartal"
:
this
.
props
.
quarter
,
"quartal"
:
this
.
props
.
quarter
,
"status"
:
type
,
"status"
:
type
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"balance_sheet"
:
data
"balance_sheet"
:
data
}
}
api
.
create
(
'UPLOAD'
).
createRollingOutlookBS
(
payload
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
createRollingOutlookBS
(
payload
).
then
(
response
=>
{
...
@@ -390,6 +394,9 @@ export default class BalanceSheetRO extends Component {
...
@@ -390,6 +394,9 @@ export default class BalanceSheetRO extends Component {
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
this
.
props
.
refresh
()
}
}
}
else
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
,
loading
:
false
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
document
.
body
.
style
.
overflow
=
'unset'
;
...
@@ -403,6 +410,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -403,6 +410,7 @@ export default class BalanceSheetRO extends Component {
this
.
props
.
refresh
()
this
.
props
.
refresh
()
})
})
}
}
}
// else {
// else {
// this.setState({ loading: false, handleDoubleClick: 0 }, () => {
// this.setState({ loading: false, handleDoubleClick: 0 }, () => {
// // this.props.saveToMonthlyReport()
// // this.props.saveToMonthlyReport()
...
@@ -508,7 +516,11 @@ export default class BalanceSheetRO extends Component {
...
@@ -508,7 +516,11 @@ export default class BalanceSheetRO extends Component {
}
}
checkUpload
()
{
checkUpload
()
{
api
.
create
().
checkImportRollingOutlookBS
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkImportRollingOutlookBS
(
payload
).
then
(
response
=>
{
this
.
props
.
refresh
()
this
.
props
.
refresh
()
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
...
@@ -590,6 +602,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -590,6 +602,7 @@ export default class BalanceSheetRO extends Component {
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"quartal"
:
this
.
props
.
quarter
,
"quartal"
:
this
.
props
.
quarter
,
"status"
:
type
,
"status"
:
type
,
"currency_id"
:
this
.
state
.
defaultCurrencyUpload
?.
id
,
"balance_sheet"
:
data
"balance_sheet"
:
data
}
}
api
.
create
(
'UPLOAD'
).
importRollingOutlookBS
(
payload
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
importRollingOutlookBS
(
payload
).
then
(
response
=>
{
...
@@ -616,6 +629,9 @@ export default class BalanceSheetRO extends Component {
...
@@ -616,6 +629,9 @@ export default class BalanceSheetRO extends Component {
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
this
.
props
.
refresh
()
}
}
}
else
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
,
loading
:
false
})
}
else
{
}
else
{
this
.
setState
({
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
this
.
setState
({
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
// this.props.saveToMonthlyReport()
// this.props.saveToMonthlyReport()
...
@@ -623,6 +639,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -623,6 +639,7 @@ export default class BalanceSheetRO extends Component {
this
.
props
.
refresh
()
this
.
props
.
refresh
()
})
})
}
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
false
,
handleDoubleClick
:
0
})
this
.
setState
({
loading
:
false
,
handleDoubleClick
:
0
})
}
}
...
@@ -2508,7 +2525,11 @@ export default class BalanceSheetRO extends Component {
...
@@ -2508,7 +2525,11 @@ export default class BalanceSheetRO extends Component {
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
{
this
.
props
.
defaultCurrency
.
id
===
1
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
USD
thousand
<
/Typography
>
}
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
this
.
props
.
isApprover
===
true
||
this
.
state
.
get_for
==
'view'
?
{
this
.
props
.
isApprover
===
true
||
this
.
state
.
get_for
==
'view'
?
...
@@ -2751,7 +2772,11 @@ export default class BalanceSheetRO extends Component {
...
@@ -2751,7 +2772,11 @@ export default class BalanceSheetRO extends Component {
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
{
this
.
props
.
defaultCurrency
.
id
===
1
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
USD
thousand
<
/Typography
>
}
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
/
>
<
div
style
=
{{
width
:
'50%'
}}
/
>
{
/* </div> */
}
{
/* </div> */
}
...
@@ -2889,6 +2914,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -2889,6 +2914,7 @@ export default class BalanceSheetRO extends Component {
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
percentage
=
{
this
.
state
.
percentage
}
...
@@ -2905,6 +2931,44 @@ export default class BalanceSheetRO extends Component {
...
@@ -2905,6 +2931,44 @@ export default class BalanceSheetRO extends Component {
}}
}}
/
>
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/div
>
<
/div
>
)}
{
this
.
state
.
visibleAlertSave
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content border-radius"
style
=
{{
background
:
'#FFF27D'
,
borderRadius
:
10
,
width
:
715
,
height
:
238
}}
>
<
div
style
=
{{
margin
:
30
}}
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
76
,
marginBottom
:
43
}}
>
<
div
style
=
{{
alignSelf
:
'center'
,
marginRight
:
25
}}
>
<
img
src
=
{
Images
.
warning
}
/
>
<
/div
>
<
div
style
=
{{
justifyContent
:
'center'
,
fontSize
:
20
,
color
:
'#1D2995'
,
marginTop
:
10
}}
>
<
b
>
Rate
Currency
USD
<
/b> pada periode yang dipilih <b>belum</
b
>
diatur
.
<
br
/>
Silahkan
menghubungi
Superadmin
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
background
:
'#F6F7F9'
,
cursor
:
'pointer'
,
border
:
'1px solid #3549609e'
,
outline
:
'none'
,
marginRight
:
20
,
borderRadius
:
9
}}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
,
handleDoubleClick
:
0
})}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
)}
<
/div
>
<
/div
>
...
...
src/container/RollingOutlook/CashFlowRO.js
View file @
6150d3b8
...
@@ -44,6 +44,9 @@ export default class CashFlow extends Component {
...
@@ -44,6 +44,9 @@ export default class CashFlow extends Component {
maxValue
:
"0"
,
maxValue
:
"0"
,
handleDoubleClick
:
0
,
handleDoubleClick
:
0
,
viewOnly
:
true
,
viewOnly
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
}
}
}
...
@@ -142,7 +145,8 @@ export default class CashFlow extends Component {
...
@@ -142,7 +145,8 @@ export default class CashFlow extends Component {
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"revision"
:
Number
(
this
.
props
.
revision
),
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
}
}
api
.
create
().
getRollingOutlookCF
(
payload
).
then
(
response
=>
{
api
.
create
().
getRollingOutlookCF
(
payload
).
then
(
response
=>
{
let
dataTable
=
[]
let
dataTable
=
[]
...
@@ -346,6 +350,7 @@ export default class CashFlow extends Component {
...
@@ -346,6 +350,7 @@ export default class CashFlow extends Component {
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"status"
:
"submitted"
,
"status"
:
"submitted"
,
"quartal"
:
this
.
props
.
quarter
,
"quartal"
:
this
.
props
.
quarter
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"cash_flow"
:
dbcf
"cash_flow"
:
dbcf
}
}
console
.
log
(
dbcf
)
console
.
log
(
dbcf
)
...
@@ -358,6 +363,9 @@ export default class CashFlow extends Component {
...
@@ -358,6 +363,9 @@ export default class CashFlow extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
this
.
props
.
refresh
()
}
else
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
,
loading
:
false
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
document
.
body
.
style
.
overflow
=
'unset'
;
...
@@ -371,6 +379,7 @@ export default class CashFlow extends Component {
...
@@ -371,6 +379,7 @@ export default class CashFlow extends Component {
this
.
props
.
refresh
()
this
.
props
.
refresh
()
})
})
}
}
}
// else {
// else {
// this.setState({ loading: false, handleDoubleClick: 0 }, () => {
// this.setState({ loading: false, handleDoubleClick: 0 }, () => {
// this.props.onClickClose()
// this.props.onClickClose()
...
@@ -2146,7 +2155,11 @@ export default class CashFlow extends Component {
...
@@ -2146,7 +2155,11 @@ export default class CashFlow extends Component {
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
{
this
.
props
.
defaultCurrency
.
id
===
1
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
USD
thousand
<
/Typography
>
}
<
/div
>
<
/div
>
{
/* <div style={{ width: '50%' }}>
{
/* <div style={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
...
@@ -2230,6 +2243,42 @@ export default class CashFlow extends Component {
...
@@ -2230,6 +2243,42 @@ export default class CashFlow extends Component {
<
/button
>
<
/button
>
<
/div
>
<
/div
>
}
}
{
this
.
state
.
visibleAlertSave
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content border-radius"
style
=
{{
background
:
'#FFF27D'
,
borderRadius
:
10
,
width
:
715
,
height
:
238
}}
>
<
div
style
=
{{
margin
:
30
}}
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
76
,
marginBottom
:
43
}}
>
<
div
style
=
{{
alignSelf
:
'center'
,
marginRight
:
25
}}
>
<
img
src
=
{
Images
.
warning
}
/
>
<
/div
>
<
div
style
=
{{
justifyContent
:
'center'
,
fontSize
:
20
,
color
:
'#1D2995'
,
marginTop
:
10
}}
>
<
b
>
Rate
Currency
USD
<
/b> pada periode yang dipilih <b>belum</
b
>
diatur
.
<
br
/>
Silahkan
menghubungi
Superadmin
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
background
:
'#F6F7F9'
,
cursor
:
'pointer'
,
border
:
'1px solid #3549609e'
,
outline
:
'none'
,
marginRight
:
20
,
borderRadius
:
9
}}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
,
handleDoubleClick
:
0
})}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/Paper
>
<
/Paper
>
...
...
src/container/RollingOutlook/CorporateAnnualTargetRO.js
View file @
6150d3b8
...
@@ -72,7 +72,8 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -72,7 +72,8 @@ export default class CorporateAnnualTargetRO extends Component {
editable
:
false
,
editable
:
false
,
get_for
:
'view'
,
get_for
:
'view'
,
viewOnly
:
true
,
viewOnly
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
...
@@ -127,6 +128,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -127,6 +128,7 @@ export default class CorporateAnnualTargetRO extends Component {
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"revision"
:
Number
(
this
.
props
.
revision
),
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
}
}
console
.
log
(
payload
);
console
.
log
(
payload
);
...
@@ -426,6 +428,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -426,6 +428,7 @@ export default class CorporateAnnualTargetRO extends Component {
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"quartal"
:
this
.
props
.
quarter
,
"quartal"
:
this
.
props
.
quarter
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"status"
:
type
,
"status"
:
type
,
"cat"
:
data
"cat"
:
data
}
}
...
@@ -438,6 +441,9 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -438,6 +441,9 @@ export default class CorporateAnnualTargetRO extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
this
.
props
.
refresh
()
}
else
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
document
.
body
.
style
.
overflow
=
'unset'
;
...
@@ -447,10 +453,11 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -447,10 +453,11 @@ export default class CorporateAnnualTargetRO extends Component {
window
.
location
.
reload
();
window
.
location
.
reload
();
},
1000
);
},
1000
);
}
}
this
.
props
.
onClickClose
()
//
this.props.onClickClose()
this
.
props
.
refresh
()
this
.
props
.
refresh
()
})
})
}
}
}
// else {
// else {
// this.setState({ loading: false, handleDoubleClick: 0 }, () => {
// this.setState({ loading: false, handleDoubleClick: 0 }, () => {
// this.props.onClickClose()
// this.props.onClickClose()
...
@@ -519,7 +526,11 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -519,7 +526,11 @@ export default class CorporateAnnualTargetRO extends Component {
checkUpload
()
{
checkUpload
()
{
this
.
setState
({
loading
:
true
,
dataTable
:
[]
})
this
.
setState
({
loading
:
true
,
dataTable
:
[]
})
api
.
create
().
checkImportRollingOutlookCAT
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkImportRollingOutlookCAT
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -638,6 +649,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -638,6 +649,7 @@ export default class CorporateAnnualTargetRO extends Component {
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"quartal"
:
this
.
props
.
quarter
,
"quartal"
:
this
.
props
.
quarter
,
"currency_id"
:
this
.
state
.
defaultCurrencyUpload
?.
id
,
"status"
:
type
,
"status"
:
type
,
"cat"
:
data
"cat"
:
data
}
}
...
@@ -651,6 +663,9 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -651,6 +663,9 @@ export default class CorporateAnnualTargetRO extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
this
.
props
.
refresh
()
}
else
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
...
@@ -661,6 +676,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -661,6 +676,7 @@ export default class CorporateAnnualTargetRO extends Component {
}
}
})
})
}
}
}
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
,
handleDoubleClick
:
0
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
,
handleDoubleClick
:
0
})
}
}
...
@@ -784,7 +800,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -784,7 +800,7 @@ export default class CorporateAnnualTargetRO extends Component {
if
(
forecast
==
undefined
)
{
if
(
forecast
==
undefined
)
{
let
convertID
=
-
1
let
convertID
=
-
1
if
(
tableMeta
.
rowData
[
10
].
value
==
'FORMULA'
)
{
if
(
tableMeta
.
rowData
[
10
]
?
.
value
==
'FORMULA'
)
{
// let indexIDReport = dataTable2.findIndex((val) => val[1] == formulaAwal)
// let indexIDReport = dataTable2.findIndex((val) => val[1] == formulaAwal)
// convertID = dataTable2[indexIDReport][31]
// convertID = dataTable2[indexIDReport][31]
// let indexID = dataTable2.findIndex((val) => val[31] == (convertID == -1 ? item : convertID))
// let indexID = dataTable2.findIndex((val) => val[31] == (convertID == -1 ? item : convertID))
...
@@ -2571,7 +2587,11 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -2571,7 +2587,11 @@ export default class CorporateAnnualTargetRO extends Component {
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
{
this
.
props
.
defaultCurrency
.
id
===
1
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
USD
thousand
<
/Typography
>
}
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
this
.
props
.
isApprover
===
true
||
this
.
state
.
get_for
==
'view'
?
{
this
.
props
.
isApprover
===
true
||
this
.
state
.
get_for
==
'view'
?
...
@@ -2806,7 +2826,11 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -2806,7 +2826,11 @@ export default class CorporateAnnualTargetRO extends Component {
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
{
this
.
props
.
defaultCurrency
.
id
===
1
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
USD
thousand
<
/Typography
>
}
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
/
>
<
div
style
=
{{
width
:
'50%'
}}
/
>
<
/div
>
<
/div
>
...
@@ -2957,6 +2981,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -2957,6 +2981,7 @@ export default class CorporateAnnualTargetRO extends Component {
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
percentage
=
{
this
.
state
.
percentage
}
...
@@ -2973,6 +2998,44 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -2973,6 +2998,44 @@ export default class CorporateAnnualTargetRO extends Component {
}}
}}
/
>
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/div
>
<
/div
>
)}
{
this
.
state
.
visibleAlertSave
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content border-radius"
style
=
{{
background
:
'#FFF27D'
,
borderRadius
:
10
,
width
:
715
,
height
:
238
}}
>
<
div
style
=
{{
margin
:
30
}}
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
76
,
marginBottom
:
43
}}
>
<
div
style
=
{{
alignSelf
:
'center'
,
marginRight
:
25
}}
>
<
img
src
=
{
Images
.
warning
}
/
>
<
/div
>
<
div
style
=
{{
justifyContent
:
'center'
,
fontSize
:
20
,
color
:
'#1D2995'
,
marginTop
:
10
}}
>
<
b
>
Rate
Currency
USD
<
/b> pada periode yang dipilih <b>belum</
b
>
diatur
.
<
br
/>
Silahkan
menghubungi
Superadmin
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
background
:
'#F6F7F9'
,
cursor
:
'pointer'
,
border
:
'1px solid #3549609e'
,
outline
:
'none'
,
marginRight
:
20
,
borderRadius
:
9
}}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
,
handleDoubleClick
:
0
})}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
)}
<
/div
>
<
/div
>
...
...
src/container/RollingOutlook/OperatingIndicatorRO.js
View file @
6150d3b8
...
@@ -288,7 +288,9 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -288,7 +288,9 @@ export default class OperatingIndicatorRO extends Component {
// // console.log('=========================')
// // console.log('=========================')
// console.log(JSON.stringify(payload))
// console.log(JSON.stringify(payload))
this
.
props
.
saveRollingOI
(
payload
)
this
.
props
.
saveRollingOI
(
payload
)
this
.
props
.
onClickClose
()
this
.
setState
({
loading
:
false
})
// this.props.onClickClose()
}
}
handleValue
(
data
)
{
handleValue
(
data
)
{
...
@@ -498,7 +500,19 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -498,7 +500,19 @@ export default class OperatingIndicatorRO extends Component {
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
this
.
props
.
getReport
()
}
else
{
}
else
{
alert
(
response
.
data
.
status
)
if
(
response
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
,
loading
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
// alert(response.data.status)
}
}
}
else
{
}
else
{
alert
(
response
.
problem
)
alert
(
response
.
problem
)
...
@@ -2030,7 +2044,11 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -2030,7 +2044,11 @@ export default class OperatingIndicatorRO extends Component {
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
data
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
data
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
data
.
periode
}
{
String
(
this
.
props
.
quartal
).
toLocaleUpperCase
()}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
data
.
periode
}
{
String
(
this
.
props
.
quartal
).
toLocaleUpperCase
()}
<
/Typography
>
{
this
.
props
.
defaultCurrency
.
id
===
1
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
USD
thousand
<
/Typography
>
}
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
...
@@ -2226,7 +2244,11 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -2226,7 +2244,11 @@ export default class OperatingIndicatorRO extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
data
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
data
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
data
.
periode
}
{
String
(
this
.
props
.
quartal
).
toLocaleUpperCase
()}
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
data
.
periode
}
{
String
(
this
.
props
.
quartal
).
toLocaleUpperCase
()}
<
/Typography
>
<
/Typography
>
{
this
.
props
.
defaultCurrency
.
id
===
1
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
USD
thousand
<
/Typography
>
}
<
/div
>
<
/div
>
{
this
.
state
.
dataLoaded
&&
(
{
this
.
state
.
dataLoaded
&&
(
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
...
@@ -2399,7 +2421,7 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -2399,7 +2421,7 @@ export default class OperatingIndicatorRO extends Component {
marginRight
:
20
,
marginRight
:
20
,
borderRadius
:
9
borderRadius
:
9
}}
}}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
})}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
,
loading
:
false
})}
>
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
...
...
src/container/RollingOutlook/RollingOutlook.js
View file @
6150d3b8
...
@@ -1591,7 +1591,7 @@ export default class RollingOutlook extends Component {
...
@@ -1591,7 +1591,7 @@ export default class RollingOutlook extends Component {
}
}
async
handleGenerateReport
(
data
)
{
async
handleGenerateReport
(
data
)
{
let
{
selectReport
,
rollingOutlookID
,
company
,
periode
,
month
,
downloadedFileReportId
,
quarter
}
=
this
.
state
let
{
selectReport
,
rollingOutlookID
,
company
,
periode
,
month
,
downloadedFileReportId
,
quarter
,
defaultCurrency
}
=
this
.
state
if
(
selectReport
.
length
>
0
)
{
if
(
selectReport
.
length
>
0
)
{
let
result
=
[]
let
result
=
[]
console
.
log
(
'mulai hit'
)
console
.
log
(
'mulai hit'
)
...
@@ -1599,16 +1599,22 @@ export default class RollingOutlook extends Component {
...
@@ -1599,16 +1599,22 @@ export default class RollingOutlook extends Component {
let
urlReport
=
items
===
14
?
"profit_loss"
:
items
===
15
?
"tax_planning"
:
items
===
16
?
"balance_sheet"
:
items
===
17
?
"cash_flow"
:
items
===
37
?
"cat"
:
null
let
urlReport
=
items
===
14
?
"profit_loss"
:
items
===
15
?
"tax_planning"
:
items
===
16
?
"balance_sheet"
:
items
===
17
?
"cash_flow"
:
items
===
37
?
"cat"
:
null
let
datas
=
data
.
findIndex
((
val
)
=>
val
[
4
]
==
items
)
let
datas
=
data
.
findIndex
((
val
)
=>
val
[
4
]
==
items
)
let
report
=
data
[
datas
]
let
report
=
data
[
datas
]
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/rolling_outlook/export_rolling_outlook?rolling_outlook_id=
${
rollingOutlookID
}
&report_id=
${
report
[
4
]}
&company_id=
${
company
.
company_id
}
&year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&quartal=
${
quarter
.
value
}
&download_file_report_id=
${
downloadedFileReportId
}
`
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/rolling_outlook/export_rolling_outlook?rolling_outlook_id=
${
rollingOutlookID
}
&report_id=
${
report
[
4
]}
&company_id=
${
company
.
company_id
}
&year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&quartal=
${
quarter
.
value
}
&download_file_report_id=
${
downloadedFileReportId
}
¤cy_id=
${
defaultCurrency
.
id
}
`
console
.
log
(
url
);
console
.
log
(
url
);
try
{
let
res
=
await
fetch
(
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/rolling_outlook/export_rolling_outlook?rolling_outlook_id=
${
rollingOutlookID
===
null
?
""
:
rollingOutlookID
}
&report_id=
${
report
[
4
]}
&company_id=
${
company
.
company_id
}
&year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&quartal=
${
quarter
.
value
}
&download_file_report_id=
${
downloadedFileReportI
d
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/rolling_outlook/export_rolling_outlook?rolling_outlook_id=
${
rollingOutlookID
===
null
?
""
:
rollingOutlookID
}
&report_id=
${
report
[
4
]}
&company_id=
${
company
.
company_id
}
&year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&quartal=
${
quarter
.
value
}
&download_file_report_id=
${
downloadedFileReportId
}
¤cy_id=
${
defaultCurrency
.
i
d
}
`
)
)
if
(
res
.
status
===
200
)
{
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
result
=
[...
result
,
res
];
console
.
log
(
result
);
console
.
log
(
result
);
}
}
}
catch
(
error
)
{
alert
(
error
)
}
}
}
console
.
log
(
'ini result'
,
result
);
console
.
log
(
'ini result'
,
result
);
...
...
src/container/RollingOutlook/TaxPlanningRO.js
View file @
6150d3b8
...
@@ -57,6 +57,8 @@ export default class TaxPlanning extends Component {
...
@@ -57,6 +57,8 @@ export default class TaxPlanning extends Component {
alert
:
false
,
alert
:
false
,
get_for
:
"view"
,
get_for
:
"view"
,
viewOnly
:
true
,
viewOnly
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -170,7 +172,8 @@ export default class TaxPlanning extends Component {
...
@@ -170,7 +172,8 @@ export default class TaxPlanning extends Component {
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"revision"
:
Number
(
this
.
props
.
revision
),
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
,
"rolling_outlook_id"
:
this
.
props
.
rollingOutlookID
,
"quartal"
:
this
.
props
.
quarter
"quartal"
:
this
.
props
.
quarter
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
}
}
api
.
create
().
getRollingOutlookTP
(
payload
).
then
(
response
=>
{
api
.
create
().
getRollingOutlookTP
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
payload
);
...
@@ -406,6 +409,7 @@ export default class TaxPlanning extends Component {
...
@@ -406,6 +409,7 @@ export default class TaxPlanning extends Component {
"status"
:
type
,
"status"
:
type
,
"revision"
:
0
,
"revision"
:
0
,
"quartal"
:
this
.
props
.
quarter
,
"quartal"
:
this
.
props
.
quarter
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"tax_planning"
:
data
"tax_planning"
:
data
}
}
// this.props.saveToMasterBudget(payload)
// this.props.saveToMasterBudget(payload)
...
@@ -418,6 +422,9 @@ export default class TaxPlanning extends Component {
...
@@ -418,6 +422,9 @@ export default class TaxPlanning extends Component {
// this.props.saveToMonthlyReport()
// this.props.saveToMonthlyReport()
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
this
.
props
.
refresh
()
}
else
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
,
loading
:
false
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
document
.
body
.
style
.
overflow
=
'unset'
;
...
@@ -432,6 +439,7 @@ export default class TaxPlanning extends Component {
...
@@ -432,6 +439,7 @@ export default class TaxPlanning extends Component {
this
.
props
.
refresh
()
this
.
props
.
refresh
()
})
})
}
}
}
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
}
...
@@ -557,7 +565,11 @@ export default class TaxPlanning extends Component {
...
@@ -557,7 +565,11 @@ export default class TaxPlanning extends Component {
}
}
checkUpload
()
{
checkUpload
()
{
api
.
create
().
checkImportRollingOutlookTP
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkImportRollingOutlookTP
(
payload
).
then
(
response
=>
{
console
.
log
(
this
.
state
.
payload
);
console
.
log
(
this
.
state
.
payload
);
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -630,64 +642,64 @@ export default class TaxPlanning extends Component {
...
@@ -630,64 +642,64 @@ export default class TaxPlanning extends Component {
data
.
push
({
data
.
push
({
item_report_id
:
i
[
4
],
item_report_id
:
i
[
4
],
january
:
{
january
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
9
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
9
].
tbc
.
value
)
:
String
(
i
[
9
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
9
].
tbc
===
""
||
i
[
9
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
9
].
tbc
.
value
)
:
String
(
i
[
9
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
9
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
9
].
fcp
.
value
)
:
String
(
i
[
9
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
9
].
fcp
===
""
||
i
[
9
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
9
].
fcp
.
value
)
:
String
(
i
[
9
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
9
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
9
].
tbf
.
value
)
:
String
(
i
[
9
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
9
].
tbf
===
""
||
i
[
9
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
9
].
tbf
.
value
)
:
String
(
i
[
9
].
tbf
)
},
},
february
:
{
february
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
10
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
10
].
tbc
.
value
)
:
String
(
i
[
10
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
10
].
tbc
===
""
||
i
[
10
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
10
].
tbc
.
value
)
:
String
(
i
[
10
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
10
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
10
].
fcp
.
value
)
:
String
(
i
[
10
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
10
].
fcp
===
""
||
i
[
10
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
10
].
fcp
.
value
)
:
String
(
i
[
10
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
10
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
10
].
tbf
.
value
)
:
String
(
i
[
10
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
10
].
tbf
===
""
||
i
[
10
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
10
].
tbf
.
value
)
:
String
(
i
[
10
].
tbf
)
},
},
march
:
{
march
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
11
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
11
].
tbc
.
value
)
:
String
(
i
[
11
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
11
].
tbc
===
""
||
i
[
11
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
11
].
tbc
.
value
)
:
String
(
i
[
11
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
11
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
11
].
fcp
.
value
)
:
String
(
i
[
11
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
11
].
fcp
===
""
||
i
[
11
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
11
].
fcp
.
value
)
:
String
(
i
[
11
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
11
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
11
].
tbf
.
value
)
:
String
(
i
[
11
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
11
].
tbf
===
""
||
i
[
11
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
11
].
tbf
.
value
)
:
String
(
i
[
11
].
tbf
)
},
},
april
:
{
april
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
12
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
12
].
tbc
.
value
)
:
String
(
i
[
12
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
12
].
tbc
===
""
||
i
[
12
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
12
].
tbc
.
value
)
:
String
(
i
[
12
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
12
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
12
].
fcp
.
value
)
:
String
(
i
[
12
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
12
].
fcp
===
""
||
i
[
12
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
12
].
fcp
.
value
)
:
String
(
i
[
12
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
12
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
12
].
tbf
.
value
)
:
String
(
i
[
12
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
12
].
tbf
===
""
||
i
[
12
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
12
].
tbf
.
value
)
:
String
(
i
[
12
].
tbf
)
},
},
may
:
{
may
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
13
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
13
].
tbc
.
value
)
:
String
(
i
[
13
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
13
].
tbc
===
""
||
i
[
13
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
13
].
tbc
.
value
)
:
String
(
i
[
13
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
13
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
13
].
fcp
.
value
)
:
String
(
i
[
13
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
13
].
fcp
===
""
||
i
[
13
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
13
].
fcp
.
value
)
:
String
(
i
[
13
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
13
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
13
].
tbf
.
value
)
:
String
(
i
[
13
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
13
].
tbf
===
""
||
i
[
13
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
13
].
tbf
.
value
)
:
String
(
i
[
13
].
tbf
)
},
},
june
:
{
june
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
14
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
14
].
tbc
.
value
)
:
String
(
i
[
14
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
14
].
tbc
===
""
||
i
[
14
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
14
].
tbc
.
value
)
:
String
(
i
[
14
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
14
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
14
].
fcp
.
value
)
:
String
(
i
[
14
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
14
].
fcp
===
""
||
i
[
14
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
14
].
fcp
.
value
)
:
String
(
i
[
14
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
14
].
tbc
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
14
].
tbf
.
value
)
:
String
(
i
[
14
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
14
].
tbc
===
""
||
i
[
14
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
14
].
tbf
.
value
)
:
String
(
i
[
14
].
tbf
)
},
},
july
:
{
july
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
15
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
15
].
tbc
.
value
)
:
String
(
i
[
15
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
15
].
tbc
===
""
||
i
[
15
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
15
].
tbc
.
value
)
:
String
(
i
[
15
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
15
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
15
].
fcp
.
value
)
:
String
(
i
[
15
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
15
].
fcp
===
""
||
i
[
15
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
15
].
fcp
.
value
)
:
String
(
i
[
15
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
15
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
15
].
tbf
.
value
)
:
String
(
i
[
15
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
15
].
tbf
===
""
||
i
[
15
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
15
].
tbf
.
value
)
:
String
(
i
[
15
].
tbf
)
},
},
august
:
{
august
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
16
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
16
].
tbc
.
value
)
:
String
(
i
[
16
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
16
].
tbc
===
""
||
i
[
16
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
16
].
tbc
.
value
)
:
String
(
i
[
16
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
16
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
16
].
fcp
.
value
)
:
String
(
i
[
16
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
16
].
fcp
===
""
||
i
[
16
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
16
].
fcp
.
value
)
:
String
(
i
[
16
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
16
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
16
].
tbf
.
value
)
:
String
(
i
[
16
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
16
].
tbf
===
""
||
i
[
16
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
16
].
tbf
.
value
)
:
String
(
i
[
16
].
tbf
)
},
},
september
:
{
september
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
17
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
17
].
tbc
.
value
)
:
String
(
i
[
17
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
17
].
tbc
===
""
||
i
[
17
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
17
].
tbc
.
value
)
:
String
(
i
[
17
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
17
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
17
].
fcp
.
value
)
:
String
(
i
[
17
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
17
].
fcp
===
""
||
i
[
17
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
17
].
fcp
.
value
)
:
String
(
i
[
17
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
17
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
17
].
tbf
.
value
)
:
String
(
i
[
17
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
17
].
tbf
===
""
||
i
[
17
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
17
].
tbf
.
value
)
:
String
(
i
[
17
].
tbf
)
},
},
october
:
{
october
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
18
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
18
].
tbc
.
value
)
:
String
(
i
[
18
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
18
].
tbc
===
""
||
i
[
18
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
18
].
tbc
.
value
)
:
String
(
i
[
18
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
18
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
18
].
fcp
.
value
)
:
String
(
i
[
18
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
18
].
fcp
===
""
||
i
[
18
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
18
].
fcp
.
value
)
:
String
(
i
[
18
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
18
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
18
].
tbf
.
value
)
:
String
(
i
[
18
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
18
].
tbf
===
""
||
i
[
18
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
18
].
tbf
.
value
)
:
String
(
i
[
18
].
tbf
)
},
},
november
:
{
november
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
19
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
19
].
tbc
.
value
)
:
String
(
i
[
19
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
19
].
tbc
===
""
||
i
[
19
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
19
].
tbc
.
value
)
:
String
(
i
[
19
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
19
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
19
].
fcp
.
value
)
:
String
(
i
[
19
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
19
].
fcp
===
""
||
i
[
19
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
19
].
fcp
.
value
)
:
String
(
i
[
19
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
19
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
19
].
tbf
.
value
)
:
String
(
i
[
19
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
19
].
tbf
===
""
||
i
[
19
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
19
].
tbf
.
value
)
:
String
(
i
[
19
].
tbf
)
},
},
december
:
{
december
:
{
tbc
:
i
[
1
]
===
3
&&
i
[
20
].
tbc
===
""
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
20
].
tbc
.
value
)
:
String
(
i
[
20
].
tbc
),
tbc
:
i
[
1
]
===
3
&&
i
[
20
].
tbc
===
""
||
i
[
20
].
tbc
===
null
?
"0"
:
i
[
1
]
===
5
||
i
[
1
]
===
6
||
i
[
1
]
===
7
?
String
(
i
[
20
].
tbc
.
value
)
:
String
(
i
[
20
].
tbc
),
fcp
:
i
[
2
]
===
3
&&
i
[
20
].
fcp
===
""
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
20
].
fcp
.
value
)
:
String
(
i
[
20
].
fcp
),
fcp
:
i
[
2
]
===
3
&&
i
[
20
].
fcp
===
""
||
i
[
20
].
fcp
===
null
?
"0"
:
i
[
2
]
===
5
||
i
[
2
]
===
6
||
i
[
2
]
===
7
?
String
(
i
[
20
].
fcp
.
value
)
:
String
(
i
[
20
].
fcp
),
tbf
:
i
[
3
]
===
3
&&
i
[
20
].
tbf
===
""
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
20
].
tbf
.
value
)
:
String
(
i
[
20
].
tbf
)
tbf
:
i
[
3
]
===
3
&&
i
[
20
].
tbf
===
""
||
i
[
20
].
tbf
===
null
?
"0"
:
i
[
3
]
===
5
||
i
[
3
]
===
6
||
i
[
3
]
===
7
?
String
(
i
[
20
].
tbf
.
value
)
:
String
(
i
[
20
].
tbf
)
},
},
total_current_year
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)),
// total_next_year: {
// total_next_year: {
...
@@ -709,6 +721,7 @@ export default class TaxPlanning extends Component {
...
@@ -709,6 +721,7 @@ export default class TaxPlanning extends Component {
report_id
:
this
.
props
.
report_id
,
report_id
:
this
.
props
.
report_id
,
quartal
:
this
.
props
.
quarter
,
quartal
:
this
.
props
.
quarter
,
status
:
type
,
status
:
type
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
,
tax_planning
:
data
,
tax_planning
:
data
,
}
}
console
.
log
(
data
);
console
.
log
(
data
);
...
@@ -719,6 +732,9 @@ export default class TaxPlanning extends Component {
...
@@ -719,6 +732,9 @@ export default class TaxPlanning extends Component {
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
// this.props.getReport()
// this.props.getReport()
this
.
props
.
refresh
()
this
.
props
.
refresh
()
}
else
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
,
loading
:
false
})
}
else
{
}
else
{
this
.
setState
({
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
...
@@ -730,6 +746,7 @@ export default class TaxPlanning extends Component {
...
@@ -730,6 +746,7 @@ export default class TaxPlanning extends Component {
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
this
.
props
.
refresh
()
})
})
}
// alert(response.data.status)
// alert(response.data.status)
}
}
}
else
{
}
else
{
...
@@ -5780,17 +5797,25 @@ export default class TaxPlanning extends Component {
...
@@ -5780,17 +5797,25 @@ export default class TaxPlanning extends Component {
name
:
`
${
this
.
props
.
periode
}
`
,
name
:
`
${
this
.
props
.
periode
}
`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
div
style
=
{{
...
style2
,
top
:
0
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
200
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
// <div style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 200, borderRight: "1px solid rgb(255, 255, 255)" }} >
{
/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
// {/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
// <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */
}
// </TableCell> */}
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
paddingTop
:
8
}}
>
{
columnMeta
.
name
}
<
/div
>
// <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, paddingTop: 8 }}>{columnMeta.name}</div>
<
div
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
,
paddingBottom
:
20
}}
>
// <div style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky", paddingBottom: 20 }}>
<
div
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
// <div style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
// <span>{"Trial Balance (Fiscal)"}</span>
// </div>
// </div>
// </div>
<
th
style
=
{{
...
style2
,
top
:
0
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
""
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
""
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Trial Balance (Fiscal)"
}
<
/span
>
<
span
>
{
"Trial Balance (Fiscal)"
}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/th
>
),
),
setCellProps
:
()
=>
({
style2
}),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
...
@@ -5999,7 +6024,11 @@ export default class TaxPlanning extends Component {
...
@@ -5999,7 +6024,11 @@ export default class TaxPlanning extends Component {
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
{
this
.
props
.
defaultCurrency
.
id
===
1
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
USD
thousand
<
/Typography
>
}
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
this
.
props
.
isApprover
===
true
||
this
.
state
.
get_for
==
'view'
?
{
this
.
props
.
isApprover
===
true
||
this
.
state
.
get_for
==
'view'
?
...
@@ -6233,7 +6262,11 @@ export default class TaxPlanning extends Component {
...
@@ -6233,7 +6262,11 @@ export default class TaxPlanning extends Component {
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
{
this
.
props
.
defaultCurrency
.
id
===
1
?
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
USD
thousand
<
/Typography
>
}
<
/div
>
<
/div
>
{
this
.
state
.
dataLoaded
&&
(
{
this
.
state
.
dataLoaded
&&
(
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
...
@@ -6363,6 +6396,7 @@ export default class TaxPlanning extends Component {
...
@@ -6363,6 +6396,7 @@ export default class TaxPlanning extends Component {
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
percentage
=
{
this
.
state
.
percentage
}
...
@@ -6380,6 +6414,44 @@ export default class TaxPlanning extends Component {
...
@@ -6380,6 +6414,44 @@ export default class TaxPlanning extends Component {
}}
}}
/
>
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/div
>
<
/div
>
)}
{
this
.
state
.
visibleAlertSave
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content border-radius"
style
=
{{
background
:
'#FFF27D'
,
borderRadius
:
10
,
width
:
715
,
height
:
238
}}
>
<
div
style
=
{{
margin
:
30
}}
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
76
,
marginBottom
:
43
}}
>
<
div
style
=
{{
alignSelf
:
'center'
,
marginRight
:
25
}}
>
<
img
src
=
{
Images
.
warning
}
/
>
<
/div
>
<
div
style
=
{{
justifyContent
:
'center'
,
fontSize
:
20
,
color
:
'#1D2995'
,
marginTop
:
10
}}
>
<
b
>
Rate
Currency
USD
<
/b> pada periode yang dipilih <b>belum</
b
>
diatur
.
<
br
/>
Silahkan
menghubungi
Superadmin
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
background
:
'#F6F7F9'
,
cursor
:
'pointer'
,
border
:
'1px solid #3549609e'
,
outline
:
'none'
,
marginRight
:
20
,
borderRadius
:
9
}}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
,
handleDoubleClick
:
0
})}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
)}
<
/div
>
<
/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