
	SELECT *, project.id AS project_id
	FROM project, project_activity
	WHERE
	project_activity.project = project.id
	AND
	project_activity.activity IN ('Quote Accepted', 'CMS Approval')
	AND
	HOUR(TIMEDIFF('2024-02-20 19:00:22', project_activity.createdTS)) > 1
	AND
	project.status IN ('Approved', 'Begun', 'Complete')
	AND
	project.type = 'Fast-Track'
	AND
	payment_status <> 'Suppressed'
	AND
	(payment_notified IS NULL OR payment_notified <> 'Yes')
	AND
	(
		(gi_invoice_receipt_code IS NULL OR gi_invoice_receipt_code = '')
		OR
		(
			(balance_due IS NOT NULL AND balance_due <> 0 AND balance_due <> '')
			AND
			(gi_invoice_receipt_code_balance IS NULL OR gi_invoice_receipt_code_balance = '')
		)
	)
	GROUP BY project.id
