if his boss knows your hobby of gambling. Naturally, your boss will transfer you to another department that is specialized and not involved in company finances.
if a situation like that has happened, I'm sure it has involved colleagues and people closest to them. The boss who knows the problem will of course take better action than stopping him from working.