Once your employment comes to an end, this termination must be reported to the Ministry of Labor (i.e. dept. you got the work permit) for cancellation of the work permit and visa (to my knowledge handing in the work-permit is required by law - I'd advise you to verify whether this has been done)