Having trouble with some functions, please help me out

There are 4 methods of payment: annualy, quarterly, semestrial and monthly. For all of these methods we calculate a number of installments (to pay) by the end-user.
First 3 years are presented like in the picture.
Starting with the 4th year, the promotional plan is no longer valid, so the rest of the payment plan is like the annual one.

Please help me out and advice me how can i calculate the whole payment plan

Pay plan