@Maria *******
, YOU cancel your own work permit and extension :/ You take the letter from the school to the labor office and cancel your work permit and then you take that receipt and the letter from school to the immigration office and cancel your extension.
There is no reason to wait until you're almost going to stop work because the immigration office cancels your current extension and stamps you in until the date on the termination paperwork.