The next due date cannot be greater than the maturity date. When processing delinquency at end of day, the system compares the maturity date and the next due date. If the next due date is greater than the maturity date, then the next due date is replaced with the maturity date and partial pay is zeroed out.  Since both the next due date and maturity date are in the past the total current balance becomes delinquent.

Each month it is recommended that the loan department review the loans that will have maturity dates and review dates come due.  Then you would decide whether you will maintain these dates in the future so that the loans don't fall past due.