Uploaded image for project: 'mifos'
  1. mifos
  2. MIFOS-5182

Add Principal Pre-payment option for "Declining Balance" and "Declinging Balance - Equal Principal Installment" interest types

    Details

    • Type: Improvement
    • Status: Ready for Showcase
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Margaret H, 2.3.2
    • Component/s: None
    • Labels:
    • Implementation Priority:
      Must
    • Team:
      Core

      Description

      There is a need to have an option to do a "monthly interest calculation". Detailed requirement and example below:

      There are 2 loans (with monthly installments) which are handled as follows in real-life:

      Loan 1:
      February-2011 - Disbursed - 10,00,000 at 2% per month
      March-2011 - Interest paid - 20,000
      April-2011 - Interest paid - 20,000
      May-2011 - Loan repaid paid with interest - 10,20,000

      I schedule this as a loan product with interest type as "diminishing balance" and with 2 "principal-only grace" periods. This works fine in Mifos.

      Loan 2: Is similar, except that the customer does some prepayments.
      May-2011 - New Loan disbursed - 40,00,000 at 2% per month
      June-2011 - Interest paid - 80,000
      July-2011 - Interest paid - 80,000
      August-2011 - Interest paid - 80,000, Principal repaid 5,00,000 (principal outstanding is now 35,00,000)
      September-2011 - Interest paid - 70,000, Principal repaid 10,00,000 (principal outstanding is now 25,00,000)
      October-2011 - Interest paid - 50,000, Principal repaid 15,00,000 (principal outstanding is now 10,00,000)
      Nov-2011 - Interest paid - 20,000

      I am not able to configure Loan-2 in Mifos. Ideally, the pre-payments should be adjusted to the principal. But mifos accounts prepayments against future interest, if I use interest type as "diminishing balance".

      If I use the interest type as "diminishing balance with interest recalculation", Mifos computes the interest based on daily-reducing balance. So the interest due for Feb, will be less than interest due for April. Which will not help implementing the above scenario. And with this type of interest, Grace periods are not supported. So it is impossible to implement such a loan in Mifos.

      Mifos should be enhanced and Principal Pre-payment option for "Declining Balance" and "Declinging Balance - Equal Principal Installment" interest types should be added.

      The following remarks should be implemented:

      a) The "Principal Re-payment" link should be visible only for "Declining Balance" and "Declinging Balance - Equal Principal Installment" interest types (this does not make sense for both "flat" and "declining balance with interest recalculation" interest types)

      b) We need to handle the situation where user applies a payment for interest on a date and then on the same date does a "Principal Repayment" too.

      c) We need to handle the situation where principal-repayment is done on a non-meeting date (i.e. on a date on which there is no entry in the loan_schedule table).

      d) We need to handle the situation where for a six month loan, only interest was paid for 8 months and then the principal was repaid. I.e. the duration of the loan went beyond what was entered into loan_schedule table by Mifos.

      e) View all account activity should show entry for "Principal Re-payments"

        Attachments

          Issue Links

            Activity

            Hide
            jslawinski Jakub Sławiński (Inactive) added a comment -

            Hi Binny,

            this issue seems to be a little bit complicated and it is not clear to me what should be achieved here. If we re-enable the link that Keith added and fix all the issues you mentioned then this will be enough to close the ticket?

            Do we have somewhere a consolidated functional specification for this new functionality?

            Show
            jslawinski Jakub Sławiński (Inactive) added a comment - Hi Binny, this issue seems to be a little bit complicated and it is not clear to me what should be achieved here. If we re-enable the link that Keith added and fix all the issues you mentioned then this will be enough to close the ticket? Do we have somewhere a consolidated functional specification for this new functionality?
            Hide
            mifos-hudson Mifos Hudson Jira Plugin User added a comment -

            Integrated in head-h-release-secondary #25
            MIFOS-5182: Display apply pre-payment link for loans of type 'declining balance' or 'declining balance - equal principal installment'
            MIFOS-5182: Show principal pre-payments in activity log
            MIFOS-5182: Fixed personnel field for pre-payments
            MIFOS-5182: Added interface for pre-payments

            Paweł Gesek :
            Files :

            • serviceInterfaces/src/main/java/org/mifos/dto/screen/LoanInformationDto.java
            • appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java
            • application/src/main/resources/META-INF/resources/pages/application/loan/jsp/loanaccountdetail.jsp
            • application/src/main/resources/org/mifos/config/localizedResources/LoanUIResources.properties

            Paweł Gesek :
            Files :

            • appdomain/src/main/java/org/mifos/accounts/loan/business/LoanBO.java

            Paweł Gesek :
            Files :

            • appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java
            • appdomain/src/main/java/org/mifos/accounts/loan/business/LoanBO.java

            Paweł Gesek :
            Files :

            • appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java
            • serviceInterfaces/src/main/java/org/mifos/accounts/servicefacade/AccountServiceFacade.java
            • appdomain/src/main/java/org/mifos/accounts/servicefacade/WebTierAccountServiceFacade.java
            • userInterface/src/main/resources/org/mifos/ui/freemarker/core/enterLoanRepaymentDetails.ftl
            • userInterface/src/main/resources/org/mifos/ui/freemarker/core/reviewLoanRepaymentDetails.ftl
            • userInterface/src/main/java/org/mifos/clientportfolio/loan/ui/DateValidator.java
            • userInterface/src/main/resources/META-INF/resources/pages/js/padDate.js
            • userInterface/src/main/java/org/mifos/ui/ftl/DateFormatter.java
            • serviceInterfaces/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacade.java
            • application/src/main/resources/META-INF/resources/WEB-INF/flows/customLoanRepayment.xml
            • appdomain/src/main/java/org/mifos/accounts/loan/business/LoanBO.java
            • userInterface/src/main/java/org/mifos/ui/loan/controller/LoanRepaymentController.java
            • userInterface/src/main/java/org/mifos/ui/loan/controller/LoanRepaymentFormBean.java
            Show
            mifos-hudson Mifos Hudson Jira Plugin User added a comment - Integrated in head-h-release-secondary #25 MIFOS-5182 : Display apply pre-payment link for loans of type 'declining balance' or 'declining balance - equal principal installment' MIFOS-5182 : Show principal pre-payments in activity log MIFOS-5182 : Fixed personnel field for pre-payments MIFOS-5182 : Added interface for pre-payments Paweł Gesek : Files : serviceInterfaces/src/main/java/org/mifos/dto/screen/LoanInformationDto.java appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java application/src/main/resources/META-INF/resources/pages/application/loan/jsp/loanaccountdetail.jsp application/src/main/resources/org/mifos/config/localizedResources/LoanUIResources.properties Paweł Gesek : Files : appdomain/src/main/java/org/mifos/accounts/loan/business/LoanBO.java Paweł Gesek : Files : appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java appdomain/src/main/java/org/mifos/accounts/loan/business/LoanBO.java Paweł Gesek : Files : appdomain/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacadeWebTier.java serviceInterfaces/src/main/java/org/mifos/accounts/servicefacade/AccountServiceFacade.java appdomain/src/main/java/org/mifos/accounts/servicefacade/WebTierAccountServiceFacade.java userInterface/src/main/resources/org/mifos/ui/freemarker/core/enterLoanRepaymentDetails.ftl userInterface/src/main/resources/org/mifos/ui/freemarker/core/reviewLoanRepaymentDetails.ftl userInterface/src/main/java/org/mifos/clientportfolio/loan/ui/DateValidator.java userInterface/src/main/resources/META-INF/resources/pages/js/padDate.js userInterface/src/main/java/org/mifos/ui/ftl/DateFormatter.java serviceInterfaces/src/main/java/org/mifos/application/servicefacade/LoanAccountServiceFacade.java application/src/main/resources/META-INF/resources/WEB-INF/flows/customLoanRepayment.xml appdomain/src/main/java/org/mifos/accounts/loan/business/LoanBO.java userInterface/src/main/java/org/mifos/ui/loan/controller/LoanRepaymentController.java userInterface/src/main/java/org/mifos/ui/loan/controller/LoanRepaymentFormBean.java
            Hide
            pgesek Paweł Gesek (Inactive) added a comment - - edited

            I have reenabled Keith's version in commit:
            82f3a17d8bd9037cdade0693f9cdf5b5ee668c46

            and fixed issues reported by Binny and added an interface in commits:
            31bb2e248e5f500a529a6db1da6e0c7714a9b9da
            8b95c6eeed7c7872f89c8b1683251534c26b7ab1
            994bf5effd69002e5223ca46c860ab8046012527

            Currently these pre-payments do not work properly with past transaction adjustments(pre-payments are applied as normal payments). See MIFOS-5556.

            Show
            pgesek Paweł Gesek (Inactive) added a comment - - edited I have reenabled Keith's version in commit: 82f3a17d8bd9037cdade0693f9cdf5b5ee668c46 and fixed issues reported by Binny and added an interface in commits: 31bb2e248e5f500a529a6db1da6e0c7714a9b9da 8b95c6eeed7c7872f89c8b1683251534c26b7ab1 994bf5effd69002e5223ca46c860ab8046012527 Currently these pre-payments do not work properly with past transaction adjustments(pre-payments are applied as normal payments). See MIFOS-5556 .
            Hide
            lukaszch Lukasz Chudy (Inactive) added a comment -

            Verified on 13.04.2012
            Issues reported by Binny have been fixed properly.

            Show
            lukaszch Lukasz Chudy (Inactive) added a comment - Verified on 13.04.2012 Issues reported by Binny have been fixed properly.
            Hide
            lukaszch Lukasz Chudy (Inactive) added a comment -

            I changed the issue description since 'monthly declining balance interest recalculation' is no longer needed to achieve second scenarion from the description.

            As it was mentioned in comments, only Principal Pre-payment option should be added for "Declining Balance" and "Declinging Balance - Equal Principal Installment" interest types.

            Show
            lukaszch Lukasz Chudy (Inactive) added a comment - I changed the issue description since 'monthly declining balance interest recalculation' is no longer needed to achieve second scenarion from the description. As it was mentioned in comments, only Principal Pre-payment option should be added for "Declining Balance" and "Declinging Balance - Equal Principal Installment" interest types.

              People

              • Assignee:
                pgesek Paweł Gesek (Inactive)
                Reporter:
                binnygopinath Binny Gopinath Sreevas
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 weeks
                  4w
                  Remaining:
                  Remaining Estimate - 4 weeks
                  4w
                  Logged:
                  Time Spent - Not Specified
                  Not Specified