
	SELECT *, project.id AS project_id FROM project, discussion, message
	WHERE
	project.status IN ('Begun', 'Complete')
	AND
	project.id = discussion.project
	AND
	discussion.status = 'Client'
	AND
	discussion.id = message.discussion
	AND
	message.draft = 'Yes'
	AND
	(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 = '')
	AND
	(balance_notified IS NULL OR balance_notified <> 'Yes')
