So do you typically press print bill to print receipts? What is your flow.
The setup you configured stores Ticket ID of the ticket you pressed print bill on. If you press print bill on an old receipt … it will store that TICKET ID it really has nothing to do with last ticket. Is that your desired flow?
Not generally, is that how the flow should be with this? I just assumed the tutorial within the post above gives an automation command that allows you to just literally print off the last transactions receipt.
LOL no you reallly should start looking at the configuration when you do it. Look at it… you are literally storing TICKET ID of a ticket that you press Print Bill on… That does not relate to last ticket…
To store the TICKET ID of last ticket you need to first look at how your flow typically works then decide when you should store Ticket ID. Once you decide when to store ticket id then just build your automation to print it.
PS: If you want it to be specific and ONLY ever print the last transaction made then you should use a script to pick the Ticket with the highest ID to print.
By script i mean you can use SQL to grab the last ticket id. I am not the best resource on SQL perhaps @qmckay could help you there. I would have to spend some time researching the correct syntax.
PS: using a script means no need to store a program setting. You could literally just use a single action and rule.
I might make a stab at this SQL. We could just use the SQL helper to grab Ticket ID’s then use .Last parameter if there is such a thing. I know .First works.