Setup Code for ticket printer to Generate Barcode automatic all sales V4

I want to start by saying thank you to the great sambapos community.
I been looking for a way to setup that when i make a sale it generates and prints a barcode for my customers for that sale, that way i can rescan the receipt and find that sale and i have not been able to find this any where i got the badcode to show on my receipt but does not work any help would be amazing thanks in advance. Here is a link to the way my receipt currently looks.Picture of the Receipt

1 Like

Here is another Picture with the actual barcode added on it but it does nothing when it scans.Picture of Receipt

Did you setup any actions or rules to handle the barcode? Can you show your template that has the barcode? What number are you generating for your ticket in the barcode?

1 Like

No i have not added any actions or rules would not know were to, only thing i added was the code to the printing template. Here is a picture of the code.Picture or the Code

It does not know what to do with the barcode unless you tell it by using Display Ticket action, variables, and Rule for handling the input.

1 Like

Open Ticket by Scanning Ticket Barcode

Create the following action

Create the following rule

This is the flow from the POS
Key in (and press enter) or scan barcode, in this case the Ticket ID is keyed in so you can see where it would appear, Ticket ID for the ticket is 2852

The ticket is opened in the pos screen

I have re-print receipt and gift receipt buttons enabled and those are the only things you can do. You can develop however you like but if you want to perform anything on a paid ticket you will need to purchase the More Ticket Actions from Samba Market to re-open closed tickets and cancel payments

1 Like

how would i add the ticket action, variables and rule?

Step 1 - Create the action

go to manage

then click automation

then click actions and then add action

then create the action

Step 2 - Create the Rule that makes the action work
Go to Manage>Automation>This time click on RULES instead of actions and click ADD RULE

Create the following rule and click SAVE

Now you should be able to scan the barcodes to open the ticket, i use this for parked sales so if a customer orders an item and will come back for it later i can park the sale, which generates a parked sale receipt so when the customer comes back i can scan the receipt barcode which opens the ticket so customer can pay

hope this helps

4 Likes

Okay thank you so much for the detailed very much easier for me thanks i have created all that on my ticket template is there anything else need to be except the code 123456789 or is that incorrect because it prints the barcode with that command but it does not scan even after setting the action and rule as you stated it tries to scan but does nothing.

can you show screen shot of your ticket template?

1 Like
[LAYOUT]
-- General layout
<BMP>c:\logos.bmp
<EB>
<C11>Computer Tronic
<C10>Your Solution!
<L>
<C00>Address 
<C00> City, State, Zip
<C00>Phone:
<DB>
<L>
<C00>Website: www.computertronic.com
<C00>Email:
<L>
<J00>Date: {TICKET DATE}|Tax Invoice:| {TICKET NO}
<J00>Time: {TIME}|Sales Rep:{USER NAME}
<L>
{ENTITIES}
<L00>----------------- Items ------------------
<L>
{ORDERS}
[<L00>----------------- Notes -----------------
<L>
{NOTE}
<L>]
<L00>----------------- Total ------------------
{DISCOUNTS}
-- [<J00>Total Gift|${ORDER SALES TOTAL:Gift}]
<EB>
<J00>Subtotal|$ {PLAIN TOTAL}
<J00>Sales Tax|${TAX TOTAL}
<J01>Total|$ {TICKET TOTAL}
<DB>
<J00>Tendered|${TENDERED TOTAL}
<J00>Change|${CHANGE TOTAL}
[<L00>---------------- Payment -----------------
{PAYMENTS}]
<F>-
<C10> T H A N K   Y O U
<L>
<EC>
<BAR> 123456789
<L>
<C00>Exchange only accepted within 7 days
<C00>from purchase date in original packaging,
<C00>apply to Accessories Only.
<C00>No returns on Cellphones, Tablets,
<C00>Computers or Software.
<L>
<BMP>c:\logos12.bmp
<L>


[DISCOUNTS]
<J00>{CALCULATION NAME}[=F('{CALCULATION AMOUNT}')]|{CALCULATION TOTAL}

[PAYMENTS]
<J00>{PAYMENT NAME}|${PAYMENT AMOUNT}

[ORDERS]
-- Default format for orders
<L00>{NAME}
<J00>{ORDER TAGS}|{QUANTITY}x ${TOTAL}
<L>

[ORDERS:Gift]
-- Format for gifted orders
<L00>{NAME}
<R00>{QUANTITY}x *GIFT*
{ORDER TAGS}
<L>

[ORDERS:Void]
-- Nothing will print for void lines

[ORDER TAGS]
-- Format for order tags
* {ORDER TAG NAME} - RRP ${PRICE}

[ENTITIES:Customer]
-- Customer entity format
<C00>Account: {ENTITY NAME}
<C00>Balance: $[=F(0-TN('{ENTITY BALANCE}'))]
<L>

[ENTITIES:Layby]
-- Customer entity format
<C00>Layby: {ENTITY NAME}
<C00>Balance: $[=F(0-TN('{ENTITY BALANCE}'))]
<L>

[ENTITIES:Gift Certificate]
-- Customer entity format
<C00>Gift Certificate: {ENTITY NAME}
<C00>Balance: $[=F(0-TN('{ENTITY BALANCE}'))]
<QR>{ENTITY NAME}
<L>

Here is a link to the img not sure if its clear on there let me know anything else thanks again for the helpPicture Receipt

its what i thought, on your ticket template you have <BAR> 123456789 that means every ticket will have a barcode produced with the number 123456789 (which you also have a space in front of) so samba probably cant open a ticket when you scan that barcode as EVERY ticket has the same barcode with the same value of 123456789

Samba assigns a unique Ticket ID when the ticket is closed so the first thing we need to do is change your ticket template to be <BAR>{TICKET ID} this will now generate a barcode on the receipt with the unique ticket ID that samba assigns that ticket

1 Like

Think this through logically. If you type <BAR> 123456789 you are telling it to print a barcode that equals 123456789 so now EVERY receipt will be 123456789 obviously this would not work.

@RickH is correct you should set it to <BAR>{TICKET ID}

1 Like

Once you have changed your ticket template, try it again. it may not print any barcodes on your receipt just yet as it depends when you have your receipt set to print. The ticket ID is only generated AFTER the ticket is closed so if your receipt prints before the ticket closing process in samba technically the ticket ID does not yet exist so it cannot print a barcode.

We overcome this by making the receipt print AFTER the ticket has closed so that it can access the generated ticket ID and print it on the receipt. This is something that @Jesse helped me with so, ensure you have made the changes to your ticket template ans show us a screenshot, and do a test sale to see what prints on the receipt. then if we need to change how your receipts are set to print we can help with that

1 Like

Sorry @Jesse not too familiar with the system but your right i guess it does make since, @RickH i have added {TICKET ID} to my ticket replacing what i had from before now it is printing the barcode but when i try and scanned the code still don’t pull up the order.

can you show us screenshots of your action and rule

1 Like

What screen are you in when you are scanning it?

1 Like

good point, you need to be in the POS screen when scanning

1 Like

Okay here ill add a couple screen shots let me know and yes i am in the POS screen when scanning i will add a shot of that too.Here is the copy of the receipt after printingHere is the Action pictuerHere is the Action
Ticket TemplateHere is the Rule PictureRule Picture