I work as a doctor, and I was compelled to travel to join my husband for a month so that my residence visa would not be cancelled. I did not go to my work during this month and I did not take a leave of absence; I told them that my mother was sick and needed surgery (which was indeed the case), and she lives in another city. In the beginning I did not regard my salary as permissible, because I did not work during this period, and I offered the salary to my fellow doctors; some of them were prepared to agree and others refused. But the one who is in charge of my work said to me: They have no right to anything you have; take your salary in full. That was because on the days on which I did not go to work, no one did the work instead of me. After that, I was nine months pregnant and I was very tired and could not go to work. I had some problems at the end of the pregnancy and I did not go to work for another month, but this time my colleague did the work instead of me. What is the ruling on my taking the salary in these two cases? If it is not permissible to take the salary, what should I do with it? Should I give it in charity or give it to my colleagues? Now I feel that my supplications (du‘aa’s) are not being answered – is this the reason? How sound is the hadeeth, “Make sure your food is halaal and your supplications will be answered”?.
It is not permissible for you to take the salary in the two cases mentioned, so long as you did not get a leave of absence that would make it permissible for you to take the salary even though you did not do the work (sick leave, if you were actually ill, or maternity leave, if the system allows the pregnant woman to take a leave with pay).
In the first case, you should give in charity the salary that you got, or donate it to public facilities that the state usually spends on, and the closer it is to the field of your work (medicine and hospitals), the better, because there was no one who took your place at work and you cannot give the money back to the state.
In the second case, it also seems that you should give it in charity, because the one who did your work in your stead did not do it in an official capacity with permission from the one who is entitled to give permission for that, and the employment system does not allow an employee to appoint someone else to act in his stead, with or without a salary.
For more information, please see the answer to question no. 105403
And Allah knows best.