Change Ticket State only if Bar and Kitchen Orders Served?

Its on forum, sure I posted examples from my receipt template totaling food and drink and loyalty discounts.

Here is my food/drink split

Obviously would need to adjust to your needs.