If the employees are told ahead of time that this is a term or condition of their employement: that is, that they are aware that by working there, they agree to make up any cash shortfalls. So long as the employees had notice of the policy, by continuing to work there after notice, they can be held to have agreed to it; and with agreement, it is legal.