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
b1427b27
Commit
b1427b27
authored
Jul 10, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
97ddf8b2
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
854 additions
and
252 deletions
+854
-252
index.js
src/api/index.js
+2
-0
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+182
-65
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+37
-28
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+8
-5
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+209
-59
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+416
-95
No files found.
src/api/index.js
View file @
b1427b27
...
...
@@ -300,6 +300,7 @@ const create = (type = "") => {
const
getHierarkiCreateReportPLMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/master_budget/get_report_hierarki'
,
body
)
const
getHierarkiCreateReportPLMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/monthly_report/get_report_hierarki'
,
body
)
const
createReportPLMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/master_budget/create_submission_report'
,
body
)
const
createReportPLMBSimulasi
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/master_budget/create_submission_report/other_currency_existing'
,
body
)
const
createReportPLMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/monthly_report/create_monthly_report'
,
body
)
const
getPLID
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss/get_profit_loss_id'
,
body
)
const
getHierarkiCreateReportFRMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_ratio/master_budget/get_report_hierarki'
,
body
)
...
...
@@ -774,6 +775,7 @@ const create = (type = "") => {
getHierarkiCreateReportPLMB
,
getHierarkiCreateReportPLMR
,
createReportPLMB
,
createReportPLMBSimulasi
,
createReportPLMR
,
getPLID
,
getFRID
,
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
b1427b27
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/BudgetTahunan.js
View file @
b1427b27
...
...
@@ -614,7 +614,8 @@ export default class BudgetTahunan extends Component {
})
}
getSubmission
(
type
)
{
getSubmission
(
type
,
trigger
)
{
console
.
log
(
trigger
);
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
})
...
...
@@ -667,7 +668,7 @@ export default class BudgetTahunan extends Component {
}
if
(
type
!=
undefined
&&
type
==
'PL'
)
{
// this.getCashFlow(type)
this
.
getPL
(
type
)
this
.
getPL
(
type
,
trigger
)
}
else
if
(
type
!=
undefined
&&
type
==
'BS'
)
{
let
bodyRatioBs
=
{
"report"
:
'ratio'
,
...
...
@@ -1337,7 +1338,7 @@ export default class BudgetTahunan extends Component {
})
}
getPL
(
type
)
{
getPL
(
type
,
trigger
)
{
let
PLID
=
null
let
payloadID
=
{
"periode"
:
this
.
state
.
periode
.
periode
,
...
...
@@ -1448,7 +1449,7 @@ export default class BudgetTahunan extends Component {
})
// console.log(dataTable)
this
.
setState
({
dbPL
:
dataTable
},
()
=>
{
this
.
olahDataPL
(
this
.
state
.
dbPL
,
type
)
this
.
olahDataPL
(
this
.
state
.
dbPL
,
type
,
trigger
)
})
}
else
{
this
.
setState
({
dbPL
:
[],
previewTable
:
false
,
previewDownload
:
false
})
...
...
@@ -1687,7 +1688,7 @@ export default class BudgetTahunan extends Component {
return
total
}
olahDataPL
(
dbPL
,
type
)
{
olahDataPL
(
dbPL
,
type
,
trigger
)
{
dbPL
.
map
((
item
,
index
)
=>
{
if
(
item
[
0
]
==
5
||
item
[
0
]
==
6
||
item
[
0
]
==
7
)
{
item
[
7
].
value
=
this
.
handleValueFormulaDBPL
(
index
,
item
[
7
],
item
,
7
)
...
...
@@ -1707,11 +1708,11 @@ export default class BudgetTahunan extends Component {
}
})
this
.
setState
({
dbPL
},
()
=>
{
this
.
payloadPL
(
type
)
this
.
payloadPL
(
type
,
trigger
)
})
}
payloadPL
(
type
)
{
payloadPL
(
type
,
trigger
)
{
let
listPL
=
[]
// console.log(this.state.dbPL)
this
.
state
.
dbPL
.
map
((
item
,
index
)
=>
{
...
...
@@ -1806,13 +1807,14 @@ export default class BudgetTahunan extends Component {
if
(
type
!=
undefined
)
{
if
(
type
==
'PL'
)
{
// console.log('tarik sis')
this
.
createDBPL
()
this
.
createDBPL
(
trigger
)
}
}
})
}
createDBPL
()
{
createDBPL
(
trigger
)
{
console
.
log
(
trigger
);
let
payload
=
{
// "submission_id": this.state.submissionID,
"company_id"
:
this
.
state
.
company
.
company_id
,
...
...
@@ -1826,24 +1828,31 @@ export default class BudgetTahunan extends Component {
}
// console.log(this.state.dbCF)
// console.log(JSON.stringify(payload))
api
.
create
().
createReportPLMB
(
payload
).
then
((
res
)
=>
{
// console.log(res)
this
.
setState
({
loading
:
false
})
// if (response.data) {
// if (response.data.status === "success") {
// this.props.saveToMonthlyReport()
// } else {
// this.setState({ loading: false }, () => {
// this.props.saveToMonthlyReport()
// })
// }
// } else {
// this.setState({ loading: false }, () => {
// // this.getSubmission()
// document.body.style.overflow = 'unset';
// })
// }
})
if
(
trigger
===
"simulasiPL"
)
{
api
.
create
().
createReportPLMBSimulasi
(
payload
).
then
((
res
)
=>
{
// console.log(res)
this
.
setState
({
loading
:
false
})
})
}
else
{
api
.
create
().
createReportPLMB
(
payload
).
then
((
res
)
=>
{
// console.log(res)
this
.
setState
({
loading
:
false
})
// if (response.data) {
// if (response.data.status === "success") {
// this.props.saveToMonthlyReport()
// } else {
// this.setState({ loading: false }, () => {
// this.props.saveToMonthlyReport()
// })
// }
// } else {
// this.setState({ loading: false }, () => {
// // this.getSubmission()
// document.body.style.overflow = 'unset';
// })
// }
})
}
}
getFR
(
type
)
{
...
...
@@ -2347,7 +2356,7 @@ export default class BudgetTahunan extends Component {
if
(
type
===
"PL"
||
type
===
"DraftPL"
)
{
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
}
else
if
(
type
===
"TP"
||
type
===
"DraftTP"
)
{
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
}
else
if
(
type
===
"BS"
||
type
===
"DraftBS"
)
{
this
.
setState
({
visibleBS
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
}
else
if
(
type
===
"FAM"
||
type
===
"DraftFAM"
)
{
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
b1427b27
...
...
@@ -89,6 +89,7 @@ export default class CorporateAnnualTarget extends Component {
visibleAlertSave
:
false
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandlerSimulasi
=
this
.
fileHandlerSimulasi
.
bind
(
this
);
}
...
...
@@ -428,7 +429,7 @@ export default class CorporateAnnualTarget extends Component {
report_id
:
this
.
props
.
report_id
,
status
:
''
,
cat
:
payload
,
status
:
'submitted'
status
:
'submitted'
}
// // // // console.log(body)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
]
})
...
...
@@ -659,7 +660,7 @@ export default class CorporateAnnualTarget extends Component {
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
Number
(
item
.
october
).
toFixed
(
1
)
:
{
value
:
item
.
october
,
formula
:
item
.
october_formula
}
:
item
.
october
==
""
?
item
.
october
:
String
(
item
.
october
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
october
)
:
Number
(
item
.
october
).
toFixed
(
1
),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
Number
(
item
.
november
).
toFixed
(
1
)
:
{
value
:
item
.
november
,
formula
:
item
.
november_formula
}
:
item
.
november
==
""
?
item
.
november
:
String
(
item
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
november
)
:
Number
(
item
.
november
).
toFixed
(
1
),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
Number
(
item
.
december
).
toFixed
(
1
)
:
{
value
:
item
.
december
,
formula
:
item
.
december_formula
}
:
item
.
december
==
""
?
item
.
december
:
String
(
item
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
december
)
:
Number
(
item
.
december
).
toFixed
(
1
),
item
.
total_current_year
==
""
?
item
.
total_current_year
:
String
(
item
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
total_current_year
)
:
Number
(
item
.
total_current_year
).
toFixed
(
1
),
item
.
total_current_year
==
=
"NaN"
?
"0.0"
:
item
.
total_current_year
==
""
?
item
.
total_current_year
:
String
(
item
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
total_current_year
)
:
Number
(
item
.
total_current_year
).
toFixed
(
1
),
item
.
total_next_year
==
""
?
item
.
total_next_year
:
String
(
item
.
total_next_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
total_next_year
)
:
Number
(
item
.
total_next_year
).
toFixed
(
1
),
item
.
total_more_year
==
""
?
item
.
total_more_year
:
String
(
item
.
total_more_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
total_more_year
)
:
Number
(
item
.
total_more_year
).
toFixed
(
1
),
item
.
strategic
,
...
...
@@ -732,7 +733,9 @@ export default class CorporateAnnualTarget extends Component {
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
dataLoaded
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
loading
:
false
,
visibleUploadSimulasi
:
false
},
()
=>
this
.
getItemHierarki
())
this
.
props
.
getReport
(
'CAT'
)
this
.
props
.
onClickClose
()
this
.
setState
({
loading
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
})
}
...
...
@@ -925,8 +928,8 @@ export default class CorporateAnnualTarget extends Component {
}
// // console.log(String(weightReal).substr(0,String(weightReal).length-1))
// // console.log(Number(String(weightReal).substr(0,String(weightReal).length-1)).toFixed(1));
console
.
log
(
weightReal
)
console
.
log
(
i
[
7
])
//
console.log(weightReal)
//
console.log(i[7])
let
b
=
[]
// console.log(i[13].value == undefined? 'Y' : 'N')
data
.
push
({
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
b1427b27
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/TaxPlanning.js
View file @
b1427b27
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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