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
73e8675b
Commit
73e8675b
authored
Jul 25, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
balikin code simulasi MB
parent
4fb1c8bf
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
160 additions
and
1256 deletions
+160
-1256
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+64
-328
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+66
-110
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+4
-27
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+26
-534
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+0
-257
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
73e8675b
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/BudgetTahunan.js
View file @
73e8675b
...
...
@@ -614,8 +614,7 @@ export default class BudgetTahunan extends Component {
})
}
getSubmission
(
type
,
trigger
)
{
console
.
log
(
trigger
);
getSubmission
(
type
)
{
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
})
...
...
@@ -668,22 +667,8 @@ export default class BudgetTahunan extends Component {
}
if
(
type
!=
undefined
&&
type
==
'PL'
)
{
// this.getCashFlow(type)
this
.
getPL
(
type
,
trigger
)
this
.
getPL
(
type
)
}
else
if
(
type
!=
undefined
&&
type
==
'BS'
)
{
if
(
trigger
===
'simulasiBS'
)
{
let
bodyRatioBs
=
{
"report"
:
'ratio'
,
"submissionId"
:
this
.
state
.
submissionID
,
"periode"
:
this
.
state
.
periode
.
periode
,
"companyId"
:
this
.
state
.
company
.
company_id
,
"currency_id"
:
this
.
state
.
defaultCurrency
.
id
,
}
// console.log(bodyRatioBs);
api
.
create
().
triggerRatioMBSimulasi
(
bodyRatioBs
).
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
setState
({
loading
:
false
})
})
}
else
{
let
bodyRatioBs
=
{
"report"
:
'ratio'
,
"submissionId"
:
this
.
state
.
submissionID
,
...
...
@@ -696,7 +681,6 @@ export default class BudgetTahunan extends Component {
console
.
log
(
res
)
this
.
setState
({
loading
:
false
})
})
}
}
else
{
this
.
setState
({
loading
:
false
})
}
...
...
@@ -1320,26 +1304,7 @@ export default class BudgetTahunan extends Component {
})
}
createCashFlow
(
payload
,
trigger
)
{
console
.
log
(
trigger
);
if
(
trigger
===
"simulasi"
)
{
api
.
create
().
createReportCFSimulasi
(
payload
).
then
((
res
)
=>
{
console
.
log
(
res
)
// this.getSubmission()
if
(
res
.
data
)
{
if
(
res
.
data
.
status
===
"success"
)
{
this
.
setState
({
visibleCF
:
false
,
visibleBudgetTahunan
:
true
})
this
.
getSubmission
()
}
else
{
if
(
res
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
res
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
})
}
}
}
})
}
else
{
createCashFlow
(
payload
)
{
api
.
create
().
createReportCF
(
payload
).
then
((
res
)
=>
{
console
.
log
(
res
)
// this.getSubmission()
...
...
@@ -1371,9 +1336,8 @@ export default class BudgetTahunan extends Component {
// }
})
}
}
getPL
(
type
,
trigger
)
{
getPL
(
type
)
{
let
PLID
=
null
let
payloadID
=
{
"periode"
:
this
.
state
.
periode
.
periode
,
...
...
@@ -1484,7 +1448,7 @@ export default class BudgetTahunan extends Component {
})
// console.log(dataTable)
this
.
setState
({
dbPL
:
dataTable
},
()
=>
{
this
.
olahDataPL
(
this
.
state
.
dbPL
,
type
,
trigger
)
this
.
olahDataPL
(
this
.
state
.
dbPL
,
type
)
})
}
else
{
this
.
setState
({
dbPL
:
[],
previewTable
:
false
,
previewDownload
:
false
})
...
...
@@ -1723,7 +1687,7 @@ export default class BudgetTahunan extends Component {
return
total
}
olahDataPL
(
dbPL
,
type
,
trigger
)
{
olahDataPL
(
dbPL
,
type
)
{
dbPL
.
map
((
item
,
index
)
=>
{
if
(
item
[
0
]
==
5
||
item
[
0
]
==
6
||
item
[
0
]
==
7
)
{
item
[
7
].
value
=
this
.
handleValueFormulaDBPL
(
index
,
item
[
7
],
item
,
7
)
...
...
@@ -1743,11 +1707,11 @@ export default class BudgetTahunan extends Component {
}
})
this
.
setState
({
dbPL
},
()
=>
{
this
.
payloadPL
(
type
,
trigger
)
this
.
payloadPL
(
type
)
})
}
payloadPL
(
type
,
trigger
)
{
payloadPL
(
type
)
{
let
listPL
=
[]
// console.log(this.state.dbPL)
this
.
state
.
dbPL
.
map
((
item
,
index
)
=>
{
...
...
@@ -1842,14 +1806,13 @@ export default class BudgetTahunan extends Component {
if
(
type
!=
undefined
)
{
if
(
type
==
'PL'
)
{
// console.log('tarik sis')
this
.
createDBPL
(
trigger
)
this
.
createDBPL
()
}
}
})
}
createDBPL
(
trigger
)
{
console
.
log
(
trigger
);
createDBPL
()
{
let
payload
=
{
// "submission_id": this.state.submissionID,
"company_id"
:
this
.
state
.
company
.
company_id
,
...
...
@@ -1863,12 +1826,6 @@ export default class BudgetTahunan extends Component {
}
// console.log(this.state.dbCF)
// console.log(JSON.stringify(payload))
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
})
...
...
@@ -1888,7 +1845,6 @@ export default class BudgetTahunan extends Component {
// }
})
}
}
getFR
(
type
)
{
// console.log("get FR");
...
...
src/container/BudgetTahunan/CashFlow.js
View file @
73e8675b
...
...
@@ -336,7 +336,7 @@ export default class CashFlow extends Component {
this
.
setState
({
alert
:
false
})
}
olahDataCashFlow
(
dataTable2
,
trigger
)
{
olahDataCashFlow
(
dataTable2
)
{
console
.
log
(
dataTable2
)
let
listCF
=
[]
dataTable2
.
map
((
item
,
index
)
=>
{
...
...
@@ -373,10 +373,10 @@ export default class CashFlow extends Component {
})
console
.
log
(
listCF
)
this
.
createCashFlow
(
listCF
,
trigger
)
this
.
createCashFlow
(
listCF
)
}
createCashFlow
(
dbcf
,
trigger
)
{
createCashFlow
(
dbcf
)
{
let
payload
=
{
"submission_id"
:
this
.
props
.
submissionID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
...
...
@@ -388,7 +388,7 @@ export default class CashFlow extends Component {
}
console
.
log
(
dbcf
)
console
.
log
(
JSON
.
stringify
(
payload
))
this
.
props
.
createCashFlow
(
payload
,
trigger
)
this
.
props
.
createCashFlow
(
payload
)
// this.props.onClickClose()
}
...
...
@@ -3340,29 +3340,6 @@ export default class CashFlow extends Component {
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
// this.state.buttonError ?
// this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
// :
this
.
state
.
handleDoubleClick
==
1
?
null
:
this
.
setState
({
handleDoubleClick
:
1
},
()
=>
{
this
.
olahDataCashFlow
(
dataTable2
,
"simulasi"
)
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
15
}}
>
<
div
style
=
{{
backgroundColor
:
'#cd5c5c'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
Data
Simulasi
<
/Typography
>
<
/div
>
<
/button
>
{
this
.
props
.
isApprover
===
true
||
dataTable2
.
length
==
0
?
null
:
(
!
this
.
props
.
truelyApprover
)
&&
(
this
.
props
.
lastStatus
===
'SUBMIT'
||
this
.
props
.
lastStatus
===
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
<
button
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
73e8675b
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
73e8675b
This diff is collapsed.
Click to expand it.
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