Thank you for your help.
That didn't quite work.
The total_cost (total_counter in your example) did not add up the "cost".
Also, the else statement must contain "No current invoices on file", because it means all their invoices are paid in full ("pif"=y)
Here is what im looking to get on a seperate line from the table:
Total Amount Due: <?PHP echo $total_cost ?>