Soonest time to leave Malaysia with tax refund

Hello,

I work in Malaysia from 11/2018. I left Malaysia for vacation 10 days in February and 4 days in April.
Currently, my project will finish next month then I want to get a new job in different country to challenge myself.
However, I want to get the tax before I left.
So when is the soonest time I can left Malaysia?
Any help or suggestion would be great appreciated.

Regards,
Toong

Need to be employed and paying income tax until 17th July ie 182 days (3rd July) +14 days outside Malaysia on vacation

Thank you so much for your response @Gravitas
I used to think I understand then I submit for leave at end of July (31/7/2019) but my HR say that maybe I can not claim for the tax since by working time is quite sort (only 9 months).

My company pay money in the end of month (this mean I pay income tax in the end of each month).
If my last working day is 31/7/2019, I still able to claim for tax refund right?

Sorry for ask this question since it quite duplicate with my current question but I just one to make sure it before decide.