From f1985ae180a4db0f981ec65c39e3ecc53308edb6 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Tue, 25 Feb 2025 17:34:04 +0100 Subject: [PATCH] decimal issue fixed --- src/components/loan_screen/LoanDetails.jsx | 6 +++--- src/components/loan_screen/LoanPin.jsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/loan_screen/LoanDetails.jsx b/src/components/loan_screen/LoanDetails.jsx index 46ff716..5d3afa6 100644 --- a/src/components/loan_screen/LoanDetails.jsx +++ b/src/components/loan_screen/LoanDetails.jsx @@ -11,9 +11,9 @@ export default function LoanDetails({step, handleStep, screens}) {

Loan Details

Loan Amount: ₦{step.details.typedAmount}

-

Interest 3%: ₦{step.details.typedAmount*0.03}

-

Mgt Fee 1%: ₦{step.details.typedAmount*0.01}

-

Insurance 1%: ₦{step.details.typedAmount*0.01}

+

Interest 3%: ₦{Math.round((step.details.typedAmount*0.03 + Number.EPSILON) * 100) / 100}

+

Mgt Fee 1%: ₦{Math.round((step.details.typedAmount*0.01 + Number.EPSILON) * 100) / 100}

+

Insurance 1%: ₦{Math.round((step.details.typedAmount*0.01 + Number.EPSILON) * 100) / 100}

diff --git a/src/components/loan_screen/LoanPin.jsx b/src/components/loan_screen/LoanPin.jsx index a2aa9d8..da46676 100644 --- a/src/components/loan_screen/LoanPin.jsx +++ b/src/components/loan_screen/LoanPin.jsx @@ -46,7 +46,7 @@ export default function LoanPin({step, handleStep, screens}) {

{`Your loan of ₦${step.details.typedAmount} would be set up. T&C's apply.`}

-