diff --git a/src/sql/0-run-first/billing.sql b/src/sql/0-run-first/billing.sql index be241cc..87485d5 100644 --- a/src/sql/0-run-first/billing.sql +++ b/src/sql/0-run-first/billing.sql @@ -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;