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
debe6a8c
Commit
debe6a8c
authored
Mar 03, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update banyak
parent
8c7b235e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1145 additions
and
1120 deletions
+1145
-1120
BudgetTahunan.js
src/container/BudgetTahunan.js
+16
-74
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+1129
-1046
No files found.
src/container/BudgetTahunan.js
View file @
debe6a8c
...
@@ -533,9 +533,10 @@ export default class BudgetTahunan extends Component {
...
@@ -533,9 +533,10 @@ export default class BudgetTahunan extends Component {
// // console.log(this.state.btnApprove)
// // console.log(this.state.btnApprove)
this
.
historyApproval
()
this
.
historyApproval
()
this
.
getLatestPeriodSubmit
()
this
.
getLatestPeriodSubmit
()
this
.
getCashFlow
(
type
)
// this.getCashFlow(type)
// this.getPL(type)
if
(
type
!=
undefined
)
{
if
(
type
!=
undefined
)
{
this
.
getCashFlow
(
type
)
//
this.getCashFlow(type)
this
.
getPL
(
type
)
this
.
getPL
(
type
)
}
else
{
}
else
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
...
@@ -1032,68 +1033,11 @@ export default class BudgetTahunan extends Component {
...
@@ -1032,68 +1033,11 @@ export default class BudgetTahunan extends Component {
listCF
.
push
(
item
)
listCF
.
push
(
item
)
})
})
this
.
setState
({
dbCF
:
listCF
},
()
=>
{
this
.
payloadCFOneMore
(
listCF
,
type
)
})
}
payloadCFOneMore
(
list
,
type
)
{
let
listCF
=
[]
this
.
state
.
dbCF
.
map
((
item
,
index
)
=>
{
if
(
item
[
0
]
==
5
||
item
[
0
]
==
6
||
item
[
0
]
==
7
)
{
item
[
7
].
value
=
this
.
handleValueFormula
(
index
,
item
[
7
],
item
,
7
)
item
[
8
].
value
=
this
.
handleValueFormula
(
index
,
item
[
8
],
item
,
8
)
item
[
9
].
value
=
this
.
handleValueFormula
(
index
,
item
[
9
],
item
,
9
)
item
[
10
].
value
=
this
.
handleValueFormula
(
index
,
item
[
10
],
item
,
10
)
item
[
11
].
value
=
this
.
handleValueFormula
(
index
,
item
[
11
],
item
,
11
)
item
[
12
].
value
=
this
.
handleValueFormula
(
index
,
item
[
12
],
item
,
12
)
item
[
13
].
value
=
this
.
handleValueFormula
(
index
,
item
[
13
],
item
,
13
)
item
[
14
].
value
=
this
.
handleValueFormula
(
index
,
item
[
14
],
item
,
14
)
item
[
15
].
value
=
this
.
handleValueFormula
(
index
,
item
[
15
],
item
,
15
)
item
[
16
].
value
=
this
.
handleValueFormula
(
index
,
item
[
16
],
item
,
16
)
item
[
17
].
value
=
this
.
handleValueFormula
(
index
,
item
[
17
],
item
,
17
)
item
[
18
].
value
=
this
.
handleValueFormula
(
index
,
item
[
18
],
item
,
18
)
item
[
19
]
=
this
.
handleForecast
(
index
,
item
,
`
${
Number
(
this
.
state
.
periode
.
periode
)}
`
,
19
)
item
[
20
]
=
this
.
handleForecast
(
index
,
item
,
`
${
Number
(
this
.
state
.
periode
.
periode
)
+
1
}
`
,
20
)
item
[
21
]
=
this
.
handleForecast
(
index
,
item
,
`
${
Number
(
this
.
state
.
periode
.
periode
)
+
2
}
`
,
21
)
}
listCF
.
push
(
item
)
})
this
.
setState
({
dbCF
:
listCF
},
()
=>
{
this
.
setState
({
dbCF
:
listCF
},
()
=>
{
this
.
olahDataCashFlowOneMore
(
listCF
,
type
)
this
.
olahDataCashFlowOneMore
(
listCF
,
type
)
})
})
}
}
// payloadCFOneMoreAgain(list, type) {
// let listCF = []
// this.state.dbCF.map((item, index) => {
// if (item[0] == 5 || item[0] == 6 || item[0] == 7) {
// item[7].value = this.handleValueFormula(index, item[7], item, 7)
// item[8].value = this.handleValueFormula(index, item[8], item, 8)
// item[9].value = this.handleValueFormula(index, item[9], item, 9)
// item[10].value = this.handleValueFormula(index, item[10], item, 10)
// item[11].value = this.handleValueFormula(index, item[11], item, 11)
// item[12].value = this.handleValueFormula(index, item[12], item, 12)
// item[13].value = this.handleValueFormula(index, item[13], item, 13)
// item[14].value = this.handleValueFormula(index, item[14], item, 14)
// item[15].value = this.handleValueFormula(index, item[15], item, 15)
// item[16].value = this.handleValueFormula(index, item[16], item, 16)
// item[17].value = this.handleValueFormula(index, item[17], item, 17)
// item[18].value = this.handleValueFormula(index, item[18], item, 18)
// item[19] = this.handleForecast(index, item, `${Number(this.state.periode.periode)}`, 19)
// item[20] = this.handleForecast(index, item, `${Number(this.state.periode.periode) + 1}`, 20)
// item[21] = this.handleForecast(index, item, `${Number(this.state.periode.periode) + 2}`, 21)
// }
// listCF.push(item)
// })
// this.setState({dbCF: listCF}, () => {
// this.olahDataCashFlowOneMore(listCF, type)
// })
// }
olahDataCashFlowOneMore
(
list
,
type
)
{
olahDataCashFlowOneMore
(
list
,
type
)
{
console
.
log
(
list
)
console
.
log
(
list
)
let
listCF
=
[]
let
listCF
=
[]
...
@@ -1200,26 +1144,16 @@ export default class BudgetTahunan extends Component {
...
@@ -1200,26 +1144,16 @@ export default class BudgetTahunan extends Component {
// if (type != undefined) {
// if (type != undefined) {
// if (type == 'BS' || type == 'FAM' || type == 'PL') {
// if (type == 'BS' || type == 'FAM' || type == 'PL') {
console
.
log
(
'tarik sis'
)
console
.
log
(
'tarik sis'
)
this
.
createCashFlow
()
//
this.createCashFlow()
// }
// }
// }
// }
})
})
}
}
createCashFlow
()
{
createCashFlow
(
payload
)
{
let
payload
=
{
"submission_id"
:
this
.
state
.
submissionID
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"report_id"
:
6
,
"status"
:
"submitted"
,
"cash_flow"
:
this
.
state
.
dbCF
}
console
.
log
(
this
.
state
.
dbCF
)
console
.
log
(
JSON
.
stringify
(
payload
))
api
.
create
().
createReportCF
(
payload
).
then
((
res
)
=>
{
api
.
create
().
createReportCF
(
payload
).
then
((
res
)
=>
{
this
.
setState
({
loading
:
false
})
console
.
log
(
res
)
console
.
log
(
res
)
this
.
getSubmission
()
// if (response.data) {
// if (response.data) {
// if (response.data.status === "success") {
// if (response.data.status === "success") {
// this.props.saveToMonthlyReport()
// this.props.saveToMonthlyReport()
...
@@ -1345,7 +1279,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1345,7 +1279,7 @@ export default class BudgetTahunan extends Component {
}
}
}
}
})
})
console
.
log
(
dataTable
)
//
console.log(dataTable)
this
.
setState
({
dbPL
:
dataTable
},
()
=>
{
this
.
setState
({
dbPL
:
dataTable
},
()
=>
{
this
.
olahDataPL
(
this
.
state
.
dbPL
,
type
)
this
.
olahDataPL
(
this
.
state
.
dbPL
,
type
)
})
})
...
@@ -1558,6 +1492,13 @@ export default class BudgetTahunan extends Component {
...
@@ -1558,6 +1492,13 @@ export default class BudgetTahunan extends Component {
}
}
})
})
if
(
String
(
tableMeta
[
5
])
==
"Cost of Goods Sold (COGS)"
&&
column
==
20
)
{
console
.
log
(
splitFormula
)
console
.
log
(
baru
)
console
.
log
(
anjay
)
console
.
log
(
anjay2
)
console
.
log
(
total
)
}
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
total
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
total
return
total
return
total
}
}
...
@@ -1573,7 +1514,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1573,7 +1514,7 @@ export default class BudgetTahunan extends Component {
}
}
})
})
}
else
{
}
else
{
total
=
this
.
handleValueFormulaDBPL
(
dataTable2
[
index
][
column
],
tableMeta
,
column
,
periode
,
dataTable2
[
index
][
25
])
total
=
this
.
handleValueFormulaDBPL
(
dataTable2
[
index
][
column
],
tableMeta
[
column
],
tableMeta
,
column
,
periode
,
dataTable2
[
index
][
25
])
}
}
return
total
return
total
...
@@ -3069,6 +3010,7 @@ export default class BudgetTahunan extends Component {
...
@@ -3069,6 +3010,7 @@ export default class BudgetTahunan extends Component {
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
PLBSFAMSubmitted
=
{
this
.
state
.
PLBSFAMSubmitted
}
PLBSFAMSubmitted
=
{
this
.
state
.
PLBSFAMSubmitted
}
createCashFlow
=
{
this
.
createCashFlow
.
bind
(
this
)}
/
>
/
>
)
)
}
}
...
...
src/container/BudgetTahunan/CashFlow.js
View file @
debe6a8c
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