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
b5b79350
Commit
b5b79350
authored
Nov 22, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calculate LOCF-LOV
parent
0930e0a2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
168 additions
and
2434 deletions
+168
-2434
LOCFMR.js
src/container/MonthlyReport/LOCFMR.js
+4
-4
LOVMR.js
src/container/MonthlyReport/LOVMR.js
+18
-12
ListOfCreditFacilitiesMR.js
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
+146
-2418
No files found.
src/container/MonthlyReport/LOCFMR.js
View file @
b5b79350
...
@@ -148,6 +148,9 @@ export default class LOCF extends Component {
...
@@ -148,6 +148,9 @@ export default class LOCF extends Component {
let
datas
=
array
[
array
.
length
-
1
]
let
datas
=
array
[
array
.
length
-
1
]
this
.
setState
({
dataTable
:
this
.
props
.
dataTablelocf
,
diff
:
datas
[
46
],
perBS
:
datas
[
48
]})
this
.
setState
({
dataTable
:
this
.
props
.
dataTablelocf
,
diff
:
datas
[
46
],
perBS
:
datas
[
48
]})
}
}
if
(
this
.
props
.
loadingChild
!==
prevProps
.
loadingChild
)
{
this
.
setState
({
loading
:
this
.
props
.
loadingChild
})
}
}
}
handleGetFor
(
type
)
{
handleGetFor
(
type
)
{
...
@@ -1562,7 +1565,7 @@ export default class LOCF extends Component {
...
@@ -1562,7 +1565,7 @@ export default class LOCF extends Component {
}
}
const
handleChange
=
(
value
,
tableMeta
,
column
,
typeChange
,
typeDrop
)
=>
{
const
handleChange
=
(
value
,
tableMeta
,
column
,
typeChange
,
typeDrop
)
=>
{
console
.
log
(
column
);
console
.
log
(
column
,
value
);
let
val
=
''
let
val
=
''
if
(
typeChange
==
'date'
)
{
if
(
typeChange
==
'date'
)
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
format
(
value
,
'yyyy-MM-dd'
)
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
format
(
value
,
'yyyy-MM-dd'
)
...
@@ -1578,9 +1581,6 @@ export default class LOCF extends Component {
...
@@ -1578,9 +1581,6 @@ export default class LOCF extends Component {
}
}
console
.
log
(
value
);
console
.
log
(
value
.
value
);
if
(
value
.
value
!==
undefined
)
{
if
(
value
.
value
!==
undefined
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
if
(
value
.
value
==
'Investment Loan'
)
{
if
(
value
.
value
==
'Investment Loan'
)
{
...
...
src/container/MonthlyReport/LOVMR.js
View file @
b5b79350
...
@@ -148,7 +148,10 @@ export default class LOV extends Component {
...
@@ -148,7 +148,10 @@ export default class LOV extends Component {
let
array
=
this
.
props
.
dataTablelov
let
array
=
this
.
props
.
dataTablelov
let
datas
=
array
[
array
.
length
-
1
]
let
datas
=
array
[
array
.
length
-
1
]
console
.
log
(
datas
);
console
.
log
(
datas
);
this
.
setState
({
dataTable
:
this
.
props
.
dataTablelov
})
this
.
setState
({
dataTable
:
this
.
props
.
dataTablelov
,
diff
:
datas
[
16
],
perBS
:
datas
[
18
]})
}
if
(
this
.
props
.
loadingChild
!==
prevProps
.
loadingChild
)
{
this
.
setState
({
loading
:
this
.
props
.
loadingChild
})
}
}
}
}
...
@@ -688,7 +691,7 @@ export default class LOV extends Component {
...
@@ -688,7 +691,7 @@ export default class LOV extends Component {
let
body
=
{
let
body
=
{
group
:
'INVESTMENT'
,
group
:
'INVESTMENT'
,
company_id
:
this
.
props
.
company
.
company_id
,
company_id
:
this
.
props
.
company
.
company_id
,
type
:
'TYPE_OF_INVEST
E
MENT'
,
type
:
'TYPE_OF_INVESTMENT'
,
currency_id
:
this
.
props
.
defaultCurrency
.
id
,
currency_id
:
this
.
props
.
defaultCurrency
.
id
,
}
}
this
.
setState
({
dataLoaded
:
false
})
this
.
setState
({
dataLoaded
:
false
})
...
@@ -734,7 +737,7 @@ export default class LOV extends Component {
...
@@ -734,7 +737,7 @@ export default class LOV extends Component {
downloadTemplate
=
async
()
=>
{
downloadTemplate
=
async
()
=>
{
let
res
=
await
fetch
(
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/lov/monthly_report/download_template?report_id=
${
this
.
props
.
report_id
}
&
&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&months=
${
this
.
props
.
month
.
month_id
}
&
¤cy_id=
${
this
.
props
.
defaultCurrency
.
id
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/lov/monthly_report/download_template?report_id=
${
this
.
props
.
report_id
}
&
company_id=
${
this
.
props
.
company
.
company_id
}
&year=
${
this
.
props
.
periode
}
&months=
${
this
.
props
.
month
.
month_id
}
¤cy_id=
${
this
.
props
.
defaultCurrency
.
id
}
`
)
)
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
// console.log(this.props.report_id)
// console.log(this.props.report_id)
...
@@ -1262,6 +1265,7 @@ export default class LOV extends Component {
...
@@ -1262,6 +1265,7 @@ export default class LOV extends Component {
}
}
const
handleChange
=
(
value
,
tableMeta
,
column
,
typeChange
,
typeDrop
)
=>
{
const
handleChange
=
(
value
,
tableMeta
,
column
,
typeChange
,
typeDrop
)
=>
{
console
.
log
(
column
,
value
);
let
val
=
''
let
val
=
''
if
(
typeChange
==
'date'
)
{
if
(
typeChange
==
'date'
)
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
format
(
value
,
'yyyy-MM-dd'
)
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
format
(
value
,
'yyyy-MM-dd'
)
...
@@ -1269,15 +1273,14 @@ export default class LOV extends Component {
...
@@ -1269,15 +1273,14 @@ export default class LOV extends Component {
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
})
})
}
else
{
}
else
{
console
.
log
(
value
);
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
value
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
value
// if (column != 6 && column != 11 && column != 18 && column != 25 && column != 27 && column != 29 && column != 31 && column != 33 && column != 36 && column != 39 && column != 42 && column != 4
5) {
if
(
column
!=
6
&&
column
!=
7
&&
column
!=
8
&&
column
!=
10
&&
column
!=
12
&&
column
!=
1
5
)
{
//
val = String(value).split(",").join("")
val
=
String
(
value
).
split
(
","
).
join
(
""
)
//
val = this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 2) : Number(val)
val
=
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
val
),
2
)
:
Number
(
val
)
//
} else {
}
else
{
//
val = String(value).split(",").join("")
val
=
String
(
value
).
split
(
","
).
join
(
""
)
//
}
}
if
(
value
.
value
!==
undefined
)
{
if
(
value
.
value
!==
undefined
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
...
@@ -1305,9 +1308,12 @@ export default class LOV extends Component {
...
@@ -1305,9 +1308,12 @@ export default class LOV extends Component {
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
value
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
value
}
else
{
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
val
ue
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
val
}
}
}
}
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
][
column
]);
console
.
log
(
value
)
console
.
log
(
String
(
value
).
split
(
","
).
join
(
""
))
}
}
const
handleValueDropDown
=
(
value
,
type
,
tableMeta
)
=>
{
const
handleValueDropDown
=
(
value
,
type
,
tableMeta
)
=>
{
...
@@ -1913,7 +1919,7 @@ export default class LOV extends Component {
...
@@ -1913,7 +1919,7 @@ export default class LOV extends Component {
disabled
=
{
this
.
props
.
get_for
==
'view'
}
disabled
=
{
this
.
props
.
get_for
==
'view'
}
value
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
tableMeta
.
rowData
[
13
]),
1
)
==
0.0
?
"0.0"
:
fixNumber
(
Number
(
tableMeta
.
rowData
[
13
]),
1
))
:
(
Number
(
tableMeta
.
rowData
[
13
])
==
0.0
?
"0.0"
:
Number
(
tableMeta
.
rowData
[
13
]))}
value
=
{
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
tableMeta
.
rowData
[
13
]),
1
)
==
0.0
?
"0.0"
:
fixNumber
(
Number
(
tableMeta
.
rowData
[
13
]),
1
))
:
(
Number
(
tableMeta
.
rowData
[
13
])
==
0.0
?
"0.0"
:
Number
(
tableMeta
.
rowData
[
13
]))}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
,
1
4
)
handleChange
(
event
.
target
.
value
,
tableMeta
,
1
3
)
}}
}}
/
>
/
>
...
...
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
View file @
b5b79350
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