Last paid, next payment due calculations

Hi,

I have a scenario where I need to record:

The last paid date

Next payment due, which will be based on a calculation from the last paid date

=last paid date plus one month
=last paid date plus three months
=last paid date plus twelve months

I also need the last paid date to automatically update. So as example if something was paid on 01st September 22, the next payment date (if last paid date plus one month) would be 01st October 22. Who the 1st October has passed, I need the database to automatically update the last paid date to 1st October 22 and so on

Plz check this