On deleting sub-phases, user gets an error saying projects are in use. However, there is no time and expense attached to it.
This can happen because the phases are currently attached to a joint invoice. You should first delete your invoice and then the project phases. After the phases are deleted, you can recreate the invoice.