removing the same recurring fee twice before disbursement appears to remove the fee, but the fee shows up again after disbursement

Description

A recurring fee can be removed once before disbursal and it will not show up after disbursal. But if the same fee is added again and then removed again then when a loan is disbursed the fee still shows up in the loan schedule.

This can be reproduced on the e-release test server: http://ci.mifos.org:8116/mifos/

1) Use weekly meeting client: MyOffice1287530171831 / Kay's Monday Center / 103. Kenya Group / Test Client
2) create a new weekly loan using MyLoanProduct1287530192379
3) apply charge using the weekly fee "loanProcFee"
4) view repayment schedule
No Due date Date paid Principal Interest Fees Total
Future Installments
1 14-Feb-2011 - 181.8 1.2 24.0 207.0
2 21-Feb-2011 - 181.8 1.2 24.0 207.0
3 28-Feb-2011 - 181.8 1.2 24.0 207.0
4 07-Mar-2011 - 181.8 1.2 24.0 207.0
5 14-Mar-2011 - 181.8 1.2 24.0 207.0
6 21-Mar-2011 - 181.8 1.2 24.0 207.0
7 28-Mar-2011 - 181.8 1.2 24.0 207.0
8 04-Apr-2011 - 181.8 1.2 24.0 207.0
9 11-Apr-2011 - 181.8 1.2 24.0 207.0
10 18-Apr-2011 - 181.8 1.2 24.0 207.0
11 25-Apr-2011 - 182.0 1.0 24.0 207.0

5) click on the remove link next to the recurring loanProcFee and the fee should no longer be shown
6) view the repayment schedule:
No Due date Date paid Principal Interest Fees Total
Future Installments
1 14-Feb-2011 - 181.8 1.2 0.0 183.0
2 21-Feb-2011 - 181.8 1.2 0.0 183.0
3 28-Feb-2011 - 181.8 1.2 0.0 183.0
4 07-Mar-2011 - 181.8 1.2 0.0 183.0
5 14-Mar-2011 - 181.8 1.2 0.0 183.0
6 21-Mar-2011 - 181.8 1.2 0.0 183.0
7 28-Mar-2011 - 181.8 1.2 0.0 183.0
8 04-Apr-2011 - 181.8 1.2 0.0 183.0
9 11-Apr-2011 - 181.8 1.2 0.0 183.0
10 18-Apr-2011 - 181.8 1.2 0.0 183.0
11 25-Apr-2011 - 182.0 1.0 0.0 183.0

7) edit account status and approve the loan
8) disburse the loan
9) note that "recurring account fees" shows no fees (as expected)
10) view repayment schedule:
No Due date Date paid Principal Interest Fees Total
Future Installments
1 14-Feb-2011 - 181.8 1.2 24.0 207.0
2 21-Feb-2011 - 181.8 1.2 24.0 207.0
3 28-Feb-2011 - 181.8 1.2 24.0 207.0
4 07-Mar-2011 - 181.8 1.2 24.0 207.0
5 14-Mar-2011 - 181.8 1.2 24.0 207.0
6 21-Mar-2011 - 181.8 1.2 24.0 207.0
7 28-Mar-2011 - 181.8 1.2 24.0 207.0
8 04-Apr-2011 - 181.8 1.2 24.0 207.0
9 11-Apr-2011 - 181.8 1.2 24.0 207.0
10 18-Apr-2011 - 181.8 1.2 24.0 207.0
11 25-Apr-2011 - 182.0 1.0 24.0 207.0

Expected: fee column to be zeros
Actual: fee column shows fee of 24

Note that the account summary also shows the fee:
Original Loan Amount paid Loan balance
Principal 2000.0 0.0 2000.0
Interest 13.0 0.0 13.0
Fees 264.0 0.0 264.0
Penalty 0.0 0.0 0.0
Total 2277.0 0.0 2277.0

Environment

None

Activity

Show:
Van Mittal-Henkle
February 11, 2011, 9:29 PM

Changed the summary and description to reflect that this only occurs on the second addition and removal of a fee.

Van Mittal-Henkle
February 15, 2011, 6:01 PM

In investigating this, I found that the trigger for this is disbursing a loan and changing the disbursal date while doing so. The change in disbursal date triggers a recalculation of the loan schedule which is what pulls in inactive (deleted) fees.

Jeff Brewster
February 23, 2011, 8:31 PM

Van, can you please add the commit log to this bug so it's clear where the issue was fixed (head-master, F, etc)

Van Mittal-Henkle
February 24, 2011, 1:18 AM

This issue was resolved by the work donoe on MIFOS-4675. From that issue it looks like the last commit was 40449942fb3b6d5af407533dd705bf6f9f5f495b

Jeff Brewster
March 5, 2011, 8:28 AM

verified with hudson-head-f-release-130

Assignee

Van Mittal-Henkle

Reporter

Van Mittal-Henkle

Labels

None

URL

None

Story Points

None

Team

Core

Scheduled For

None

Epic

None

Notify

None

productboard URL

None

Man Day Estimate

None

Fix versions

Affects versions

Priority

Minor
Configure