Change Ticket State only if Bar and Kitchen Orders Served?

This is my food drink split from ticket template, uses value rather than qty but same result for your purpose.
I have a coding state for another part of system and fopd/drink sllit calculated using these states.

If you really wanted quantity pretty sure its just QUANTITY instead of TOTAL and obviously loose the FF wrap since its not a money value.