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
20f2bb00
Commit
20f2bb00
authored
Jan 12, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apdet
parent
3ad69405
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
ListOfCreditFacilities.js
src/container/MonthlyReport/ListOfCreditFacilities.js
+22
-8
No files found.
src/container/MonthlyReport/ListOfCreditFacilities.js
View file @
20f2bb00
...
...
@@ -380,7 +380,7 @@ export default class ListOfCreditFacilities extends Component {
)
}
console
.
log
(
dataTable
)
this
.
setState
({
dataTable
,
loading
:
false
,
visibleLOCFMR
:
true
,
totalOutStand
:
0
,
diff
:
0
},
()
=>
{
this
.
setState
({
dataTable
,
loading
:
false
,
visibleLOCFMR
:
true
},
()
=>
{
this
.
handleCalculate
()
})
}
...
...
@@ -940,13 +940,17 @@ export default class ListOfCreditFacilities extends Component {
}
api
.
create
().
getPerBSiMontlyReportLOCF
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
this
.
state
.
get_for
==
'view'
)
{
this
.
setState
({
perBS
:
"0.0"
})
}
else
{
//
if (this.state.get_for == 'view') {
//
this.setState({perBS: "0.0"})
//
} else {
if
(
response
.
data
.
status
==
"success"
)
{
this
.
setState
({
perBS
:
response
.
data
.
data
.
per_bs
==
null
||
response
.
data
.
data
.
per_bs
==
''
?
Number
(
0
).
toFixed
(
1
)
:
Number
(
response
.
data
.
data
.
per_bs
).
toFixed
(
1
)})
}
this
.
setState
({
perBS
:
response
.
data
.
data
.
per_bs
==
null
||
response
.
data
.
data
.
per_bs
==
''
?
Number
(
0
).
toFixed
(
1
)
:
Number
(
response
.
data
.
data
.
per_bs
).
toFixed
(
1
),
totalOutStand
:
response
.
data
.
data
.
total_loan
,
diff
:
response
.
data
.
data
.
diff
})
}
// }
})
}
...
...
@@ -1365,12 +1369,22 @@ export default class ListOfCreditFacilities extends Component {
// console.log(dataTampungBank)
console
.
log
(
totalLoan
);
console
.
log
(
this
.
state
.
perBS
)
console
.
log
(
this
.
state
.
diff
)
// console.log(bankNameEmpty)
// dataTable: newData, totalOutStand: newData[newData.length-1][22]
if
(
bankNameEmpty
)
{
this
.
setState
({
loading
:
false
,
dataTable
:
this
.
state
.
dataTable
,
totalOutStand
:
0
,
diff
:
Number
(
0
-
this
.
state
.
perBS
).
toFixed
(
1
),
saveDraft
:
false
,
saveComp
:
true
})
if
(
this
.
state
.
get_for
==
'view'
)
{
this
.
setState
({
loading
:
false
,
dataTable
:
this
.
state
.
dataTable
,
diff
:
this
.
state
.
diff
==
null
?
"0.0"
:
Number
(
0
-
this
.
state
.
perBS
).
toFixed
(
1
),
perBS
:
this
.
state
.
totalOutStand
==
null
?
"0.0"
:
this
.
state
.
totalOutStand
,
saveDraft
:
false
,
saveComp
:
true
})
}
else
{
this
.
setState
({
loading
:
false
,
dataTable
:
this
.
state
.
dataTable
,
diff
:
Number
(
0
-
this
.
state
.
perBS
).
toFixed
(
1
),
saveDraft
:
false
,
saveComp
:
true
})
}
}
else
{
this
.
setState
({
loading
:
false
,
dataTable
:
newData
,
totalOutStand
:
Number
(
totalLoan
).
toFixed
(
1
),
diff
:
Number
(
totalLoan
-
this
.
state
.
perBS
).
toFixed
(
1
),
saveDraft
:
false
,
saveComp
:
Number
(
totalLoan
-
this
.
state
.
perBS
)
==
0
?
false
:
true
})
if
(
this
.
state
.
get_for
==
'view'
)
{
this
.
setState
({
loading
:
false
,
dataTable
:
newData
,
diff
:
this
.
state
.
diff
==
null
?
"0.0"
:
Number
(
totalLoan
-
this
.
state
.
perBS
).
toFixed
(
1
),
perBS
:
this
.
state
.
totalOutStand
==
null
?
"0.0"
:
this
.
state
.
totalOutStand
})
}
else
{
this
.
setState
({
loading
:
false
,
dataTable
:
newData
,
diff
:
Number
(
totalLoan
-
this
.
state
.
perBS
).
toFixed
(
1
),
saveDraft
:
false
,
saveComp
:
Number
(
totalLoan
-
this
.
state
.
perBS
)
==
0
?
false
:
true
})
}
}
},
100
);
})
...
...
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