@Greg *******
I had the situation where I needed a certificate of residence after a border run. In the Immigration in Phuket Town, they said that I need the TM30 again after reentering the country, but in the end it was sufficient to show them the contract of my apartment.