Refund Item button

This setup is originally based on the Tutorial by @emre, here:

However, as discussed in that thread, I wished for an alternate method so that Accounts would reflect the correct Balances.

Operational Flow:


First, you will need to implement this setup, to be able to Re-open a previously-Settled Ticket:


Once you have the above implemented, the setup of the Refund button is simple.

Ensure your Ticket Types have the option selected for Allow Zero Priced Orders:

Automation Command for the Refund Item button:

Automation Command for the Ask Question Action:

Action to Update Order:

Action to Ask Question regarding Inventory:

!!! NOTE !!!: the buttons Yes=True,No=False must use True/False values since we are going to send one of these values to the Update Order Action, and it expects True or False for the Increase Inventory parameter.

Rule to capture Refund Item button and fire Ask Question regarding Inventory:

Rule to execute the Update Order Action:

3 Likes

The only issue I can see with this for some situations is… it adds inventory back in…in many occasions in the food industry you would not add the item back to inventory you would throw it out.

The Fix would be simply to make two buttons 1 for Refund Item and 1 for Refund Throw-Aways. Or am I thinking about this the wrong way again?

You’re correct. It is subjective, and could be implemented either way, or both ways as you mention, by changing the Update Order Action to set Increase Inventory to False.

In fact, you could accomplish this with a single Automation Command which when clicked fires an Ask Question Action with “Put item back into Inventory? (yes/no)”, then fire 1 of the 2 Update Order Actions based on the answer. Good idea… I’ll update the post to include that option!

EDIT: I’ve updated the tutorial to add the option of Increase Inventory (yes/no)

1 Like

Great Idea! I am implementing this into mine now.

I did find one other odd behavior. It could be my setup… If you only have 1 item on the ticket and you refund it… it works… but if you reopen the ticket again to view it… samba crashes says its linking an object that is not there. So it seems it has to do with the mapping of the Visible/Enabled states and I am thinking it is because there is now technically no longer a value to the item that is in that state.

I think it is the Enabled:GSTatus= state that is causing it. So I am wondering about a work around. Going to experiment a little.

EDIT: i Was wrong its not GSTatus= I am looking to see if its just my setup causing it… Does it do it on yours?

No crashes here… doesn’t seem to matter how many items are on the Ticket.

So its just mine… I have two other buttons on mine mapped to specific states. I am going through them now to figure out which one is causing it.

EDIT: Figured it out… I took my Cancelled Settled Payment out of the Reopen Ticket rule and made it a button so I can manually decide to do it. I did this so I could Use my Reprint Customer Receipt button without having to change the payment…This way it would not print two receipts and I could use a separate template for the Reprint Customer Receipt

The mapping on the buttons Enabled state was set to Paid… it looks like since the balance is now zero even though it says Paid It cannot enable on a Paid State because there is now no actual Tendered amount… I am sure the real reason is slightly different… but bottem line I removed the Mapping for Enabled state on my Cancel Settled Payment button and it works fine now.

EDIT: Never mind I am wrong again… it is still doing it. I understand why now… for refund button to work you have to cancel the payment first. So its got to do with mapping I need to figure out how to get it mapped so I can do them in order. I still do not want to cancel payment upon Re-Open Ticket.

Yes, my Re-open button automatically performs the Cancel Payment Action as well. I see no reason why you shouldn’t be able to separate them.

That is the issue apparently. It lets me separate them just fine and it works just fine as long as I have not refunded all of the items on the ticket… I am not sure why its doing that behavior now.

It does not do it if I cancel payment before I reopen ticket… I didn’t think was possible…

Wow this one is eluding me.

I don’t know if that information helps or not but we should cancel whole payments when we reopen a paid ticket.

1 Like

Hi @QMcKay i am interested by you’re feature concerned the message of payment status by cash or credit card under the ticket screen, so in you’re picture: i’m interested by this line : TND:200.00,CHG: 0 and PMT 10.32.380 [cash]: 200.
I know its another subject but can you make a little tutorial ?
Thanks

@kmurat, here you go …

So I have a strange behavior going on. I double checked everything and cannot figure out whats going on. My refund item button is working when I reopen a ticket… but…it only calculates the change correctly if I DO NOT cancel payments first. If I do cancel payments first it will do everything correct except it the amount tendered has disappeared and it will not calculate the - amount.

EDIT: Never mind i was thinking backwards on the accounting… that is working correctly. I guess I was trying to make a popup that would show amount to give back to customer. Now that would be hard to do Im guessing. Would probably have to store the amount charged before the cancel payments and then bring the difference of that up with balance after the refund.

@QMcKay

Hi

I got error “Can’t Complete this operation white zero priced Orders exits”

can you tell me what am i missing ? :frowning:

Try enable Zero priced orders in your Ticket Type

1 Like

@Jesse

Thanks :slight_smile: that was fast replay

Working on something within this tutorial lol saw your post popup

Updated Tutorial to include this as one of the first steps. Thanks for mentioning it!