@ -7,7 +7,8 @@ SELECT pkey,
line_created,
accepted_date,
(qty * default_price) AS fee,
invoice_accepted
invoice_accepted,
(SELECT clients.name FROM clients where clients.pkey = (SELECT contacts.cl_fkey from contacts where pkey = (SELECT all_projects.contact_fkey where all_projects.refnum = refNumber))) as 'Client'
FROM billing
where invoice_accepted = 1;