Qatar Work Visa

One of my friend living in Dubai has been issued with a work visa by a company "X" in Qatar. But the person has not moved to Qatar yet. In the meantime he has got another better offer with a different company "Y" in Qatar. I would like to know, what happens when the company "Y" apply for a work visa. If there is any problem with issuing a work visa; what is the solution.
Is there any possibilities to apply visit visa before the expiry of above work visa from company 'X"?
Thanks for your comments guys. Is there any possibilities to apply visit visa before the expiry of above work visa from company 'X"?
system will show visa already issued...company "X" will have to cancel his visa before company "Y" applies
I think no problem he can join anyone of them I hope there will be no issue if he didn't move yet..
Wait for the Z company..