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
4fee691b
Commit
4fee691b
authored
May 03, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
d037eb88
873b685d
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
343 additions
and
242 deletions
+343
-242
index.js
src/api/index.js
+3
-1
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+8
-4
HomePage.js
src/container/HomePage.js
+2
-2
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+27
-25
CorporateAnnualTargetOLPA.js
src/container/OutlookPA/CorporateAnnualTargetOLPA.js
+238
-180
RollingOutlook.js
src/container/RollingOutlook.js
+27
-3
BalanceSheetRO.js
src/container/RollingOutlook/BalanceSheetRO.js
+1
-1
CashFlowRO.js
src/container/RollingOutlook/CashFlowRO.js
+37
-26
No files found.
src/api/index.js
View file @
4fee691b
...
...
@@ -366,6 +366,7 @@ const create = (type = "") => {
const
createDBPLOLPA
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss/outlook_pa/create_outlook_report'
,
body
)
const
getHierarkiDBPLRO
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss/rolling_outlook/get_report_hierarki'
,
body
)
const
createDBPLRO
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss/rolling_outlook/create_rolling_outlook'
,
body
)
const
getDetailReportOLPACAT
=
(
body
)
=>
api
.
post
(
'transaction/cat/outlook_pa/get_report_hierarki'
,
body
)
// Monthly
const
getMonthlyReport
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/get_all_report'
,
body
)
...
...
@@ -802,7 +803,8 @@ const create = (type = "") => {
getHierarkiDBPLOLPA
,
createDBPLOLPA
,
getHierarkiDBPLRO
,
createDBPLRO
createDBPLRO
,
getDetailReportOLPACAT
}
}
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
4fee691b
...
...
@@ -860,9 +860,9 @@ export default class CorporateAnnualTarget extends Component {
"october"
:
i
[
22
].
value
!=
undefined
?
String
(
Number
(
i
[
22
].
value
).
toFixed
(
1
))
:
String
(
i
[
22
]),
"november"
:
i
[
23
].
value
!=
undefined
?
String
(
Number
(
i
[
23
].
value
).
toFixed
(
1
))
:
String
(
i
[
23
]),
"december"
:
i
[
24
].
value
!=
undefined
?
String
(
Number
(
i
[
24
].
value
).
toFixed
(
1
))
:
String
(
i
[
24
]),
"total_current_year"
:
i
[
6
]
===
String
(
Number
(
i
[
25
]).
toFixed
(
1
))
==
""
?
"0.0"
:
String
(
Number
(
i
[
25
]).
toFixed
(
1
)),
"total_next_year"
:
i
[
6
]
===
String
(
Number
(
i
[
26
]).
toFixed
(
1
))
==
""
?
"0.0"
:
String
(
Number
(
i
[
26
]).
toFixed
(
1
)),
"total_more_year"
:
i
[
6
]
===
String
(
Number
(
i
[
27
]).
toFixed
(
1
))
==
""
?
"0.0"
:
String
(
Number
(
i
[
27
]).
toFixed
(
1
)),
"total_current_year"
:
String
(
Number
(
i
[
25
]).
toFixed
(
1
))
==
""
?
"0.0"
:
String
(
Number
(
i
[
25
]).
toFixed
(
1
)),
"total_next_year"
:
String
(
Number
(
i
[
26
]).
toFixed
(
1
))
==
""
?
"0.0"
:
String
(
Number
(
i
[
26
]).
toFixed
(
1
)),
"total_more_year"
:
String
(
Number
(
i
[
27
]).
toFixed
(
1
))
==
""
?
"0.0"
:
String
(
Number
(
i
[
27
]).
toFixed
(
1
)),
"strategic"
:
String
(
i
[
28
]),
"pic"
:
String
(
i
[
29
])
})
...
...
@@ -1140,8 +1140,11 @@ export default class CorporateAnnualTarget extends Component {
let
valuezz
=
value
.
formula
[
indexID
].
value
anjay
.
push
(
valuezz
==
""
||
valuezz
==
null
?
"0"
:
valuezz
)
}
}
else
{
let
array
=
dataTable2
[
tableMeta
.
rowIndex
][
30
].
filter
((
val
)
=>
val
.
periode
==
Number
(
column
))
let
valuezz
=
array
[
0
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
else
{
let
convertID
=
-
1
if
(
tableMeta
.
rowData
[
11
].
value
==
'FORMULA'
)
{
...
...
@@ -1325,6 +1328,7 @@ export default class CorporateAnnualTarget extends Component {
const
handleValueForecast
=
(
value
,
tableMeta
,
periode
)
=>
{
return
handleValueFormula
(
value
,
tableMeta
,
periode
,
periode
,
'forecast'
)
}
const
handleChangeDropdown
=
(
value
,
tableMeta
)
=>
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
value
let
valz
=
value
.
value
...
...
src/container/HomePage.js
View file @
4fee691b
...
...
@@ -761,9 +761,9 @@ class HomePage extends Component {
pathname
:
String
(
tableMeta
.
rowData
[
3
]).
toLocaleLowerCase
().
includes
(
"master"
)
?
`/home/master-budget/`
:
String
(
tableMeta
.
rowData
[
3
]).
toLocaleLowerCase
().
includes
(
"monthly"
)
?
`/home/monthly-report/`
:
String
(
tableMeta
.
rowData
[
3
]).
toLocaleLowerCase
().
includes
(
"rolling"
)
?
`/home/rolling-outlook/`
:
`/home/outlook-performance/`
,
state
:
{
userType
:
'approver'
,
rawData
:
{...
this
.
state
.
rawData
[
tableMeta
.
rowIndex
],
quarter
:
String
(
tableMeta
.
rowData
[
3
]).
toLocaleLowerCase
().
includes
(
"rolling"
)
?
this
.
state
.
quarter
.
value
:
null
},
rawData
:
{...
this
.
state
.
rawData
[
tableMeta
.
rowIndex
],
quarter
:
String
(
tableMeta
.
rowData
[
3
]).
toLocaleLowerCase
().
includes
(
"rolling"
)
?
this
.
state
.
rawData
[
tableMeta
.
rowIndex
].
quartal
:
null
},
month
:
String
(
tableMeta
.
rowData
[
3
]).
toLocaleLowerCase
().
includes
(
"master"
)
?
null
:
getDataMonth
(
this
.
state
.
rawData
[
tableMeta
.
rowIndex
]),
quarter
:
String
(
tableMeta
.
rowData
[
3
]).
toLocaleLowerCase
().
includes
(
"rolling"
)
?
this
.
state
.
quarter
.
value
:
null
quarter
:
String
(
tableMeta
.
rowData
[
3
]).
toLocaleLowerCase
().
includes
(
"rolling"
)
?
this
.
state
.
rawData
[
tableMeta
.
rowIndex
].
quartal
:
null
}
}}
>
<
button
...
...
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
4fee691b
...
...
@@ -208,8 +208,8 @@ export default class BalanceSheetOLPA extends Component {
Number
(
item
.
balance_sheet
.
august
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
september
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
formula
:
item
.
balance_sheet
.
november_formula
}
:
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
formula
:
item
.
balance_sheet
.
december_formula
}
:
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
total_current_year
).
toFixed
(
1
),
item
.
order
,
item
.
condition_it_should_be
,
...
...
@@ -244,8 +244,8 @@ export default class BalanceSheetOLPA extends Component {
Number
(
item
.
balance_sheet
.
august
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
september
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
formula
:
item
.
balance_sheet
.
november_formula
}
:
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
formula
:
item
.
balance_sheet
.
december_formula
}
:
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
Number
(
item
.
balance_sheet
.
total_current_year
).
toFixed
(
1
),
item
.
order
,
item
.
condition_it_should_be
,
...
...
@@ -310,8 +310,8 @@ export default class BalanceSheetOLPA extends Component {
august
:
i
[
0
]
===
3
&&
i
[
14
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
september
:
i
[
0
]
===
3
&&
i
[
15
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
october
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
november
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
december
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
november
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0.0"
:
(
i
[
0
]
===
5
||
i
[
0
]
===
6
||
i
[
0
]
===
7
?
String
(
Number
(
i
[
17
].
value
).
toFixed
(
1
))
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)
)),
december
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0.0"
:
(
i
[
0
]
===
5
||
i
[
0
]
===
6
||
i
[
0
]
===
7
?
String
(
Number
(
i
[
18
].
value
).
toFixed
(
1
))
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)
)),
total_current_year
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
})
})
...
...
@@ -416,8 +416,8 @@ export default class BalanceSheetOLPA extends Component {
Number
(
item
.
august
).
toFixed
(
1
),
Number
(
item
.
september
).
toFixed
(
1
),
Number
(
item
.
october
).
toFixed
(
1
),
Number
(
item
.
november
).
toFixed
(
1
),
Number
(
item
.
december
).
toFixed
(
1
),
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
Number
(
item
.
november
).
toFixed
(
1
),
formula
:
item
.
november_formula
}
:
Number
(
item
.
november
).
toFixed
(
1
),
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
Number
(
item
.
december
).
toFixed
(
1
),
formula
:
item
.
december_formula
}
:
Number
(
item
.
december
).
toFixed
(
1
),
Number
(
item
.
total_current_year
).
toFixed
(
1
),
item
.
orders
,
item
.
condition_it_should_be
,
...
...
@@ -466,8 +466,8 @@ export default class BalanceSheetOLPA extends Component {
august
:
i
[
0
]
===
3
&&
i
[
14
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
)),
september
:
i
[
0
]
===
3
&&
i
[
15
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)),
october
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
november
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
december
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
november
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0.0"
:
(
i
[
0
]
===
5
||
i
[
0
]
===
6
||
i
[
0
]
===
7
?
String
(
Number
(
i
[
17
].
value
).
toFixed
(
1
))
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)
)),
december
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0.0"
:
(
i
[
0
]
===
5
||
i
[
0
]
===
6
||
i
[
0
]
===
7
?
String
(
Number
(
i
[
17
].
value
).
toFixed
(
1
))
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)
)),
total_current_year
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
})
})
...
...
@@ -692,16 +692,16 @@ export default class BalanceSheetOLPA extends Component {
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
// console.log(valuezz)
}
//
} else {
//
//
console.log(baru);
//
//
console.log(value);
//
let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
//
//
console.log(indexID)
//
if (indexID !== -1) {
//
// console.log(value.formula[indexID].value)
//
let valuezz = value.formula[indexID].value
//
anjay.push(valuezz == "" ? 0 : valuezz)
//
}
}
else
{
// console.log(baru);
// console.log(value);
let
indexID
=
value
.
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
))
// console.log(indexID)
if
(
indexID
!==
-
1
)
{
// console.log(value.formula[indexID].value)
let
valuezz
=
value
.
formula
[
indexID
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
}
else
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
''
)
...
...
@@ -738,7 +738,11 @@ export default class BalanceSheetOLPA extends Component {
})
// console.log(baru)
// console.log(anjay)
// if (tableMeta.rowData[5] == 'Profit (loss) MTD') {
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
// }
let
total
=
0
let
opt
=
""
anjay
.
map
((
item
,
index
)
=>
{
...
...
@@ -1675,8 +1679,7 @@ export default class BalanceSheetOLPA extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
value
=
{
Number
(
handleForecast
(
tableMeta
,
`
${
Number
(
this
.
props
.
periode
)}
`
,
19
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
...
...
@@ -1686,8 +1689,7 @@ export default class BalanceSheetOLPA extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
value
=
{
Number
(
handleForecast
(
tableMeta
,
`
${
Number
(
this
.
props
.
periode
)}
`
,
19
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
...
...
src/container/OutlookPA/CorporateAnnualTargetOLPA.js
View file @
4fee691b
This diff is collapsed.
Click to expand it.
src/container/RollingOutlook.js
View file @
4fee691b
...
...
@@ -265,7 +265,7 @@ export default class RollingOutlook extends Component {
item
.
number
,
item
.
report_name
,
item
.
revision
,
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
this
.
state
.
quarter
.
value
==
'q1'
&&
!
this
.
state
.
isApprovedMB
?
"CLOSED"
:
(
this
.
state
.
quarter
.
value
!=
'q1'
&&
!
this
.
state
.
isApprovedRO
?
"CLOSED"
:
(
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
))
,
item
.
report_id
,
// Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload,
item
.
report_name
===
"Cash Flow"
?
item
.
is_can_upload
:
(
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
),
...
...
@@ -540,7 +540,11 @@ export default class RollingOutlook extends Component {
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
,
loading
:
false
,
lastRevision
:
response
.
data
.
data
.
last_revision
,
btnApprove
:
response
.
data
.
data
.
is_submit
btnApprove
:
response
.
data
.
data
.
is_submit
,
isApprovedMB
:
response
.
data
.
data
.
is_approved_master_budget
,
isApprovedRO
:
response
.
data
.
data
.
is_approved_rolling_before
,
msgApproveMB
:
response
.
data
.
data
.
message_approval_master_budget
,
msgApproveRO
:
response
.
data
.
data
.
message_approval_rolling_outlook
},
()
=>
{
console
.
log
(
this
.
state
.
lastStatus
);
this
.
historyApproval
()
...
...
@@ -1768,6 +1772,16 @@ export default class RollingOutlook extends Component {
<
/div
>
)}
<
/div
>
{
this
.
state
.
quarter
!=
null
&&
this
.
state
.
quarter
.
value
==
'q1'
&&
this
.
state
.
isApprovedMB
===
false
&&
(
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
this
.
state
.
msgApproveMB
}
<
/span
>
<
/div
>
)}
{
this
.
state
.
quarter
!=
null
&&
this
.
state
.
quarter
.
value
!=
'q1'
&&
this
.
state
.
isApprovedRO
===
false
&&
(
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
this
.
state
.
msgApproveRO
}
<
/span
>
<
/div
>
)}
{
this
.
state
.
checkApprover
===
true
?
this
.
state
.
lastStatus
===
'WAITING FOR REVIEW'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
...
...
@@ -1775,7 +1789,16 @@ export default class RollingOutlook extends Component {
<
/div> : this.state.lastStatus === 'WAITING FOR YOUR APPROVAL'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
this
.
state
.
lastStatus
}
<
/span
>
<
/div> : nul
l
<
/div> : this.state.lastStatus === 'WAITING FOR APPROVAL'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
`
${
this
.
state
.
lastStatus
}
-
${
this
.
state
.
pic
}
`
}
<
/span
>
<
/div> : this.state.lastStatus === 'REVISION'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
this
.
state
.
textRevision
}
<
/span
>
<
/div> : this.state.lastStatus === 'APPROVED'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
`
${
this
.
state
.
lastStatus
}
`
}
<
/span
>
<
/div> : nul
l
:
this
.
state
.
lastStatus
===
'SUBMITTED'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
...
...
@@ -2008,6 +2031,7 @@ export default class RollingOutlook extends Component {
quarter
=
{
this
.
state
.
quarter
.
value
}
isApprover
=
{
this
.
state
.
isApprover
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
PLBSFAMSubmitted
=
{
this
.
state
.
lastStatus
==
'APPROVED'
?
true
:
false
}
/
>
)}
...
...
src/container/RollingOutlook/BalanceSheetRO.js
View file @
4fee691b
...
...
@@ -2289,7 +2289,7 @@ export default class BalanceSheetRO extends Component {
}
}
},
{
name
:
`
${
this
.
props
.
periode
}
Total Outlook`
,
name
:
`
31 Dec
${
this
.
props
.
periode
}
Total Outlook`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#1c71b8'
,
width
:
96
,
borderRight
:
'1px #fff solid'
}}
>
...
...
src/container/RollingOutlook/CashFlowRO.js
View file @
4fee691b
...
...
@@ -388,6 +388,7 @@ export default class CashFlow extends Component {
const
handleValueFormula
=
(
value
,
tableMeta
,
column
,
periode
,
forecast
)
=>
{
// console.log(tableMeta.rowData[5])
// console.log(column)
loading
=
true
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
/
([
()@
])
/
)
let
baru
=
[]
...
...
@@ -466,25 +467,26 @@ export default class CashFlow extends Component {
anjay
.
push
(
forecastt
)
}
else
{
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
''
)
let
data
=
column
==
7
?
18
:
column
-
1
let
period
=
data
==
18
?
Number
(
this
.
props
.
periode
)
-
1
:
this
.
props
.
periode
let
indexID
=
tableMeta
.
rowData
[
data
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
)
&&
val
.
periode
==
period
)
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
'[M1]'
)
// let data = column == 7 ? 18 : column - 1
// let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode
// console.log(tst)
let
indexID
=
tableMeta
.
rowData
[
column
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
))
if
(
indexID
!==
-
1
)
{
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
if
(
tableMeta
.
rowData
[
5
]
==
"Cash at the beginning period"
&&
column
!=
7
)
{
// console.log(data)
// console.log(dataTable2[tableMeta.rowIndex+1][5])
// console.log(dataTable2[tableMeta.rowIndex+1][data])
// console.log(dataTable2[tableMeta.rowIndex-1][data].value)
// console.log(dataTable2[tableMeta.rowIndex][data].value)
// console.log(dataTable2[tableMeta.rowIndex+1][data].value)
let
valuezzz
=
dataTable2
[
tableMeta
.
rowIndex
+
1
][
data
].
value
anjay
.
push
(
valuezzz
==
""
?
0
:
valuezzz
)
}
else
{
let
valuezz
=
tableMeta
.
rowData
[
column
].
formula
[
indexID
].
value
// if (tableMeta.rowData[5] == "Cash at the beginning period" && column == 9) {
// console.log(data)
// console.log(dataTable2[tableMeta.rowIndex+1][5])
// console.log(dataTable2[tableMeta.rowIndex+1][data])
// console.log(dataTable2[tableMeta.rowIndex-1][data].value)
// console.log(dataTable2[tableMeta.rowIndex][data].value)
// console.log(dataTable2[tableMeta.rowIndex+1][data].value)
// let valuezzz = dataTable2[tableMeta.rowIndex + 1][data].value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
// } else {
// anjay.push(valuezz == "" ? 0 : valuezz)
// }
}
}
}
else
{
...
...
@@ -504,10 +506,10 @@ export default class CashFlow extends Component {
}
}
}
else
{
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
22
]
==
item
)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
18
]
==
item
)
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
indexID
][
column
].
value
==
undefined
?
dataTable2
[
indexID
][
column
]
:
dataTable2
[
indexID
][
column
].
value
if
(
item
==
dataTable2
[
tableMeta
.
rowIndex
][
22
])
{
if
(
item
==
dataTable2
[
tableMeta
.
rowIndex
][
18
])
{
anjay
.
push
(
0
)
}
else
{
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
...
...
@@ -517,6 +519,7 @@ export default class CashFlow extends Component {
anjay
.
push
(
-
1
)
}
}
}
}
})
...
...
@@ -678,15 +681,23 @@ export default class CashFlow extends Component {
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
total
// if (column == 9 && tableMeta.rowData[1] == 3243762) {
// console.log(tableMeta.rowData)
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
// console.log(anjay2)
// console.log(total)
// }
if
(
tableMeta
.
rowData
[
5
]
==
'2.1 Additional fixed assets and CIP'
&&
column
==
7
)
{
console
.
log
(
tableMeta
.
rowData
)
console
.
log
(
splitFormula
)
console
.
log
(
baru
)
console
.
log
(
anjay
)
console
.
log
(
anjay2
)
console
.
log
(
total
)
}
//
if (tableMeta.rowData[5] == '2.1 Additional fixed assets and CIP' && column == 7) {
//
console.log(tableMeta.rowData)
//
console.log(splitFormula)
//
console.log(baru)
//
console.log(anjay)
//
console.log(anjay2)
//
console.log(total)
//
}
if
(
dataTable2
[
tableMeta
.
rowIndex
][
column
].
value
==
undefined
)
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
total
...
...
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