Boss in dock after 'playing' with gun at work