openMF / community-app

This was the former default web application built on top of the Apache Fineract platform. It's now deprecated and replaced by the the Mifos X Web App (https://github.com/openMF/web-app maintained by the Mifos Initiative as a reference solution for financial inclusion. It is a Single-Page App (SPA) written in web standard technologies.
http://openmf.github.io/community-app/
Mozilla Public License 2.0
312 stars 1.02k forks source link

After the repayment recovery of written-off loan, the "recovery repayment" button is still available #2225

Open MexinaD opened 7 years ago

MexinaD commented 7 years ago

When you write-off the loan, the loan appear with the button for repayment recovery When you recover the repayment of the whole loan amount, the button should be removed. But for now, the button is still there which lead for a user to be able to do many recovery more than the loan amount

In the reskined recovery

In community-app recovery1

mauliksoneji commented 7 years ago

@mbj36 Please look into this issue

mauliksoneji commented 7 years ago

@botraunak Can you help?

gkrishnan724 commented 7 years ago

@MexinaD @santoshmath What should be there after the repayment has been recovered? Should the button be hidden?

santoshconflux commented 7 years ago

@gkrishnan724 , Yes 'Recovery Repayment' button should be hidden only after the required amount is recovered. Sometimes, recovery repayment is done in multiple times rather than one time. Hiding 'Recovery Repayment' should check whether all the amount is recovered or not.

edcable commented 4 years ago

@bharathcgowda can you confirm the behavior as noted by @santoshconflux

bharathcgowda commented 4 years ago

@edcable behavior is confirmed. loan example for reference https://staging.mifos.io/#/viewloanaccount/99

luckyman20 commented 4 years ago

@edcable I am taking up this issue. I have raised a ticket on Fineract to send the amount of payment recovered when the loan is written off.

I will send a Pull Request just after we get a patch in Fineract.

tonic889 commented 4 years ago

I would like to take this up on the fineract side.

luckyman20 commented 4 years ago

Sure @tonic889

tonic889 commented 4 years ago

@luckyman20 Why is there a fineract-side change required for this? It seems to me it should be possible to hide the button when the Current Balance is 0, correct? This could be done in ViewLoanDetailsController.js in the community app without any fineract side changes. Please correct me if I'm wrong.

bharathcgowda commented 4 years ago

Hi @tonic889 , when you do a write-off, the current balance and current outstanding will be 0. Hence we cannot use any of the existing fields. Besides the right logic is to verify the total "written off amount" with the "total recovered amount", when the "total recovered amount" becomes equal to the "total written off amount", then it makes operational sense to hide the "Recover" button.

image

tonic889 commented 4 years ago

Ah, yes. Ok, I will take it up soon.

luckyman20 commented 4 years ago

@tonic889 Let us know if you are still interested to take this up, I know I promised to work on this but I have been swamped with lot of work lately.

tonic889 commented 4 years ago

@luckyman20 Yes, I can take this up in the next few days.

tonic889 commented 4 years ago

@luckyman20 @bharathcgowda I need some clarification here. What I observed is that when I enter a recovery payment, the total written off is reduced by the recovery payment amount. Therefore, the logic stated earlier that the button should be hidden when total recovered >= total waived would not be correct. I believe the desired logic is the button should be hidden when the total written off amount = 0. Please let me know if you agree and I will make the change. Thanks.

Another thing I am wondering is whether the recovery payment screen itself should have some validation to ensure the user can not enter a recovery payment > the written off amount? It seems currently I can enter any amount for the recovery payment.

bharathcgowda commented 4 years ago

@tonic889 That sounds good to me Brian, we can go ahead with the proposed logic.

tonic889 commented 3 years ago

Community app PR #3310 and Fineract pull request #1356 submitted for this issue.