Add ability to remove Fee which is not related to any Loan Account

Description

It would be good improve the way of managing the inactive fees.

Currently, when fee is attached to Loan Product and marked as inactive then it is displayed on View Loan Product page and after editing product, it disappears (bug ).

The proposition is to remove fee marked as inactive from all related Loan Products but display the following warning message on Review page:

"If you change the fee status to Inactive, then this fee will be automatically removed from these Loan Products:"

Another thing is that, when fee is not related to any active/closed Loan Accounts then it should be possible to remove it.

One solution to do that is to add check box on Review page - "This fee has never been used so it can be permanently removed from the system.". Check box should unchecked by default.

To sum up, there are 3 cases which should be properly handled:
1. Fee is not attached to any Loan Product and has never been used in any Loan account. In this case this fee can be reamoved from the system.
2. Fee is attached to Loan Product but has never used in any Loan account. In this case, warning message should be displayed that it will be removed from related Loan Products and also check box to remove.
3. Fee is attached to Loan Product and was used in any Loan account. In this case, warning message should be displayed that it will be removed from related Loan Products and there is no possibility to remove fee from the system.

Environment

None

Activity

Show:
Lukasz Chudy
June 13, 2012, 12:15 PM

Kamil,

Removing fee functionality works almost properly. However two things should fixed:
1. If you changing the status of any to inactive, then as it is written in description, warning message should be displayed: "If you change the fee status to Inactive, then this fee will be automatically removed from these Loan Products:" and all related loan products with that fee should be listed.
2. In 3 case, it is working good, but when fee was used in any loan accounts then after selecting 'remove' checkbox, warning message should be displayed that "This fee was used in Loan Account, so you can't remove it from the system.". In this case there should be only possible to mark fee as inactive.

Build Date: Tue Jun 12 02:13:03 PDT 2012
Build Number: hudson-head-i-release-archive-3

Łukasz Babski
June 18, 2012, 8:11 AM

Kamil,
I found problem which appears during changing fee status. Problem appears when choosing an Inactive fee from 'View Fees' page and trying to change fee status from Inactive to Active with checked 'remove' field. When clicking on 'Preview', validation message appears but, when I tried to uncheck 'Remove' field and click on 'Preview' validation message is still displayed and 'Remove' field is filled automatically.

Mifos Hudson Jira Plugin User
June 20, 2012, 3:41 PM

Integrated in

head-i-release-secondary #19
MIFOS-5429: Fixed checkbox problem, added warning messages, MIFOS-5428: fixed removing fee from products

Kamil Kalfas :
Files :

  • serviceInterfaces/src/main/java/org/mifos/application/admin/servicefacade/FeeServiceFacade.java

  • appdomain/src/main/java/org/mifos/accounts/fees/servicefacade/FeeServiceFacadeWebTier.java

  • appdomain/src/main/java/org/mifos/accounts/fees/business/service/FeeService.java

  • application/src/main/java/org/mifos/accounts/fees/struts/action/FeeAction.java

  • application/src/main/resources/org/mifos/config/localizedResources/FeesUIResources.properties

  • appdomain/src/main/java/org/mifos/accounts/fees/persistence/FeeDao.java

  • application/src/main/java/org/mifos/accounts/fees/struts/actionforms/FeeActionForm.java

  • appdomain/src/main/java/org/mifos/accounts/fees/persistence/FeeDaoHibernate.java

  • appdomain/src/main/java/org/mifos/accounts/fees/business/service/FeeServiceImpl.java

Kamil Kalfas
June 21, 2012, 7:45 AM

Fixed in commit: 657a6f875587b97efdda8abedefdf709e5977841

Build Number: head-i-release-commit-19

Łukasz Babski
June 26, 2012, 7:36 AM

Now it is OK. Improvement works properly.
Build Date: Thu Jun 21 23:46:39 PDT 2012
Build Number: hudson-head-i-release-archive-18

Assignee

Kamil Kalfas

Reporter

Lukasz Chudy

Labels

None

Implementation Priority

None

URL

None

Story Points

None

Team

Core

Scheduled For

None

Epic

None

productboard URL

None

Man Day Estimate

None

Components

Fix versions

Affects versions

Priority

Minor
Configure