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
7236b2ae
Commit
7236b2ae
authored
Nov 26, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
onupload
parent
dfe775f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
53 deletions
+57
-53
index.js
src/api/index.js
+2
-0
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+52
-50
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+1
-1
ProfitLossOLPA.js
src/container/OutlookPA/ProfitLossOLPA.js
+1
-1
TaxPlanningOLPA.js
src/container/OutlookPA/TaxPlanningOLPA.js
+1
-1
No files found.
src/api/index.js
View file @
7236b2ae
...
...
@@ -276,6 +276,7 @@ const create = (type = "") => {
// MonthlyPL
const
getHierarkiMontlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/get_report_hierarki'
,
body
)
const
createMonthlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/create_monthly_report'
,
body
)
const
checkUploadMonthlyReportPL
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_pl/check_import'
,
body
)
//Template
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
...
...
@@ -412,6 +413,7 @@ const create = (type = "") => {
createMonthlyReportPL
,
createMonthlyReportFAM
,
createMonthlyReportOI
,
checkUploadMonthlyReportPL
,
getSubmission
,
checkUploadMB
,
getAllOperatingInd
,
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
7236b2ae
...
...
@@ -72,6 +72,7 @@ export default class ProfitLossMR extends Component {
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
}
api
.
create
().
getHierarkiMontlyReportPL
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
let
dataTable
=
[]
...
...
@@ -238,6 +239,7 @@ export default class ProfitLossMR extends Component {
}
fileHandler
=
(
event
)
=>
{
console
.
log
(
event
);
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
console
.
log
(
resp
)
...
...
@@ -252,12 +254,13 @@ export default class ProfitLossMR extends Component {
isi
.
map
((
i
,
index
)
=>
{
if
(
i
.
length
>
0
)
{
payload
.
push
({
item_report_id
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
notes
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
actual
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
mtd_vs_mb
:
i
[
16
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
16
]))
===
false
?
"0"
:
String
(
i
[
16
]).
trim
(),
mtd_vs_rb
:
i
[
17
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
17
]))
===
false
?
"0"
:
String
(
i
[
17
]).
trim
(),
orders
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
item_report_id
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
item_report
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
notes
:
i
[
3
]
===
undefined
?
""
:
String
(
i
[
3
]).
trim
(),
actual
:
i
[
4
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
"0"
:
String
(
i
[
4
]).
trim
(),
mtd_vs_mb
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]).
trim
(),
mtd_vs_rb
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
})
}
})
...
...
@@ -265,6 +268,7 @@ export default class ProfitLossMR extends Component {
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
months
:
this
.
props
.
month
.
month_id
,
profit_loss
:
payload
}
console
.
log
(
body
)
...
...
@@ -274,52 +278,50 @@ export default class ProfitLossMR extends Component {
}
checkUpload
()
{
api
.
create
().
checkUploadM
B
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadM
onthlyReportPL
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visibleProfitLoss
:
false
,
loading
:
true
})
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
item
.
type_report_id
,
item
.
item_report_id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
item_report
,
item
.
notes
,
item
.
total_actual_before
,
item
.
january
,
item
.
february
,
item
.
march
,
item
.
april
,
item
.
may
,
item
.
june
,
item
.
july
,
item
.
august
,
item
.
september
,
item
.
october
,
item
.
november
,
item
.
december
,
item
.
total_current_year
,
item
.
total_next_year
,
item
.
total_more_year
,
item
.
orders
,
item
.
error
]
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
24
].
length
>
0
)
{
// console.log('masuk')
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
})
// console.log(this.state.buttonError)
})
}
}
// if (response.data) {
// if (response.data.status === 'success') {
// this.setState({ visibleUpload: false, visibleProfitLoss: false, loading: true })
// let dataTable = response.data.data.map((item, index) => {
// return [
// item.item_report_id,
// item.type_report_id,
// item.item_report,
// item.parent,
// item.formula,
// item.level,
// item.notes,
// item.rolling_outlook,
// item.master_budget,
// item.rolling_budget,
// item.actual,
// item.ytd_actual,
// item.actual_previous_month,
// item.amount_act_vs_previous_month,
// item.percent_act_vs_previous_month,
// item.amount_act_vs_mb,
// item.percent_act_vs_mb,
// item.amount_act_vs_rb,
// item.percent_act_vs_rb,
// item.mtd_vs_previous_month,
// item.mtd_vs_mb,
// item.mtd_vs_rb,
// item.orders
// ]
// })
// this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
// this.state.dataTable.map(item => {
// if (item[24].length > 0) {
// // console.log('masuk')
// this.setState({ buttonError: true, errorPreview: true, editable: true })
// }
// })
// // console.log(this.state.buttonError)
// })
// }
// }
})
}
...
...
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
7236b2ae
...
...
@@ -3844,7 +3844,7 @@ export default class BalanceSheetOLPA extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"OUTLOOK PA - BALANCE SHEET"
?
String
(
this
.
state
.
judul
).
includes
(
"OUTLOOK PA - BALANCE SHEET"
)
?
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
...
...
src/container/OutlookPA/ProfitLossOLPA.js
View file @
7236b2ae
...
...
@@ -2951,7 +2951,7 @@ export default class ProfitLossOLPA extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"OUTLOOK PA - PROFIT LOSS"
?
String
(
this
.
state
.
judul
).
includes
(
"OUTLOOK PA - PROFIT LOSS"
)
?
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
...
...
src/container/OutlookPA/TaxPlanningOLPA.js
View file @
7236b2ae
...
...
@@ -3898,7 +3898,7 @@ export default class TaxPlanningOLPA extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"OUTLOOK PA - TAX PLANNING"
?
String
(
this
.
state
.
judul
).
includes
(
"OUTLOOK PA - TAX PLANNING"
)
?
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment