It’s because the payment is late. If the borrower can’t make their payment within the grace period, Moneylender applies the catch-up rules to the loan.
Here’s an example:
Borrower is supposed to pay $1000 each month on the 10th. Late on the 20th and the late fee is $100.
Borrower sends a check for $1050 on the 5th of the following month (after the grace period so a late fee is also due).
Borrower then pays another $1050 on the 17th thereafter. Since this totals two payments and a late fee, the borrower is now caught up.
Now let’s change the amounts:
Borrower pays $1400 on the 5th, only five days before the upcoming due date, and then comes up with the remaining $700 on the 17th. This also totals $2100 and the borrower is now considered current.
In the second example, we can agree it would be incorrect to apply $1400 as overpayment and not credit the extra funds towards the amount due on the due date that occurs just a few days after the payment arrives. Since, structurally, the only difference between $1050 and $1400 is the amounts of the payments, while the timing and net effect of the amount due are the same, we can agree that we should apply the payments exactly the same way. So now we’ve established why we’re following this rule in this situation. We could make the situation even more obvious by moving the first payment of $1400 to the 9th of the month, one day before the due date on the 10th. You wouldn’t take the $1400 and say, “tomorrow you’ll need to pay $1000 again.” The borrower would just wait a day to pay you and get credit for the full amount paid.
If the borrower pays at least the amount currently due within the grace period for their next payment, Moneylender will return to using the normal rules and shunt any overpayment between due dates. The cutoff for normal rules and catch-up rules is the expiration of the grace period in the loan’s settings.
Moneylender does not shunt the amount received because the borrower is struggling to keep up with the loan (they’re paying after the grace period). If the borrower was not late with their last payment, Moneylender would expect a full payment the following month.
I worked very hard to make Moneylender’s mechanisms quite elegant at knowing how to apply payments to the loan in a sensible and equitable way. I also wrote the program to allow any user to override any part of its machinations whenever desired. If you want to forego the super-awesome way that Moneylender has applied your payment, you can stick an adjustment for +$100 on 10/5/2020 to the AmountDue account from the Settings tab > Adjustments section.