From 3ffa03f765938bfd433501790504b46970680485 Mon Sep 17 00:00:00 2001 From: dtookey Date: Fri, 8 Apr 2022 15:43:45 -0400 Subject: [PATCH] added clients into billing report info --- src/sql/0-run-first/billing.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;