@Dave ******
most people cancel the work permit a week or so before then go to the immigration office also a week or so before the date on the paperwork from your employer stating your last day.
The immigration office cancels your extension and gives you a NEW stamp that lets you stay until the date on the termination paperwork.
That way you're not screwing around with buying a 7 day extension denied stamp that gives you a week to get out of thailand OR facing leaving that very day.
DO IT EARLY..