This is controlled by the Grace period (# of days) setting in the payment change control section of your Loan Category configuration (LOC and open-end loans only).  See the online help topic (link below) for more details about how this field works to calculate the next payment due date on zero-balance LOCs.