"Joey, you know the rules. You have now interrupted the class by you being late and I will see you after class."Having a kid stay late because he is disruptive now does not help the other 31 kids in the class learn anything. They deserve to learn, and the punk causing the problem needs to be dealt with now, not later.
The late one gets dealt with, the kids get on with learning and also learn that if they don't follow the rules the teacher follow-up with the stated rules.
What more can you want? Nothing goes 100% as planned and, frankly, that in itself is a learning experience.