Hi [~nayan],
We've done exactly that in our testing and samples and that is what made us find out about this bug. Take a look at the following 2 screenshots attached (schedule_before /schedule_after) , and attached JSON output of the same loan, you can see that the prepayment is *not* completely allocated to principal. It pays of part of the principal, but leaves a bit outstanding as well, which is wrong. As you can see in this JSON, when prepaying the 5,000 I mentioned before, it increases the scheduled amount to *more* than the payment, therefore leaving the instalment outstanding.
This leads me to the understanding that this is a bug, as the principal on this instalment should be paid off, if anything is outstanding it should be interest, never principal. The accounting bookings (See third screenshot) do exactly what I would expect to happen here, which is split the 5,000 between P and I, instead of putting it all to P, then using part of it to pay off I, leaving a small portion of P outstanding.
*New Schedule output*: {code} "period": 1, "fromDate": [ 2014, 12, 18 ], "dueDate": [ 2014, 12, 27 ], "complete": false, "daysInPeriod": 9, "principalOriginalDue": 5000, "principalDue": 5000, "principalPaid": 4931, "principalWrittenOff": 0, "principalOutstanding": 69, "principalLoanBalanceOutstanding": 15000, "interestOriginalDue": 69, "interestDue": 69, "interestPaid": 69, "interestWaived": 0, "interestWrittenOff": 0, "interestOutstanding": 0, <TRUNCATED> "totalOriginalDueForPeriod": 5069, "totalDueForPeriod": 5069, "totalPaidForPeriod": 5000, "totalPaidInAdvanceForPeriod": 5000, "totalPaidLateForPeriod": 0, "totalWaivedForPeriod": 0, "totalWrittenOffForPeriod": 0, "totalOutstandingForPeriod": 69, "totalActualCostOfLoanForPeriod": 69 }, { "period": 2, "fromDate": [ 2014, 12, 27 ], "dueDate": [ 2015, 1, 1 ], "complete": false, "daysInPeriod": 5, "principalOriginalDue": 0, "principalDue": 0, "principalPaid": 0, "principalWrittenOff": 0, "principalOutstanding": 0, "principalLoanBalanceOutstanding": 15000, "interestOriginalDue": 37, "interestDue": 37, "interestPaid": 0, "interestWaived": 0, "interestWrittenOff": 0, "interestOutstanding": 37, <TRUNCATED> "totalOriginalDueForPeriod": 37, "totalDueForPeriod": 37, "totalPaidForPeriod": 0, "totalPaidInAdvanceForPeriod": 0, "totalPaidLateForPeriod": 0, "totalWaivedForPeriod": 0, "totalWrittenOffForPeriod": 0, "totalOutstandingForPeriod": 37, "totalActualCostOfLoanForPeriod": 37 }, {code}
|
|