dimanche 24 janvier 2016

How to get total payments in php

I have two tables users and payments, in payments I have user_id amount_to_pay and amount_paid. I want to get users who didn't paid full payment, so

if($payments->amount_to_pay < $payments->amount_paid)
{ $unpayments += $amount_to_pay - $amount_paid}

But the problem is that a user has many payments so I need to check how many users didn't paid full subscription.

Please Help



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1RHHRUf
via IFTTT

Aucun commentaire:

Enregistrer un commentaire