Using a different printing template for kitchen orders if some of the orders have already been submitted

I have a print job that prints the new orders on a ticket to the kitchen printer on the ticket closing rule. This works fine. If the ticket is then reopened and new orders are added to it I would like the new orders to be printed using a different template (saying ‘updated order’ instead of ‘new order’). I have set up the action, rule & printer templates but need to put in the condition ‘If some orders have already been submitted’ use this rule.

I have tried

But my custom constraint doesnt work. Please can you tell me what I should put in here?

Many Thanks…

you cant put = Submitted in there

not sure what to do but that is wrong

Where have you got that from?That expression is shown as {ORDER STATE TOTAL:X} the X meaning you need to add some details in place of the X for it to work. Looking at the reports this will be reporting the value of the orders and if your loking for QTY you would want {ORDER STATE QUANTITY TOTAL:X} or you will need to use a {REPORT ORDER DETAILS type expression or similar using order state as a ‘constraint within the report expression’.
Likely all you need is {ORDER STATE QUANTITY TOTAL:X} but specifying the state.
This is untested but it would look something like;
{ORDER STATE QUANTITY TOTAL:(OS.Status=Submitted)}
So your constraint would have that in the left box and greater than and 0.
You might need to wrap it in a TN in order to make sure its a number for grater than to use ie;
[=TN('{ORDER STATE QUANTITY TOTAL:(OS.Status=Submitted)}')]
You will also need to account for the default printing rule if thats (presume it would be else all new orders ticket wouldnt print) still in use else you will get two coppies the default printing only new orders and this for your custom template.
For that if using the above it would be similar expression equals 0 or less than 1 depending on how you want to account fro refunds (and how your have setup refunds (mine are done as negative qty whcih for you would then miss both the above if you used greater than and equals 0 for the two rules.
Alternatively you could look to change the existing template and specify a display format for orders with submitted state and change to not print only new orders like you would have for whatever that print job is doing.
If you look at the section covering VOID orders you will see how to specify format for orders based on states.

1 Like

Thanks for your reply - you set me on the right path…here is my solution if anyone is interested:
I wanted more control over which orders were sent to the kitchen printer. There is a default group of orders but also a requirement to add other items that don’t normally get printed at the kitchen.
I have set up an order state called PrintStatus which is set to ‘KPrint’ when certain orders are flagged for printing at the kitchen (either by my default rule or by a button). Anything with this status will be printed by the kitchen print job.

I created a new entity state called TPrintStatus, then set up 2 rules:
The first rule sets the TPrintStatus when an order status is changed

The second rule is the ticket closing rule:

This prints to a different kitchen print job depending on whether the ticket has already been printed (to say ‘Updated Order’ instead of ‘New Order’). ‘Update Printed State’ action changes the order state to ‘Printed’ so they don’t get printed again…