Please contribute generously in order to ensure the continuity of our website InshaAllah.
Praise be to Allah.
The basic principle is that the employee is required to fulfil the conditions stipulated in the contract, so long as those conditions are not contrary to Islamic teachings. Allah, may He be exalted, says (interpretation of the meaning): “O you who believe! Fulfill (your) obligations” [al-Maa’idah 5:1]. And the Prophet (blessings and peace of Allah be upon him) said: “The Muslims are bound by their conditions, except a condition that treats something halaal as haraam, or treats something haraam as halaal.” Narrated by at-Tirmidhi, 1352; classed as saheeh by Shaykh al-Albaani in Saheeh Sunan at-Tirmidhi.
If the matter is as you say, that your immediate boss is the one who gave you time off and the company did not tell him to do that, and the system does not allow that, then it is not permissible for you to take this break just because your immediate boss agreed, because that is breaking the terms of your work contract. So you have to return to the company the money that you took for the time you had a break, even if you have to resort to some kind of trick, as appropriate; you do not have to tell them what really happened.
And Allah knows best.