A Non-B VISA and an extension of stay based on employment are not the same when you stop working
.
There have been several posts recently about Non-B visas/extensions and work permits and what you do when you stop working.
First off IF you stop working you need to go and cancel your work permit. You should not just let it expire, you should not turn it back in to your employer hoping they'll cancel it. Instead go to the Ministry of Labour and cancel it yourself.
Next if you are on a VISA <- meaning a sticker you got from a thai consulate or a stamp you got from the immigration office, you don't need to do anything and you are allowed to stay until the visa stamp you have expires. If it is a multi-entry visa you can even continue to border bounce and stay until the end of the visa.
If you are on an extension of stay from the immigration office (usually issued a year at a time for employment) you need to take the receipt from canceling your work permit AND your termination paperwork from your company and go cancel your extension.
The rule is you go cancel your work permit and then your extension on the same day. You can get a letter from your employer stating you stop work on xyz date, go cancel your work permit and extension early and the immigration office will stamp you in until that date on the paperwork.
It is a long held belief that you have an automatic 7 days to get out of the country when you cancel your extension. You do NOT.
It is totally up to the immigration officer how many days if ANY they stamp you for when you cancel your extension. Most of the time they cancel the extension that day and that means you leave the country that day. If you can't do that you can buy a 7 day 'application for extension denied' stamp to give you a week to get out of the country.
Canceling your work permit and your extension the way I outlined wipes the slate clean and you won't have any problem down the road.
TLDR : Answer Summary
When you stop working in Thailand on a Non-B visa, it's essential to take specific actions regarding your work permit and your visa/extension of stay. You must personally cancel your work permit at the Ministry of Labour, rather than letting it expire or relying on your employer to do so. If you hold a visa, you can remain in the country until it expires; however, if you have an extension of stay based on your employment, you need to cancel this at the immigration office on the same day you cancel your work permit. It's vital to avoid assuming you have an automatic grace period after cancellation, as the extension's cancellation date can vary based on the discretion of immigration officials. This process helps ensure you avoid fines or complications with future visa applications.