diff --git a/src/sql/0-run-first/billing.sql b/src/sql/0-run-first/billing.sql index 11b98f3..96b6d0f 100644 --- a/src/sql/0-run-first/billing.sql +++ b/src/sql/0-run-first/billing.sql @@ -6,10 +6,14 @@ SELECT pkey, (SELECT all_projects.proj_type from all_projects where all_projects.refnum = refNumber) AS division, line_created, accepted_date, - (qty * default_price) AS fee, + (qty * default_price) AS fee, invoice_accepted FROM billing; -CREATE INDEX ref_num ON billing_report(refNumber); +CREATE INDEX ref_num ON billing_report (refNumber); UPDATE billing_report -SET division = IF(division = 'Warranty', CONCAT(SUBSTRING(refNumber, 1, 3), ' - ', 'Structural'), CONCAT(SUBSTRING(refNumber, 1, 3), ' - ', division)) +SET division = IF( + division = 'Warranty', + CONCAT(SUBSTRING(refNumber, 1, 3), ' - ', 'Structural'), + CONCAT(SUBSTRING(refNumber, 1, 3), ' - ', division) + );