You cannot delete an enterprise if it is referenced in departments.
To delete an enterprise created by mistake: