mardi 18 octobre 2016

Add payment after monthly schedule expired - PHP

I have two models, Payment and GroupStarts.

Payment has these fields: student_id, amount_to_pay, student_paid, date_paid, due_date, group_name

On GroupStarts are: group_name, group_start, group_end, group_status.

I've tried lots of ways to make it work.

This is how it should work:

If payment is made for one month and it expires after month 1, it should add amount_to_pay to that for month 1 and if in month 2 student didn't paid nothing than we add + amount to pay, similar to: if student have to pay $10 and paid so owe is 0 but for next month he didn't paid so we add it to payment $10 if on month 3 he didn't paid we add $10 more to that amount.

How can I do that ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire