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
500da2f9
Commit
500da2f9
authored
Dec 07, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
++
parent
997fb4ce
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
300 additions
and
217 deletions
+300
-217
BudgetTahunan.js
src/container/BudgetTahunan.js
+34
-5
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+239
-203
CashFlowMR.js
src/container/MonthlyReport/CashFlowMR.js
+14
-5
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+13
-4
No files found.
src/container/BudgetTahunan.js
View file @
500da2f9
...
@@ -83,12 +83,41 @@ export default class BudgetTahunan extends Component {
...
@@ -83,12 +83,41 @@ export default class BudgetTahunan extends Component {
if
(
this
.
props
.
location
.
state
!==
undefined
)
{
if
(
this
.
props
.
location
.
state
!==
undefined
)
{
// // console.log(this.props);
// // console.log(this.props);
this
.
setState
({
userType
:
this
.
props
.
location
.
state
.
userType
,
intent
:
'Home'
,
lastPeriod
:
this
.
props
.
location
.
state
.
rawData
.
periode
,
rawData
:
this
.
props
.
location
.
state
.
rawData
},
()
=>
{
this
.
setState
({
userType
:
this
.
props
.
location
.
state
.
userType
,
intent
:
'Home'
,
lastPeriod
:
this
.
props
.
location
.
state
.
rawData
.
periode
,
rawData
:
this
.
props
.
location
.
state
.
rawData
},
()
=>
{
this
.
checkApprover
()
this
.
getPermission
()
// this.checkApprover()
})
})
}
else
{
}
else
{
this
.
checkApprover
()
this
.
getPermission
()
// this.checkApprover()
}
}
}
}
getPermission
()
{
let
payload
=
{
menu
:
"Master Budget & CAT"
}
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
btncreate
:
response
.
data
.
data
.
create
,
btnedit
:
response
.
data
.
data
.
edit
,
btndelete
:
response
.
data
.
data
.
delete
,
// load: true
},
()
=>
{
this
.
checkApprover
()
})
}
else
{
this
.
setState
({
// load: true
})
}
}
else
{
this
.
setState
({
load
:
true
})
}
})
}
getRole
(
id
)
{
getRole
(
id
)
{
api
.
create
().
getDetailRole
(
id
).
then
((
response
)
=>
{
api
.
create
().
getDetailRole
(
id
).
then
((
response
)
=>
{
...
@@ -473,10 +502,10 @@ export default class BudgetTahunan extends Component {
...
@@ -473,10 +502,10 @@ export default class BudgetTahunan extends Component {
this
.
getLatestPeriodSubmit
()
this
.
getLatestPeriodSubmit
()
api
.
create
().
checkApprover
().
then
(
response
=>
{
api
.
create
().
checkApprover
().
then
(
response
=>
{
// // console.log(response);
// // console.log(response);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
if
(
this
.
state
.
btncreate
===
true
&&
this
.
state
.
btnedit
===
true
)
{
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
})
}
else
{
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
})
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
})
}
else
{
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
})
}
}
})
})
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
500da2f9
...
@@ -48,13 +48,46 @@ export default class BalanceSheetMR extends Component {
...
@@ -48,13 +48,46 @@ export default class BalanceSheetMR extends Component {
visibleBSMR
:
true
,
visibleBSMR
:
true
,
valueThreshold
:
0
,
valueThreshold
:
0
,
minValue
:
0
,
minValue
:
0
,
maxValue
:
0
maxValue
:
0
,
updateBy
:
'-'
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getSettingControl
()
this
.
getSettingControl
()
this
.
getLatestUpdate
()
}
getLatestUpdate
()
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
}
api
.
create
().
getLastestUpdateMB
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
updateBy
:
response
.
data
.
data
.
latest_update
===
null
?
'-'
:
response
.
data
.
data
.
latest_update
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
}
}
getSettingControl
()
{
getSettingControl
()
{
...
@@ -724,11 +757,11 @@ export default class BalanceSheetMR extends Component {
...
@@ -724,11 +757,11 @@ export default class BalanceSheetMR extends Component {
// // if (tableMeta.rowData[5] == "1.5 Other non-current assets") {
// // if (tableMeta.rowData[5] == "1.5 Other non-current assets") {
// // if (forecast !== undefined) {
// // if (forecast !== undefined) {
// // if (String(tableMeta.rowData[5]) == "Depreciation & amortisation") {
// // if (String(tableMeta.rowData[5]) == "Depreciation & amortisation") {
// console.log(splitFormula)
// console.log(splitFormula)
// console.log(baru)
// console.log(baru)
// console.log(anjay)
// console.log(anjay)
// console.log(anjay2)
// console.log(anjay2)
// console.log(total)
// console.log(total)
// // console.log(dataTable2[tableMeta.rowIndex])
// // console.log(dataTable2[tableMeta.rowIndex])
// // }
// // }
// // }
// // }
...
@@ -809,7 +842,7 @@ export default class BalanceSheetMR extends Component {
...
@@ -809,7 +842,7 @@ export default class BalanceSheetMR extends Component {
}
}
},
},
{
{
name
:
"Rolling Outlook (FY2021)"
,
name
:
`Rolling Outlook (FY
${
this
.
props
.
periode
}
)`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#07a7d0'
,
width
:
96
,
borderLeft
:
'1px #fff solid'
,
borderRight
:
'1px #fff solid'
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#07a7d0'
,
width
:
96
,
borderLeft
:
'1px #fff solid'
,
borderRight
:
'1px #fff solid'
}}
>
...
@@ -837,19 +870,19 @@ export default class BalanceSheetMR extends Component {
...
@@ -837,19 +870,19 @@ export default class BalanceSheetMR extends Component {
name
:
`Month To Date (MTD)`
,
name
:
`Month To Date (MTD)`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
color
:
'#fff'
,
backgroundColor
:
'#1c71b8
'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff
'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
{
/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
{
/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */
}
</TableCell> */
}
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
43
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
40
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-3x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"grid grid-3x"
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
45
}}
>
<
span
>
{
"Master Budget (MB)"
}
<
/span
>
<
span
>
{
"Master Budget (MB)"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
45
}}
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
backgroundColor
:
'#37b5e6'
,
height
:
'100%'
,
display
:
'grid'
,
alignContent
:
'center'
}}
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
45
}}
>
<
span
>
{
"Actual"
}
<
/span
>
<
span
>
{
"Actual"
}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -881,39 +914,39 @@ export default class BalanceSheetMR extends Component {
...
@@ -881,39 +914,39 @@ export default class BalanceSheetMR extends Component {
value
=
{
Number
(
handleValue
(
tableMeta
,
0
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
(
tableMeta
,
0
)).
toFixed
(
1
)}
/
>
/
>
<
/span>
:
<
/span>
:
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
val
}
value
=
{
val
}
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValueFormula
(
tableMeta
,
7
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValueFormula
(
tableMeta
,
7
)).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
<
/div>
:
<
/div>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
val
}
value
=
{
val
}
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
7
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
7
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -932,39 +965,39 @@ export default class BalanceSheetMR extends Component {
...
@@ -932,39 +965,39 @@ export default class BalanceSheetMR extends Component {
value
=
{
Number
(
handleValue
(
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
(
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
/
>
<
/span>
:
<
/span>
:
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
val
}
value
=
{
val
}
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValueFormula
(
tableMeta
,
8
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValueFormula
(
tableMeta
,
8
)).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
<
/div>
:
<
/div>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
val
}
value
=
{
val
}
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
8
]).
toFixed
(
1
)}
value
=
{
Number
(
tableMeta
.
rowData
[
8
]).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -992,34 +1025,7 @@ export default class BalanceSheetMR extends Component {
...
@@ -992,34 +1025,7 @@ export default class BalanceSheetMR extends Component {
}
}
/
>
/
>
<
/div>
:
<
/div>
:
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValueFormula
(
tableMeta
,
9
)).
toFixed
(
1
)}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
,
2
)).
toFixed
(
1
)}
/
>
<
/span>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -1031,11 +1037,38 @@ export default class BalanceSheetMR extends Component {
...
@@ -1031,11 +1037,38 @@ export default class BalanceSheetMR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
9
]
).
toFixed
(
1
)}
value
=
{
Number
(
handleValueFormula
(
tableMeta
,
9
)
).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
,
2
)).
toFixed
(
1
)}
/
>
<
/span>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
9
]).
toFixed
(
1
)}
/
>
}
/
>
<
/div
>
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -1713,103 +1746,106 @@ export default class BalanceSheetMR extends Component {
...
@@ -1713,103 +1746,106 @@ export default class BalanceSheetMR extends Component {
<
/MuiThemeProvider
>
<
/MuiThemeProvider
>
)}
)}
<
/div
>
<
/div
>
{
/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
20
}}
>
Last
Updated
by
:
{
this
.
state
.
updateBy
}
<
/Typography
>
<
/div
>
{
/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(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') ? */
}
(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') ? */
}
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"grid grid-2x"
style
=
{{
padding
:
20
}}
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
>
<
button
<
button
type
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
this
.
setState
({
loading
:
false
})
// this.handleValidate()
},
100
);
},
100
);
})}
})
style
=
{{
}}
backgroundColor
:
'transparent'
,
>
cursor
:
'pointer'
,
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
borderColor
:
'transparent'
,
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
outline
:
'none'
<
/div
>
}}
<
/button
>
>
<
button
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
className
=
"button"
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
type
=
"button"
<
/div
>
style
=
{{
<
/button
>
backgroundColor
:
'transparent'
,
<
/div
>
cursor
:
this
.
state
.
saveDraft
!==
true
?
'pointer'
:
'default'
,
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
borderColor
:
'transparent'
,
<
button
outline
:
'none'
,
className
=
"button"
marginRight
:
20
type
=
"button"
}}
style
=
{{
onClick
=
{()
=>
backgroundColor
:
'transparent'
,
this
.
state
.
saveDraft
===
true
?
cursor
:
'pointer'
,
null
:
borderColor
:
'transparent'
,
this
.
state
.
handleTekTekTek
==
1
?
null
:
outline
:
'none'
,
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
marginRight
:
20
this
.
backToMonthlyReport
(
'draft'
)
}}
})
onClick
=
{()
=>
{
}
this
.
setState
({
loading
:
true
},
()
=>
{
>
setTimeout
(()
=>
{
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
this
.
setState
({
loading
:
false
})
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
// this.handleValidate()
<
/div
>
},
100
);
<
/button
>
})
<
button
}}
type
=
"button"
>
// disabled={this.state.buttonError}
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
onClick
=
{()
=>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
this
.
state
.
buttonError
?
<
/div
>
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
<
/button
>
:
<
button
this
.
state
.
handleTekTekTek
==
1
?
null
:
className
=
"button"
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
type
=
"button"
this
.
backToMonthlyReport
(
'submitted'
)
style
=
{{
})}
backgroundColor
:
'transparent'
,
style
=
{{
cursor
:
this
.
state
.
saveDraft
!==
true
?
'pointer'
:
'default'
,
backgroundColor
:
'transparent'
,
borderColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
outline
:
'none'
,
borderColor
:
'transparent'
,
marginRight
:
20
outline
:
'none'
,
}}
}}
onClick
=
{()
=>
>
this
.
state
.
saveDraft
===
true
?
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
null
:
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
this
.
state
.
handleTekTekTek
==
1
?
null
:
<
/div
>
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
<
/button
>
this
.
backToMonthlyReport
(
'draft'
)
})
}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backToMonthlyReport
(
'submitted'
)
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
{
/* : null
} */
}
<
/div
>
<
/div
>
{
/* : null
} */
}
<
/Paper>
:
<
/Paper>
:
<
Paper
style
=
{{
paddingTop
:
10
}}
>
<
Paper
style
=
{{
paddingTop
:
10
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
...
...
src/container/MonthlyReport/CashFlowMR.js
View file @
500da2f9
...
@@ -161,11 +161,10 @@ export default class CashFlowMR extends Component {
...
@@ -161,11 +161,10 @@ export default class CashFlowMR extends Component {
})
})
anjay
.
push
(
forecastt
)
anjay
.
push
(
forecastt
)
}
else
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
}
else
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
''
)
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
'[M1]'
)
let
data
=
tableMeta
.
columnIndex
==
7
?
18
:
tableMeta
.
columnIndex
-
1
let
data
=
tableMeta
.
columnIndex
let
period
=
data
==
18
?
Number
(
this
.
props
.
periode
)
-
1
:
this
.
props
.
periode
// console.log(tableMeta.columnIndex)
// console.log(tableMeta.columnIndex)
let
indexID
=
tableMeta
.
rowData
[
data
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
)
&&
val
.
periode
==
period
)
let
indexID
=
tableMeta
.
rowData
[
data
].
actual_formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
)
)
// console.log(indexID)
// console.log(indexID)
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
...
@@ -361,7 +360,17 @@ export default class CashFlowMR extends Component {
...
@@ -361,7 +360,17 @@ export default class CashFlowMR extends Component {
console
.
log
(
tableMeta
);
console
.
log
(
tableMeta
);
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
null
}
{
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
||
tableMeta
.
rowData
[
0
]
===
7
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValueFormula
(
value
,
tableMeta
,
2
)).
toFixed
(
1
)}
/
>
<
/span> : null
}
<
/div
>
<
/div
>
)
)
}
}
...
...
src/container/MonthlyReport/FixedAssetsMovementMR.js
View file @
500da2f9
...
@@ -402,13 +402,17 @@ export default class FixedAssetsMovementMR extends Component {
...
@@ -402,13 +402,17 @@ export default class FixedAssetsMovementMR extends Component {
}
else
{
}
else
{
if
(
String
(
item
).
includes
(
'#'
))
{
if
(
String
(
item
).
includes
(
'#'
))
{
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
''
)
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
'[M1]'
)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
17
]
==
tst
)
// console.log(dataTable2[tableMeta.rowIndex]);
// console.log(indexID);
// console.log(tableMeta);
// console.log(tst);
let
indexID
=
dataTable2
[
tableMeta
.
rowIndex
][
16
].
findIndex
((
val
)
=>
val
.
item_formula
==
tst
)
console
.
log
(
indexID
);
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
indexID
][
8
]
let
valuezz
=
dataTable2
[
tableMeta
.
rowIndex
][
16
][
indexID
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
// console.log(valuezz);
}
}
}
else
{
}
else
{
let
data
=
tableMeta
.
rowData
[
16
]
let
data
=
tableMeta
.
rowData
[
16
]
...
@@ -1183,6 +1187,11 @@ export default class FixedAssetsMovementMR extends Component {
...
@@ -1183,6 +1187,11 @@ export default class FixedAssetsMovementMR extends Component {
options
:
{
options
:
{
display
:
false
display
:
false
}
}
},
{
name
:
""
,
options
:
{
display
:
false
}
}]
}]
const
loadingComponent
=
(
const
loadingComponent
=
(
...
...
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