All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
It is incumbent upon an employee to abide by the conditions of the Ministry where he works concerning the reception of payment for the works that he does. This is as long as he agreed to meet the contractual obligations as regards how to do the work and when to do it, and it isn`t permissible for him to take pay for work that he hasn`t done in the first place.
It isn`t lawful for the above person (Asker) to take that pay since the Ministry gives it for two reasons: doing the required work and staying at the workplace overnight. Thus, an employee who returned on the same day didn`t meet the condition that makes him eligible to receive pay, so he is only entitled to a portion equal to the work that he had actually done. The evidence on this is that Almighty Allah Says {What means]: " O ye who believe! Fear God and be with those who are true (in word and deed)." {At-Tawbah, 119}. In addition, Narrated 'Amr bin 'Auf al-Muzani (May Allah Be Pleased with him).
Allah's Messenger (PBUH) said: "Reconciliation is permissible between Muslims, except one which makes unlawful something which is lawful, or makes lawful something which is unlawful; and Muslims must abide by their conditions (which they have made), except for a condition which makes unlawful something which is lawful, or makes lawful something which is unlawful." {Related by Abu Dawoud}.
Furthermore, it isn`t permissible for the person in charge of the above employee to grant him accommodation allowance while knowing that the latter didn`t actually stay at the workplace overnight. This is in light of the fact that the person in charge is also an employee who is delegated by the Ministry and entrusted with certain duties. This is collusion and helping in sin and transgression. Allah the Almighty Says {What means}: "Help ye one another in righteousness and piety, but help ye not one another in sin and rancour: fear Allah. for Allah is strict in punishment." {Al-Mai`da, 2}. Accordingly, it is the duty of the above employee to return the amounts that he has taken unjustly, make sincere repentance, and seek forgiveness from Allah. And Allah The Almighty Knows Best.