Bava Metzia 77 - Labor Laws
Hourly workers can stop working with their employer at any time, according to the Torah commandment "... since the children of Israel are My slaves ...", - but not slaves to my slaves. They receive hourly wages for the time they have already worked.
Contractors hired to perform a specific task can also quit at any time. However, if the employer has to hire other workers at a higher rate in order to complete the task, the difference is deducted from the contractors' pay.
If not finishing the task causes a loss, the employer can obtain a refund of significantly higher wages of replacement workers - from the first workers' pay and from their tools, if he happens to have them.
Test your knowledge of the daf