Skip to content

Commit

Permalink
Fix: Borrowers Last Debt (#612)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Marques <[email protected]>
  • Loading branch information
hugomarquesdev and Hugo Marques authored Oct 30, 2023
1 parent 9e94ea9 commit 8be0576
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/views/MicrocreditManager/RepaymentsTab/BorrowersList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,21 +220,15 @@ const getColumns = () => {
},
{
render: (data: any) => {
const currentDebt = data?.loan?.amount - data?.loan?.repaid;
const currentDebtRound = currentDebt < 0 ? 0 : currentDebt;
const currentDebt = data?.loan?.lastDebt || 0;
const progress =
((data?.loan?.amount - currentDebtRound) /
data?.loan?.amount) *
((data?.loan?.amount - currentDebt) / data?.loan?.amount) *
100;

return (
<>
<Text g900 small center style={{ textAlign: 'center' }}>
{currencyFormat(
currentDebtRound,
localeCurrency,
rates
)}
{currencyFormat(currentDebt, localeCurrency, rates)}
</Text>
<Box
flex
Expand Down

1 comment on commit 8be0576

@vercel
Copy link

@vercel vercel bot commented on 8be0576 Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

app – ./

app-git-production-ipct.vercel.app
app.impactmarket.com
app-ipct.vercel.app

Please sign in to comment.