# Gift Certificate Sales

**URL:** <https://forum.sambapos.com/t/gift-certificate-sales/12892>\
**Category:** V5 Question\
**Created:** [October 17, 2016, 2:25pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892 "2016-10-17T14:25:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dolispy](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@dolispy](https://forum.sambapos.com/u/dolispy)\
**Post date:** [October 17, 2016, 2:25pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/1 "2016-10-17T14:25:29Z")

</div>

Continuing the discussion from [Gift Certificate Sales & Redemption](https://forum.sambapos.com/t/gift-certificate-sales-redemption/1539):

> [@Gift Certificate Sales & Redemption](https://forum.sambapos.com/t/gift-certificate-sales-redemption/1539/1):
>
> Gift Certificate Entity & Account is created using a name composed of current Date, Time, and Value of the GC being purchased (i.e. GC2014061315325614520 would be the Entity Name & Account Name of a GC purchased on 2014-06-13 at 15:32:56.145 for a value of $20).

Is it possible to just have a simple name like just date and value or time and value…the numbers may seem too many for simpletons like myself…just thinking out loud.

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [October 17, 2016, 2:45pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/2 "2016-10-17T14:45:03Z")

</div>

numbers are far less easy to guess.

Get a barcode scanner and print the barcode on the bottom of the gift certificate so it can be easily scanned in 🙂

---

<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 17, 2016, 2:52pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/3 "2016-10-17T14:52:10Z")

</div>

Yes, that is possible. But what if you sell 2 GCs with the same value at the same time, or on the same day? Then there is no way to distinguish between them so that they can be “validated”.

In any case, the GC number is created in the Rule named **`GC Purchased & Printed`** via the Action named **`GC Create`** , using the following syntax:

```auto
[=Helper.GetUniqueString()][=Order.Price]

```

The `Helper.GetUniqueString()` function generates a date/time like `201610170842432` and the `Order.Price` is used to get the value of the GC.

When the Tutorial was written, we did not have Date or Time Tags that supported formatting like we do now… so we could theoretically change this to be something like:

```auto
[='{DATE:yyyy-MM-dd_HH.mm.ss.fff}' + '_' + '{PRICE}']

```

That ^ would produce something a little more readable, like: `2016-10-17_09.01.27.251_100.00`

Or use whatever naming convention that you want. You could even use a Global Program Setting (a value stored in the DB) that increments by 1 every time you sell a GC, and then the naming could be something like:

```auto
[='{SETTING:GCcounter}' + '_' + '{PRICE}']
// or just ...
[='{SETTING:GCcounter}']

```

Or using the `{RANDOM:X:X}` Tag, you can generate a number on the fly that is a mix of letters and/or numbers of a fixed length.

```auto
{RANDOM:<length>:<chars>}

<length>:Length of generated string. Default 8.
<chars>: Characters used to generate string. Default ABCDEFGHJKLMNPQRSTUVWZYZ123456789

```

For example:

```auto
{RANDOM:5:1234567890}

```

… will generate a 5 digit random number.

* * *

> [@GreatShakesBar](#):
>
> numbers are far less easy to guess

That is a good point… you don’t want people just creating their own GC at home … you need a way to “validate” the authenticity of the GC, which the long number does for you because it is unique down to the millisecond and it creates a GC Entity and Account that you can match up with the printed GC.

---

<div class="post-metadata">

**Author:** ![dolispy](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@dolispy](https://forum.sambapos.com/u/dolispy)\
**Post date:** [October 17, 2016, 3:02pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/4 "2016-10-17T15:02:39Z")

</div>

yh @QMcKay I figured that was the main reason behind that to make it easy and not complicated…i tried the random option on the gu create…didnt even cross my mind to include length which made it confusing. Thanks for the help as always (y)

---

<div class="post-metadata">

**Author:** ![dolispy](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@dolispy](https://forum.sambapos.com/u/dolispy)\
**Post date:** [October 17, 2016, 3:02pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/5 "2016-10-17T15:02:48Z")

</div>

@GreatShakesBar loool yh quite easy with scanners right

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [October 17, 2016, 3:02pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/6 "2016-10-17T15:02:54Z")

</div>

> [@QMcKay](#):
>
> {RANDOM:5:1234567890}

its a shame my card programmer don’t do this.

A different topic but I wonder if the software for programming magcards could ever be integrated into samba at some point?

---

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [October 18, 2016, 12:25pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/7 "2016-10-18T12:25:14Z")

</div>

> [@GreatShakesBar](#):
>
> but I wonder if the software for programming magcards could ever be integrated into samba

Hey @GreatShakesBar this would just be a printer template using the escape codes to trigger the Mag Card Printer Features. Very similar to pinging a cash draw.

Our legacy database prints to Mag Cards Printers quite a lot - in fact you can do the same by including the command sequences in a Notepad document and printing the document. Stuff like writing to Track 1,2, or 3 is all incorporated.

You just need the manual for the Mag Card printer and off you go.  
Gluck.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [October 18, 2016, 12:27pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/8 "2016-10-18T12:27:13Z")

</div>

Hmmmm, interesting, what kind of writer do you have?  
I have just a cheapy USB one which has its own basic china made app to read/write with…

---

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [October 18, 2016, 12:31pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/9 "2016-10-18T12:31:12Z")

</div>

From Great Shakes post he was referring to a Printer - these are actually expensive printers that use Mag Cards as their stock (i.e. 100 Cards Stacked). The printer is designed to Print on the front of the Card things such as Photo ID, Text Details and ALSO programme the Mag strip on the back of the card.

I know for sure 1 thing, they are not cheap!  
Oh I know another thing? They are temperamental and can be a big pain in the butt!

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [October 18, 2016, 12:36pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/10 "2016-10-18T12:36:59Z")

</div>

Oh, ok, I could have sworn he was talking about programming mag cards…  
Yer your right, looks at getting one a couple of times but temperamental as you said put me off getting used which was only way I could ever justify the price…  
Think they use ribbon type printing method, at one point had a guy I found through ebay who could print small qty for cheap but lost contact with him, plus now prefer RFID although printed RFID cards would be cool.

---

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [October 18, 2016, 12:41pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/11 "2016-10-18T12:41:58Z")

</div>

> [@JTRTech](#):
>
> Oh, ok, I could have sworn he was talking about programming mag cards

You could be correct!  
Mate I had a few weeks, end on end, of busy+crap+busy+moving+family+frustrated not getting my work done 😫 Probably should of just shut up LOL

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [October 18, 2016, 1:12pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/12 "2016-10-18T13:12:01Z")

</div>

yeah, was on about writing them lol 😃

Oh well, informative anyway

---

<div class="post-metadata">

**Author:** ![pauln](https://forum.sambapos.com/user_avatar/forum.sambapos.com/pauln/32/12698_2.png) [@pauln](https://forum.sambapos.com/u/pauln)\
**Post date:** [October 18, 2016, 11:22pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/13 "2016-10-18T23:22:24Z")

</div>

> [@GreatShakesBar](#):
>
> was on about writing them

PS: The Printer Writes them and also can do graphic designs at the same time…

---

<div class="post-metadata">

**Author:** ![GreatShakesBar](https://forum.sambapos.com/user_avatar/forum.sambapos.com/greatshakesbar/32/50947_2.png) [@GreatShakesBar](https://forum.sambapos.com/u/GreatShakesBar)\
**Post date:** [October 19, 2016, 8:03am UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/14 "2016-10-19T08:03:12Z")

</div>

Write as in programme lol.

Damn communication!

😂😂😂

---

<div class="post-metadata">

**Author:** ![Ahmed1977](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ahmed1977/32/29540_2.png) [@Ahmed1977](https://forum.sambapos.com/u/Ahmed1977)\
**Post date:** [February 4, 2017, 4:55pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/15 "2017-02-04T16:55:39Z")

</div>

Hello and thanks for QMcKay for the great detailed tutorial

> [@Gift Certificate Sales & Redemption](https://forum.sambapos.com/t/gift-certificate-sales-redemption/1539):
>
> Gift Certificate Sales & Redemption This is a working implementation for Selling & Redeeming variable-value Gift Certificates (GCs) that are tracked under their own individual GC Account and 2 “GC Balance” Accounts called “GC Purchases” and “GC Redemptions”. GC Sale: Customer comes in to purchase a Gift Certificate (GC). Enter the value of the GC that the customer wants to purchase into the NUMBERPAD ($10, $20, etc). Select GC Product (open price). Settle the ticket - customer pays for the G…

I am working on it for 3 days now, I followed all steps as I need this GC very much, I will use it to give some GC for free as an advertising my restaurant also I will give employee every month a GC for their free meals. Any way I have few problems with this which I tried to fix before bothering any one, but could not. So the whole mechanism is working except when going to GC search screen I can’t create new GC.

This is the screen

 ![](https://forum.sambapos.com/uploads/default/original/3X/b/5/b58b546272bf63c53428704a8024e1e9e69505bf.jpg)

and when Clicking New Gift Certificate I can’t generate a new GC and pay for it and print it.

 ![](https://forum.sambapos.com/uploads/default/original/3X/1/8/1815ddebf9f6e369bcf521744dc14e39b91ae832.jpg)

I just can manage to create new GC from buying it through the normal POS screen and choosing GC from items

 ![](https://forum.sambapos.com/uploads/default/original/3X/f/c/fc550493811d13b47f0e40a88dd77751d7667e21.jpg)

and pay for it but no print out of GC only normal invoice prints

 ![](https://forum.sambapos.com/uploads/default/original/3X/1/2/125f8b89ce7be40c2d37c2590534afbabdaec7d1.jpg)

this is the GC print template preview

 ![](https://forum.sambapos.com/uploads/default/original/3X/2/1/21566214c48b3e75e12885a3ae7f3d67023b3218.jpg) 

so this is my problem. Another question if I need only the Admin who can create new GC, but everyone can redeem it. Thank you in advance for helping me.

---

<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:** [February 4, 2017, 5:16pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/16 "2017-02-04T17:16:43Z")

</div>

> [@Ahmed1977](#):
>
> when Clicking New Gift Certificate I can’t generate a new GC and pay for it and print it.

Correct, you cannot do that. It is not designed to work like that.

> [@Ahmed1977](#):
>
> I just can manage to create new GC from buying it through the normal POS screen and choosing GC from items

Correct, that is the way to create a new GC.

> [@Ahmed1977](#):
>
> no print out of GC only normal invoice prints

When you Settle the Ticket, it should Print the GC. If it is not doing that then there is something wrong in your setup. No way to tell what that might be without seeing screenshots of the Print-related elements.

> [@Ahmed1977](#):
>
> if I need only the Admin who can create new GC

That could be done by constraining the Rule for Order Added to Ticket, by checking the `{:CURRENTUSER}` and/or `{:CURRENTUSERROLE}` settings.

* * *

P.S. Further in the Tutorial Topic, there is details on how to Create a GC manually using a button on the left instead of needing to Settle the Ticket. You still need to add the GC Product to the Ticket, but then you just click the button and it is created and the Order is removed from the Ticket so it does not need to be Settled.

> [@Gift Certificate Sales & Redemption](https://forum.sambapos.com/t/gift-certificate-sales-redemption/1539/40):
>
> This addition is so simple, that I am going to add it to my system. One reason for being able to do this (for me) is when I donate a GC to a charity, and I don’t want tender any cash for it or show it as a Sale.

---

<div class="post-metadata">

**Author:** ![Ahmed1977](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ahmed1977/32/29540_2.png) [@Ahmed1977](https://forum.sambapos.com/u/Ahmed1977)\
**Post date:** [February 4, 2017, 5:28pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/17 "2017-02-04T17:28:53Z")

</div>

Thank you very much for your fast reply, it clears every thing for me and thank you again. I will work on the printing issue. another quick question can we remove the two buttons Edit Gift Certificate and New Gift Certificate.

 ![](https://forum.sambapos.com/uploads/default/original/3X/2/c/2cbeb51677c1cd4c97f08f3441d3059128ece149.jpg)

thank you very much again.

---

<div class="post-metadata">

**Author:** ![Ahmed1977](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ahmed1977/32/29540_2.png) [@Ahmed1977](https://forum.sambapos.com/u/Ahmed1977)\
**Post date:** [February 4, 2017, 5:37pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/18 "2017-02-04T17:37:38Z")

</div>

Sorry for this another question can I make the item or the category Gift Certificate only visible to admin. so only the admin can sell this item.

---

<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:** [February 4, 2017, 6:24pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/19 "2017-02-04T18:24:23Z")

</div>

> [@Ahmed1977](#):
>
> can we remove the two buttons Edit Gift Certificate and New Gift Certificate.

You cannot remove them from a default/stock Entity Screen that is configured for **Search** Mode.

However, if you configure your Entity Screen to be **Custom** or **Layout** Mode, then you can add an **Entity Search Widget** (which looks identical to a Search Mode Screen), and you will have control over the buttons that are available in that Widget, so you can configure it to not show those buttons.

 ![](https://forum.sambapos.com/uploads/default/original/3X/a/e/ae490edacfc1580f1f32b74e227712d974d3b797.png)

When you change to **Custom** or **Layout** Mode, then when you click on the **Select Gift Certificate** button, you will initially see a _blank_ screen. The following screenshot shows a screen set to **Layout** Mode. Right-click in the middle of the screen and select **Design Mode** …

 ![](https://forum.sambapos.com/uploads/default/original/3X/6/4/6491cab81b36322306cea3bbdd579d83af891ee8.png)

Once you are in Design Mode, the border of the screen will turn RED. Right-click on the screen and choose **Add Widget \> Entity Search** …

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

Now click on the Widget to highlight it, then right-click and select **Settings**. You can then choose which buttons appear on the Widget …

 ![](https://forum.sambapos.com/uploads/default/original/3X/8/a/8adf7565d6f01cdc173eac47df2c3de8ba7f9e59.png)

If you configure the Widget as shown above, then it will look something like the following when you exit Design Mode …

 ![](https://forum.sambapos.com/uploads/default/original/3X/e/a/eace84ba5ee2e9207a54c03d809e49c5977612be.png)

* * *

P.S. The nice thing about choosing **Layout** Mode over **Custom** Mode is that **Layout** Mode will automatically adjust the content of the screen to fill the entire area, no matter what resolution you are using on different Terminals …

 ![](https://forum.sambapos.com/uploads/default/original/3X/b/0/b05a2a7dd66befa35b1d05252849afd147a5540f.png)

---

<div class="post-metadata">

**Author:** ![Ahmed1977](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ahmed1977/32/29540_2.png) [@Ahmed1977](https://forum.sambapos.com/u/Ahmed1977)\
**Post date:** [February 4, 2017, 6:34pm UTC](https://forum.sambapos.com/t/gift-certificate-sales/12892/20 "2017-02-04T18:34:49Z")

</div>

More than excellent explanation, Can’t give the the thanks you deserve.

[Next page](https://forum.sambapos.com/t/gift-certificate-sales/12892.md?page=2)
