# How to Create a Refund Item Button?

**URL:** <https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128>\
**Category:** V4 Tutorial\
**Created:** [December 22, 2013, 12:46pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128 "2013-12-22T12:46:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [December 22, 2013, 12:46pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/1 "2013-12-22T12:46:25Z")

</div>

It is possible to create a refund item button in ticket so you can change previously sold items with new items.

First of all we’ll start by creating a new automation command.

 ![](https://forum.sambapos.com/uploads/default/original/3X/e/b/eb3889dbeb8fe0822b9843d831e056adfc6d30c6.jpeg) 

We’ll map this automation command to ticket lines.

 ![](https://forum.sambapos.com/uploads/default/original/3X/2/5/254db70321513289f253b3ebf5d39dbd670d7b92.jpeg) 

This button should be visible for only new added lines and it will be enabled if item not gifted or voided.

After Saving it we’ll create a new action.

 ![](https://forum.sambapos.com/uploads/default/original/3X/8/d/8da3eeeb77aa10681b5001e9150dd1f1c9defc83.jpeg) 

Price should be negative so we’ll use [=0-Order.Price] expression. Also We should set Increase Inventory setting to True.

And we need a Rule to execute this command.

 ![](https://forum.sambapos.com/uploads/default/original/3X/f/2/f27a5b1f894f932b2abf949c347c6dc40e1a6471.jpeg)

We’ll update Order’s gift state to Refund to prevent it from accidentally gifted or voided.

 ![](https://forum.sambapos.com/uploads/default/original/3X/3/c/3cb95925dd66497b03be7e84736d579ecfd82d4b.jpeg) 

Also we need to map this rule.

We don’t need a cancel Refund button since we’ll only use it for new orders and we can use “Cancel” button to Cancel that line.

Let’s say customer bought two Cookies and paid it. After a short while she wanted to change one cookie with one muffin.

 ![](https://forum.sambapos.com/uploads/default/original/3X/b/7/b7a5ae572bbb5321403f123e127594b8bc27fb16.jpeg) 

We’ll create a new ticket, add Cookies and click Refund button while Cookies highlighted. We’ll also add Muffins on same ticket.

 ![](https://forum.sambapos.com/uploads/default/original/3X/2/1/21fa2a727144a34c1781f033427d923d6de84aeb.jpeg) 

As you can see ticket balance displays ,25. So she needs to pay ,25 more.

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/0/00a6c99d4443479445a520ee7f3f9428e77a422b.jpeg)

---

<div class="post-metadata">

**Author:** ![mayase](https://forum.sambapos.com/user_avatar/forum.sambapos.com/mayase/32/193_2.png) [@mayase](https://forum.sambapos.com/u/mayase)\
**Post date:** [January 16, 2014, 12:30pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/2 "2014-01-16T12:30:53Z")

</div>

Hi Emre, is it working also on V3?

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [January 16, 2014, 12:38pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/3 "2014-01-16T12:38:54Z")

</div>

Not tried but it should work.

---

<div class="post-metadata">

**Author:** ![mayase](https://forum.sambapos.com/user_avatar/forum.sambapos.com/mayase/32/193_2.png) [@mayase](https://forum.sambapos.com/u/mayase)\
**Post date:** [January 16, 2014, 12:41pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/4 "2014-01-16T12:41:45Z")

</div>

i followed this guide on V3.034, the only thing is that no matter what i selected an item and didnt see the Refund button,  
if you have time for this i will be mostly gratefull  
🙂

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [January 16, 2014, 12:49pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/5 "2014-01-16T12:49:52Z")

</div>

Visible states of automation command controls how it appears. Also be sure Visibility setting is “Order Line”

---

<div class="post-metadata">

**Author:** ![madiha](https://forum.sambapos.com/user_avatar/forum.sambapos.com/madiha/32/13950_2.png) [@madiha](https://forum.sambapos.com/u/madiha)\
**Post date:** [June 20, 2014, 3:43pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/6 "2014-06-20T15:43:05Z")

</div>

can someone please tell me the funtionality of the refund button. when is it supppose to be used once ticket close or payment settled?

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [June 20, 2014, 4:05pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/7 "2014-06-20T16:05:34Z")

</div>

The idea behind this implementation is _not to alter_ the original Ticket; instead, a _new_ Ticket is created.

The item to be refunded is added to this new ticket.  
Select (highlight) the item.  
Click the Refund button.  
Settle the Ticket (i.e. with Cash).  
The amount of the item is removed/deducted from the Cash Account.  
And (optionally) the item inventory is increased, since the item is put back in stock.

**Items are purchased, and the Ticket is Settled:**

 ![](https://forum.sambapos.com/uploads/default/original/3X/1/c/1c35434a92d472e1d77f5d4d6940f7bc24c2e930.png)  
 ![](https://forum.sambapos.com/uploads/default/original/3X/f/e/fe41bd567f987ef0e4f3fcf8862e2ef5d3e38f6f.png)

**Customer wants to return an item - _New Ticket_ created, item added to Ticket, and Refunded:**

 ![](https://forum.sambapos.com/uploads/default/original/3X/c/6/c6d7f94e7c750a912396fcb08118b639471b6e3f.png)  
 ![](https://forum.sambapos.com/uploads/default/original/3X/d/5/d5e5476107961f70af016a6506c019f779d81129.png)

**Account Screen shows Cash Refund:**

 ![](https://forum.sambapos.com/uploads/default/original/3X/7/d/7d85a0f2bc1bef2f07c98b433adbbc6dc86c17a5.png)

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [June 20, 2014, 4:33pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/8 "2014-06-20T16:33:34Z")

</div>

Now that I look at this, I see some issues with the Accounts… the Cash Account is correct, but the Sales and Receivables Accounts are incorrect, in my opinion.

Sales balance should be 80 (same as Cash), not 160.  
Receivables balance should be 0, not 80.

 ![](https://forum.sambapos.com/uploads/default/original/3X/3/1/31271642e4788bc799fe0587800bd0fbfc3bd891.png) 

I believe an enhanced setup for this should be done, to reverse the Sale.

Here is the way I have it set up:

Set the Refund Item `Automation Command` to have **Visible State** as `Status=Submitted`.  
Set the Refund Item `Action` **Price** field to `0`.  
Ensure `Tickets > Ticket Types > Ticket` has `Allow Zero Priced Orders` _ **checked** _.

Then, implement this Tutorial:

> [@Re-open Settled Ticket & Cancel Payments](http://forum.sambapos.com/t/re-open-settled-ticket-cancel-payments/1600):
>
> The short version of this originally posted here: [http://forum.sambapos.com/t/how-to-implement-additional-payment-screen-actions/495/2?u=qmckay](http://forum.sambapos.com/t/how-to-implement-additional-payment-screen-actions/495/2) Enable More Ticket Actions Module from Samba Market. This module enables Reopen Closed Ticket and Cancel Payments action types. Create two actions for both of these action types. These actions do not have parameters. Create “Display Ticket” action, name it Refresh Ticket. Set TicketId parameter as 0. Create an Automation Command, name it as you wish a…

---

<div class="post-metadata">

**Author:** ![madiha](https://forum.sambapos.com/user_avatar/forum.sambapos.com/madiha/32/13950_2.png) [@madiha](https://forum.sambapos.com/u/madiha)\
**Post date:** [June 21, 2014, 12:38am UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/9 "2014-06-21T00:38:40Z")

</div>

ok so when we create new ticket how will be select and relate to the previous sale done?

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [June 21, 2014, 1:59pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/10 "2014-06-21T13:59:45Z")

</div>

The New Ticket isn’t related to the Old Ticket at all, other than it would have one or more of the same items on it, to be refunded. That’s the way the original setup is explained.

The alternate setup that I’ve shown is exactly the same Ticket, and that’s why I prefer it. It also doesn’t mess up the Account Balances.

---

<div class="post-metadata">

**Author:** ![fickle\_123](https://forum.sambapos.com/user_avatar/forum.sambapos.com/fickle_123/32/22450_2.png) [@fickle\_123](https://forum.sambapos.com/u/fickle_123)\
**Post date:** [June 26, 2014, 1:15pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/11 "2014-06-26T13:15:13Z")

</div>

I noticed after refunding an order that the **sales total** and **cash income** in `work period report` doesn’t match **total sales** in `item sales report`.

How to fix it?

**work period report** (incorrect grand total and cash income)  
 ![](https://forum.sambapos.com/uploads/default/original/3X/7/b/7bb84b0fb8f9301341553f92ba0c75a94832c5aa.jpeg)

**item sales report** (correct sales ($520.70)

![](https://forum.sambapos.com/uploads/default/original/3X/3/4/34fe3ddb0a5b7454de286b3d9d294ddf05c6b286.jpeg)

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [June 26, 2014, 2:29pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/12 "2014-06-26T14:29:18Z")

</div>

@fickle_123, that’s the point I was trying to make regarding the original setup. The Account debits/credits for the `Sales` and `Receivables` Accounts are inverted during a return/refund, and in my opinion, this is **incorrect**.

The difference (537.60 - 520.70 = `16.90`) is equal to your `Returns` balance, which is not reflected in the Income `Cash` balance, nor in the `Sales` balance. I believe both `Cash` & `Sales` are **incorrect** , while the `Sales by Item Group` balance is correct. _If anyone disagrees, please tell me why._

This is exactly the reason I provided an alternate setup (the setup that I use).

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [June 26, 2014, 2:56pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/13 "2014-06-26T14:56:19Z")

</div>

If it creates a confusion I’ll be glad to correct that. Thank you in advance for helping me on this.

In this tutorial I wanted to recommend a simple solution for one of the biggest issues in retail. Receiving an item back and giving another item instead. Can we call it a Replace?

I think a good alternative will be creating a specific ticket type for refunds, create specific payment types for refund tickets and also create specific accounts for refunds. (Inverse of Sales account). When something needs to be refunded manager creates a refund ticket, add items and select a permitted payment type for refunds. Negative pricing is useful for replace operations. If you don’t need it a specific ticket type will work better.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [June 26, 2014, 3:19pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/14 "2014-06-26T15:19:21Z")

</div>

I like where you’re going with this @emre, regarding creating a different Ticket Type, and Refund Accounts and Transactions.

Keep in mind though, a Refund is not a Replace. If someone buys 6 cans of soda, and then they decide to return 2 cans (unopened), they want their Cash Refunded, not a Replacement (or substitution) for the returned soda.

---

<div class="post-metadata">

**Author:** ![RickH](https://forum.sambapos.com/user_avatar/forum.sambapos.com/rickh/32/51960_2.png) [@RickH](https://forum.sambapos.com/u/RickH)\
**Post date:** [August 12, 2014, 11:42am UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/15 "2014-08-12T11:42:32Z")

</div>

I have setup the refund button as per emre’s instructions, am i right i thinking this only works as an actual replace transaction so refunding an item but having another sale item on the same ticket? If i use this button as it is now will that make the accounts incorrect as you stated above? Should i use @QMcKay setup instead?

@emre will a setup be created for refunds using a refund ticket type?

Rick

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [August 12, 2014, 4:55pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/16 "2014-08-12T16:55:21Z")

</div>

Here is the alternate method that I use…

> [@Refund Item button](http://forum.sambapos.com/t/refund-item-button/2119):
>
> 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: [image] Au…

---

<div class="post-metadata">

**Author:** ![MaggiesPlaceNG](https://forum.sambapos.com/user_avatar/forum.sambapos.com/maggiesplaceng/32/2426_2.png) [@MaggiesPlaceNG](https://forum.sambapos.com/u/MaggiesPlaceNG)\
**Post date:** [August 19, 2014, 8:51pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/17 "2014-08-19T20:51:54Z")

</div>

@QMcKay, Hi, I noticed that you implemented a wifi password button. I would like to know how it works as i intend to implement same. Thanks

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [August 20, 2014, 2:23pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/18 "2014-08-20T14:23:30Z")

</div>

Full Tutorial here… some things will need to be changed depending on your Router Model and Firmware if you want to include the ability to update the Password on the Router (as opposed to just display it).

It is _somewhat_ advanced if you want to be able to alter the password on the router, so please proceed with caution. The simple non-invasive method is presented in the first post, and the more advanced method is presented in a post near the end of the thread.

> [@Router Wi-Fi Password Change & Display](http://forum.sambapos.com/t/router-wi-fi-password-change-display/1621):
>
> This Tutorial aims to provide a simple method to change the WiFi Access Password, and save the Password within SambaPOS so that we may use it for Display or Printing purposes. ::::: SETUP Begin :::::::::::::::::::: Automation Command - WiFiPW Update [image] Automation Command can be mapped as a button (i.e. to the Ticket screen), or no mapping is necessary if you want to place it on an Entity Screen or Account Screen. Name: AU WiFiPW Update Button Header: Change WiFi ))) Mappings: (choos…

Same thread, later post has and advanced method…

> [@Router Wi-Fi Password Change & Display](https://forum.sambapos.com/t/router-wi-fi-password-change-display/1621/22):
>
> Here is the currently working setup.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [October 28, 2014, 2:21pm UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/19 "2014-10-28T14:21:15Z")

</div>

I moved 6 posts to a new topic: [Automation Command not working on Account Screen?](http://forum.sambapos.com/t/automation-command-not-working-on-account-screen/3172)

---

<div class="post-metadata">

**Author:** ![Ryu](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/a88e4f/32.png) [@Ryu](https://forum.sambapos.com/u/Ryu)\
**Post date:** [March 14, 2015, 10:22am UTC](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128/20 "2015-03-14T10:22:50Z")

</div>

Hi guys, first I want to say that the software and the community is incredible…

Question:  
If a ticket with service charges is submitted and closed, and I need to refund this whole ticket including the charges or only the charges, how can I accomplish that? Many thanks!  
Ryu

[Next page](https://forum.sambapos.com/t/how-to-create-a-refund-item-button/128.md?page=2)
