Payment Screen conditional behavior

Yes if you add a second Settle rule without the constraint for kitchen. and have display payment screen. You have several options to try let me know if one of them works.

So I guess you would need 2 settle rules I forgot about your Bar Orders. Just make sure your first rule you showed us is executed first it should work fine.

I am still curious if you need to add Refresh Ticket action in there?

Here is what i did:


I tried bar only orderā€¦ nothing happens on Settle Button click
I tried Kitchen orderā€¦ nothing happens on Settle Button click
Leaves me to believe that the constraint {ORDER STATE TOTAL:Display=Kitchen} has a problem

I will build something similar and let you knowā€¦

Before I doā€¦ can you give me a screenshot of your Rules screenā€¦ the one that lists all your Automation command rules. So I can see the order of them.

You would not need the constraint (ORDER STATE TOTAL:Display=Kitchen} Equals 0 in the first rule.

Here are the AC relate rule:

I know, i put that constraint there to avoid the rule order dependency. you follow?
And now , Since i get no response from the settle cash buttonā€¦ what it seems to prove is that {ORDER STATE TOTAL:Display=Kitchen} either does not exist or is not equal to or greater than zero.

It would not be equal to zero but it could be greaterā€¦ you still need to take it outā€¦ and put the order of the rules as I mentioned. Try it and see. Let me know.

@kendash @emre

  • {ORDER STATE TOTAL:Kitchen} (i.e. without the Display=) seems to get things going, however I donā€™t get any calculation result from my Calculate Service Charge action in screenshot below (which uses the same script that i use with the ā€˜Service Chargeā€™ Calculation Selector button (i.e. result = (Ticket.PSum + Ticket.PreSum - Ticket.Tax)*0.08 )

  • wouldnā€™t {ORDER STATE TOTAL:Display=Kitchen} be equal to zero if the ticket has only bar orders? Or Would it simple not exist?

  • Does voiding kitchen orders deduct from {ORDER STATE TOTAL:Display=Kitchen} ?

I do believe it would not exist

I got the calculation to work using the following:

My main issue now is if a user goes to payment screen then for some unexpected but valid reason wanted to remove the one and only kitchen order from the ticket before payment is made. At that stage, i already applied the Service Charge via the custom calculation script, so how can i remove/reverse the Service Charge from the ticket to make a provision for this type of scenario?

@emre Is it possible to enhance this script so that it becomes conditional?

e.g.
if {TICKET STATE: SERVICE} == Full OR {ORDER STATE TOTAL: Kitchen} > 0 :
result = (Ticket.PSum + Ticket.PreSum - Ticket.Tax)*0.08
Else
result = 0 ( or Null )

@QMcKay Can you help me with this?