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
f34aabde
Commit
f34aabde
authored
May 19, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue Prod
parent
2f6783e7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
33 deletions
+39
-33
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+31
-22
BalanceSheetRO.js
src/container/RollingOutlook/BalanceSheetRO.js
+8
-11
No files found.
src/container/BudgetTahunan/BudgetTahunan.js
View file @
f34aabde
...
@@ -96,7 +96,18 @@ export default class BudgetTahunan extends Component {
...
@@ -96,7 +96,18 @@ export default class BudgetTahunan extends Component {
isCheckAll
:
false
,
isCheckAll
:
false
,
downloadedFileReportId
:
null
,
downloadedFileReportId
:
null
,
arrayReport
:
[],
arrayReport
:
[],
popupDownload
:
false
popupDownload
:
false
,
currency
:
null
,
dataCurrency
:
[
{
"id"
:
1
,
"value"
:
"IDR"
},
{
"id"
:
2
,
"value"
:
"USD"
,
}
]
}
}
this
.
myRef
=
React
.
createRef
()
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -2877,8 +2888,8 @@ export default class BudgetTahunan extends Component {
...
@@ -2877,8 +2888,8 @@ export default class BudgetTahunan extends Component {
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
"flex"
}}
>
<
div
style
=
{{
display
:
"flex"
}}
>
<
div
style
=
{{
marginRight
:
50
}}
>
<
div
style
=
{{
marginRight
:
50
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listPeriode
}
{...
this
.
state
.
listPeriode
}
id
=
"periode"
id
=
"periode"
...
@@ -2899,27 +2910,25 @@ export default class BudgetTahunan extends Component {
...
@@ -2899,27 +2910,25 @@ export default class BudgetTahunan extends Component {
value
=
{
this
.
state
.
periode
}
value
=
{
this
.
state
.
periode
}
/
>
/
>
<
/div
>
<
/div
>
{
/* <div
>
<
div
style
=
{{
width
:
'20%'
,
marginTop
:
12
}}
>
<
Autocomplete
<
Autocomplete
{...this.state.listPeriode}
options
=
{
this
.
state
.
dataCurrency
}
id="currency"
getOptionLabel
=
{(
option
)
=>
option
.
value
}
onChange={(event, newInputValue) => this.setState({ periode: newInputValue }, () => {
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
currency
:
newInputValue
})}
if (this.state.isApprover === true) {
renderInput
=
{(
params
)
=>
(
this.getCompanySubmitted()
<
TextField
} else {
{...
params
}
this.setState({ visibleTableHistory: false })
variant
=
"standard"
this.getRevision()
label
=
"Currency"
}
margin
=
"normal"
})}
style
=
{{
marginTop
:
0
}}
disabled={this.state.intent === 'Home' ? true : false}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
disableClearable
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
style={{ width: 250 }}
renderInput={(params) =>
<TextField {...params} label="Currency" margin="normal" style={{ marginTop: 7 }}
/>}
value={this.state.periode}
/
>
/
>
</div> */
}
)}
value
=
{
this
.
state
.
currency
==
null
?
"IDR"
:
this
.
state
.
currency
}
/
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
div
style
=
{{
marginTop
:
20
}}
>
...
...
src/container/RollingOutlook/BalanceSheetRO.js
View file @
f34aabde
...
@@ -218,7 +218,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -218,7 +218,7 @@ export default class BalanceSheetRO extends Component {
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
balance_sheet
.
october
,
formula
:
item
.
balance_sheet
.
october_formula
}
:
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
balance_sheet
.
october
,
formula
:
item
.
balance_sheet
.
october_formula
}
:
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
balance_sheet
.
november
,
formula
:
item
.
balance_sheet
.
november_formula
}
:
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
balance_sheet
.
november
,
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
?
{
value
:
item
.
balance_sheet
.
december
,
formula
:
item
.
balance_sheet
.
december_formula
}
:
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
?
{
value
:
item
.
balance_sheet
.
december
,
formula
:
item
.
balance_sheet
.
december_formula
}
:
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
item
.
balance_sheet
.
total_current_year
===
""
?
"0"
:
item
.
balance_sheet
.
total_current_year
,
item
.
balance_sheet
.
total_current_year
===
""
?
"0"
:
Number
(
item
.
balance_sheet
.
total_current_year
).
toFixed
(
1
)
,
item
.
order
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
condition_if_wrong
,
...
@@ -254,7 +254,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -254,7 +254,7 @@ export default class BalanceSheetRO extends Component {
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
balance_sheet
.
october
,
formula
:
item
.
balance_sheet
.
october_formula
}
:
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
balance_sheet
.
october
,
formula
:
item
.
balance_sheet
.
october_formula
}
:
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
balance_sheet
.
november
,
formula
:
item
.
balance_sheet
.
november_formula
}
:
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
this
.
props
.
status
===
'CLOSED'
?
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
)
:
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
balance_sheet
.
november
,
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
?
{
value
:
item
.
balance_sheet
.
december
,
formula
:
item
.
balance_sheet
.
december_formula
}
:
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
?
{
value
:
item
.
balance_sheet
.
december
,
formula
:
item
.
balance_sheet
.
december_formula
}
:
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
item
.
balance_sheet
.
total_current_year
===
""
?
"0"
:
item
.
balance_sheet
.
total_current_year
,
item
.
balance_sheet
.
total_current_year
===
""
?
"0"
:
Number
(
item
.
balance_sheet
.
total_current_year
).
toFixed
(
1
)
,
item
.
order
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
condition_if_wrong
,
...
@@ -466,7 +466,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -466,7 +466,7 @@ export default class BalanceSheetRO extends Component {
}
}
else
{
else
{
let
isi
=
resp
.
rows
.
slice
(
3
)
let
isi
=
resp
.
rows
.
slice
(
3
)
// console.log(resp.rows[2]
);
console
.
log
(
isi
);
let
payload
=
[]
let
payload
=
[]
let
reg
=
/^
[
-+
]?(?:[
0-9
]
+,
)
*
[
0-9
]
+
(?:\.[
0-9
]
+
)?
$/
;
let
reg
=
/^
[
-+
]?(?:[
0-9
]
+,
)
*
[
0-9
]
+
(?:\.[
0-9
]
+
)?
$/
;
isi
.
map
((
i
,
index
)
=>
{
isi
.
map
((
i
,
index
)
=>
{
...
@@ -491,6 +491,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -491,6 +491,7 @@ export default class BalanceSheetRO extends Component {
})
})
}
}
})
})
console
.
log
(
payload
);
let
body
=
{
let
body
=
{
company_id
:
this
.
props
.
company
.
company_id
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
periode
:
this
.
props
.
periode
,
...
@@ -509,7 +510,6 @@ export default class BalanceSheetRO extends Component {
...
@@ -509,7 +510,6 @@ export default class BalanceSheetRO extends Component {
checkUpload
()
{
checkUpload
()
{
api
.
create
().
checkImportRollingOutlookBS
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkImportRollingOutlookBS
(
this
.
state
.
payload
).
then
(
response
=>
{
this
.
props
.
refresh
()
this
.
props
.
refresh
()
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visibleBSRO
:
false
,
loading
:
true
})
this
.
setState
({
visibleUpload
:
false
,
visibleBSRO
:
false
,
loading
:
true
})
...
@@ -540,7 +540,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -540,7 +540,7 @@ export default class BalanceSheetRO extends Component {
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
october
,
formula
:
item
.
october_formula
}
:
Number
(
item
.
october
).
toFixed
(
1
),
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
october
,
formula
:
item
.
october_formula
}
:
Number
(
item
.
october
).
toFixed
(
1
),
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
november
,
formula
:
item
.
november_formula
}
:
Number
(
item
.
november
).
toFixed
(
1
),
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
november
,
formula
:
item
.
november_formula
}
:
Number
(
item
.
november
).
toFixed
(
1
),
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
december
,
formula
:
item
.
december_formula
}
:
Number
(
item
.
december
).
toFixed
(
1
),
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
december
,
formula
:
item
.
december_formula
}
:
Number
(
item
.
december
).
toFixed
(
1
),
item
.
total_december_year
===
""
?
"0"
:
item
.
total_december_year
,
item
.
total_december_year
===
""
?
"0"
:
Number
(
item
.
total_december_year
).
toFixed
(
1
)
,
item
.
order
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
condition_if_wrong
,
...
@@ -549,12 +549,12 @@ export default class BalanceSheetRO extends Component {
...
@@ -549,12 +549,12 @@ export default class BalanceSheetRO extends Component {
})
})
console
.
log
(
dataTable
)
console
.
log
(
dataTable
)
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
true
,
isUpload
:
true
},
()
=>
{
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
true
,
isUpload
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
//
this.state.dataTable.map(item => {
// if (item[24].length > 0) {
// if (item[24].length > 0) {
// // console.log('masuk')
// // console.log('masuk')
// this.setState({ buttonError: true, errorPreview: true })
// this.setState({ buttonError: true, errorPreview: true })
// }
// }
})
//
})
// console.log(this.state.buttonError)
// console.log(this.state.buttonError)
})
})
}
}
...
@@ -668,9 +668,6 @@ export default class BalanceSheetRO extends Component {
...
@@ -668,9 +668,6 @@ export default class BalanceSheetRO extends Component {
const
handleValue
=
(
data
)
=>
{
const
handleValue
=
(
data
)
=>
{
let
total
=
0
let
total
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
dataTable2
.
map
((
item
,
index
)
=>
{
// if (data.rowData[5] == 'Retained Earnings') {
// console.log(item[data.columnIndex].value)
// }
if
(
data
.
rowData
[
1
]
===
item
[
2
])
{
if
(
data
.
rowData
[
1
]
===
item
[
2
])
{
let
itemVal
=
item
[
data
.
columnIndex
].
value
!==
undefined
?
Number
(
item
[
data
.
columnIndex
].
value
)
:
Number
(
item
[
data
.
columnIndex
])
let
itemVal
=
item
[
data
.
columnIndex
].
value
!==
undefined
?
Number
(
item
[
data
.
columnIndex
].
value
)
:
Number
(
item
[
data
.
columnIndex
])
total
=
item
[
data
.
columnIndex
]
===
undefined
?
Number
(
total
)
+
0
:
Number
(
total
)
+
itemVal
total
=
item
[
data
.
columnIndex
]
===
undefined
?
Number
(
total
)
+
0
:
Number
(
total
)
+
itemVal
...
...
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