How to Print Last receipt?

any one know how to print last ticket receipt with one click? (Last Paid ticket)

Ticket --> Display --> Print Bill this 3 steps in one ?

Follow the post here…

@QMcKay

i set up the above steps but print last bill works when first i use print bill button than when i click on reprint last receipt button it print the same ticket.
it store last ticket id only when print bill rule use than print last bill is works

what i want to do is.

customer purchase chips and pay for it. i have DO NOT PRINT button so receipt didn’t print. and transaction complete.

when customer ask for receipt, cashier will click ticket and click display and then print bill so it will print the customer receipt. how i can make al this 3 steps in 1 automation command button?

I create this action “Using Update Program Setting Action to store last ticket id” and injected at payment processed rules and when transaction finished i click on Print last bill but nothing print

Can not store Ticket Id at payment processed Ticket Id is generated after ticket closed so you need to store it on ticket closed. Your case is different because most cases your tickets are only closed after payment not before. So you also need to use a state for this and make it check the state when storing Ticket Id you then need to clear that state on ticket opened this will prevent it from thinking tickets you view in ticket explorer are last ticket.

Ticket ID will generate after the ticket closed so if i put store ticket iD action in ticket closed rule wll it store the Ticket ID or at that time ticket ID will not generated ?

Yes it will store it but like I mentioned above you need to create a simple ticket state flow for it to check and then clear on ticket opened. If you do not do this and you open a ticket in ticket explorer and then close it will store that ticket as last ticket which is not accurate.

ok its work with one little problem.

if we ring up another sales (payment not processed yet) and click that button than it’s print the last transaction receipt but its clear the current ticket.

how i can prevent this ? is there a way that it print the last transition receipt but not clear the current ticket?

in other word print last transaction receipt in middle of taking next order.

You are setting the state at wrong time. Try setting State on Payment Processed.

EDIT: Maybe I misunderstood you can you explain clear current ticket? Current ticket disappears? Or just that State?

Remember if your in a ticket when you press that button lets think what it does… It is loading a ticket right? So you should not load a ticket if you have a ticket open…We need to think through this process more and design something that works for you,

1 Like

In short, no, there is no simple way to avoid this. You can only print a Ticket which is either Active or Loaded, as @Jesse says…

In effect @allmixedup , your currently Active Ticket (Ticket Id = 0) that you are taking orders on is replaced with another Ticket that is being loaded, so you “lose” your Active Ticket.

ok here is the latest update

i made following changes

Ticket closed event will store LastTicketId = [:TicketId]

Reprint Last receipt rules will execute the Print job , this print job will take Ticket Ids = {SETTING:LastTicketId}

now if new order is not entered than it’s print the last Ticket but if new order started than it print new ticket like print bill not the Last Ticket. at this moment i still want to print last TIcket

@QMcKay
“In short, no, there is no simple way to avoid this. You can only print a Ticket which is Active/Loaded, as @Jesse says…”

yes its can be done with one click only problem is if i start another order than its print active order but as Kendash said Ticket ID is not generated until Ticket is Closed so why its printing current ticket which is not closed.
so i am try to figure out why it’s print current receipt as bill print

You have another print rule somewhere that is allowing it. Or your behavior is being affected due to another rule somewhere.

yeah that what i thought and i go all over but question is i just made this Reprint last Receipt Button. and if new order not entered than its take lastTicket ID but if new Order entered than it takes Current Ticket ID

There is no current ticket id… Ticket ID is not generated until ticket closed. So if its printing current ticket that means somewhere it is closing it. Or it is not reading ticket id at all to print it… it is just simply printing current ticket… which is possible it does not need a ticket id to print.

generating all screen shot




Here it is

all this 4 steps do the job well until new order is entered. once new order entered its print new order not Last one

This might be what you need instead of Load Last Ticket.

1 Like

I realize that. I created the post with the step-by-step on how to do it.

Some suggestions:

In your Execute Print Job Action, replace the Ticket Ids field with a variable (i.e. [:TicketIds]), then in the Rule, feed in the {SETTING:LastTicketId}. It is always better to use variables in an Action, and feed the variable via the Rule, rather than using Tags in the Action itself.

I highly suggest too: just before firing the Print Job Action in the Rule, fire a Show Message to reveal the Ticket ID stored in {SETTING:LastTicketId}, so you can verify that the correct ID is being sent to the Action. If you find that the ID is incorrect for your needs, you then need to find out why, as in, when/where is it being overwritten. I’m guessing that the ID will be zero (0) which is a “dummy” ID meaning “Current Ticket”, so you need to figure out why that is.

Show Message is your friend when in need!

2 Likes

@QMcKay

It show me same ticket # 1104 both time

no new order ticket # 1104 Print last Receipt Goooood :slight_smile:
enter new order then ticket # 1104 but print current order no goooood :frowning:

still can’t understand why its printing the current order Like Print Bill does

Its not printing that specific ID so we need to figure out why. Your not loading that id into the print action so its defaulting to print current active ticket. Look through your rules make sure the execute print job is set to print specific ID

specific ID ?

this is what i have in my show message Ticket # {SETTING:LastTicketId}

my screen shot is posted and than all i did is change as QMckay suggest and as per his suggestion ticket id is still same but print come out different.