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
e463e59e
Commit
e463e59e
authored
Dec 01, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-riri' into 'ENV-DEV'
repot subco usd before 2024 See merge request
!2210
parents
3ec1c8c1
75faac88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
MonthlyReport.js
src/container/MonthlyReport/MonthlyReport.js
+12
-7
SubHolding.js
src/container/Reports/SubHolding.js
+3
-2
No files found.
src/container/MonthlyReport/MonthlyReport.js
View file @
e463e59e
...
@@ -2312,7 +2312,7 @@ export default class MonthlyReport extends Component {
...
@@ -2312,7 +2312,7 @@ export default class MonthlyReport extends Component {
"month"
:
month
?
String
(
month
.
month_id
).
toString
()
:
""
,
"month"
:
month
?
String
(
month
.
month_id
).
toString
()
:
""
,
"quartal"
:
""
,
"quartal"
:
""
,
"type_report_name"
:
"Monthly Report"
,
"type_report_name"
:
"Monthly Report"
,
"currency_id"
:
defaultCurrency
.
id
"currency_id"
:
defaultCurrency
.
id
}
}
console
.
log
(
payload
);
console
.
log
(
payload
);
api
.
create
().
createDownloadFile
(
payload
).
then
((
response
)
=>
{
api
.
create
().
createDownloadFile
(
payload
).
then
((
response
)
=>
{
...
@@ -2359,13 +2359,18 @@ export default class MonthlyReport extends Component {
...
@@ -2359,13 +2359,18 @@ export default class MonthlyReport extends Component {
let
urlReport
=
items
===
8
?
"profit_loss"
:
items
===
12
?
"tax_planning"
:
items
===
7
?
"balance_sheet"
:
items
===
9
?
"fam"
:
items
===
13
?
"cash_flow"
:
items
===
11
?
"locf"
:
items
===
10
?
"cat"
:
null
let
urlReport
=
items
===
8
?
"profit_loss"
:
items
===
12
?
"tax_planning"
:
items
===
7
?
"balance_sheet"
:
items
===
9
?
"fam"
:
items
===
13
?
"cash_flow"
:
items
===
11
?
"locf"
:
items
===
10
?
"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
}
/monthly_report/export_monthly_report?monthly_report_id=
${
monthlyReportId
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&months=
${
month
.
month_id
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
try
{
let
res
=
await
fetch
(
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/monthly_report/export_monthly_report?monthly_report_id=
${
monthlyReportId
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&months=
${
month
.
month_id
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/monthly_report/export_monthly_report?monthly_report_id=
${
monthlyReportId
===
null
?
""
:
monthlyReportId
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&months=
${
month
.
month_id
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
)
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/monthly_report/export_monthly_report?monthly_report_id=
${
monthlyReportId
===
null
?
""
:
monthlyReportId
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&months=
${
month
.
month_id
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
if
(
res
.
status
===
200
)
{
)
result
=
[...
result
,
res
];
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
}
catch
(
error
)
{
alert
(
error
)
}
}
}
}
console
.
log
(
'ini result'
,
result
);
console
.
log
(
'ini result'
,
result
);
...
...
src/container/Reports/SubHolding.js
View file @
e463e59e
...
@@ -246,6 +246,7 @@ export default class SubHolding extends Component {
...
@@ -246,6 +246,7 @@ export default class SubHolding extends Component {
this
.
setState
({
this
.
setState
({
defaultCurrencyID
:
response
.
data
.
data
.
default_currency
,
defaultCurrencyID
:
response
.
data
.
data
.
default_currency
,
currency
:
datas
,
currency
:
datas
,
usdBefore2024
:
response
.
data
.
data
.
usdBefore2024
,
// report: response.data.data.default_currency == 2 && this.state.defaultCurrency == 1 ? this.state.reportType2[0] : this.state.reportType[0],
// report: response.data.data.default_currency == 2 && this.state.defaultCurrency == 1 ? this.state.reportType2[0] : this.state.reportType[0],
defaultCurrency
:
index
==
-
1
?
null
:
datas
[
index
]
defaultCurrency
:
index
==
-
1
?
null
:
datas
[
index
]
})
})
...
@@ -4262,7 +4263,7 @@ export default class SubHolding extends Component {
...
@@ -4262,7 +4263,7 @@ export default class SubHolding extends Component {
}
}
render
()
{
render
()
{
let
{
defaultCurrencyID
,
report
}
=
this
.
state
let
{
defaultCurrencyID
,
report
,
usdBefore2024
}
=
this
.
state
const
loadingComponent
=
(
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'fixed'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
div
style
=
{{
position
:
'fixed'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
PropagateLoader
<
PropagateLoader
...
@@ -4382,7 +4383,7 @@ export default class SubHolding extends Component {
...
@@ -4382,7 +4383,7 @@ export default class SubHolding extends Component {
// })
// })
// console.log("report 2");
// console.log("report 2");
// }
// }
let
bizpar
=
defaultCurrencyID
==
2
&&
newInputValue
.
id
==
1
?
defaultReport
.
filter
(
e
=>
e
.
report
===
2
)
:
defaultReport
let
bizpar
=
this
.
state
.
usdBefore2024
==
false
&&
defaultCurrencyID
==
2
&&
newInputValue
.
id
==
1
?
defaultReport
.
filter
(
e
=>
e
.
report
===
2
)
:
defaultReport
this
.
setState
({
report
:
bizpar
[
0
],
reportType
:
bizpar
})
this
.
setState
({
report
:
bizpar
[
0
],
reportType
:
bizpar
})
this
.
getReportType
()
this
.
getReportType
()
...
...
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