Last paid, next payment due calculations

Plz check this