In releases 1.18 and 1.19 (and presumably also current develop) the grace periods on loans do not work correctly. The grace period works fine during the setup and approval of the loan, but when (during disbursement) the schedule is regenerated it is suddenly gone. Have replicated this with a variety of flat interest loan products.
Steps to reproduce: - Sample loan product: https://localhost:8443/mifosng-provider/api/v1/loanproducts/ {code} { "name":"Standard Loan", "description":"Standard Loan", "fundId":"4", "currencyCode":"KES", "locale":"en_GB", "digitsAfterDecimal":"0", "principal":"10000", "maxPrincipal":"10000", "minPrincipal":"10000", "shortName":"SL", "numberOfRepayments":"12", "maxNumberOfRepayments":"12", "minNumberOfRepayments":"12", "repaymentEvery":"1", "repaymentFrequencyType":"2", "interestRatePerPeriod":"25", "maxInterestRatePerPeriod":"25", "minInterestRatePerPeriod":"25", "interestRateFrequencyType":"2", "interestType":"1", "amortizationType":"1", "interestCalculationPeriodType":"1", "inArrearsTolerance":"0", "inMultiplesOf":"1", "transactionProcessingStrategyId":"1", "accountingRule":"1", "graceOnPrincipalPayment":"2", "graceOnInterestPayment":"2", "graceOnInterestCharged":"0" } {code} - Create a Loan with submitted Date last week , expected repaystartDate does not matter : { code} { "locale":"en_GB", "submittedOnDate":"2014/03/01 00:00:00.000", "accountNo":"TEST-01", "graceOnPrincipalPayment":2, "numberOfRepayments":12, "externalId":"TEST-01", "amortizationType":1, "clientId":1, "productId":9, "interestType":1, "loanTermFrequency":12, "repaymentEvery":1, "repaymentFrequencyType":1, "expectedDisbursementDate":"2014/03/05 00:00:00.000", "loanOfficerId":1, "principal":10000, "interestRatePerPeriod":25, "graceOnInterestPayment":2, "loanType":"individual", "interestCalculationPeriodType":1, "dateFormat":"yyyy/MM/dd HH:mm:ss.SSS", "loanTermFrequencyType":1, "graceOnInterestCharged":0, "transactionProcessingStrategyId":1 } {code} Schedule shows grace period like configured in the product. See screenshot-1
- Then Approve loan, same date as submitted date. { code} { "locale":"en_GB","dateFormat":"yyyy/MM/dd HH:mm:ss.SSS","approvedOnDate":"2014/03/01 00:00:00.000"} {code} Check schedule again to see it still shows grace period.
- Now disburse the loan date later than the submit date, causing a regeneration of the schedule: { code} { "locale":"en_GB","dateFormat":"yyyy/MM/dd HH:mm:ss.SSS","actualDisbursementDate":"2014/03/06 00:00:00.000"} {code} Now the schedule lost the grace period. See screenshot-2.
|
|