A few years ago I received the certificate of tax residency in Thailand every year from the Revenue Department office in Chiang Mai. Like you, I needed the certificate to reclaim tax on dividends in my home country. In Chiang Mai it was an absolute requirement that I had filed a PND90 or PND91 in Thailand for the tax year in question, had I not they would not have issued the certificate. Just having been in Thailand for more than 180 days was not enough.