I can think three solutions.
- Create a section for tip amount under bill so customer can add tip between step 3-4
- Do not close ticket automatically after settling ticket. Instead create a specific button to close ticket and display table as empty.
- Create a specific ticket type for tips and create additional tickets for tips. So you can record them anytime you want and settle it with related payment type to determine how they paid.