All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
As long as the employee does his work as required from him and remains at work for the period that is agreed upon in the employment contract, then he deserves the salary that is agreed upon and he is not sinful for the free time that he spends if he is not required to do any job.
However, the employee deserves his salary by being present in the workplace during the time period that is specified for work by the employer, and he is not sinful if he has no work to do during work time.