Dismissal

What rules do you need to follow if you want to dismiss an employee? And what does a departing employee need to bear in mind?