SambaPOS Forum

English Boards => Support => Topic started by: jenem on January 07, 2012, 05:16:12 am

Title: Print Template missing tags
Post by: jenem on January 07, 2012, 05:16:12 am
Hi Emre,
I may be missing something but looking at the recipt print temple that I am unable to find a tag for payment entered and change given.

On a printed receipt I want to record payment given

IE Cost = 4.80
Payment given £10
Change given 5.20

This would cut down on people trying to say they had given a bigger amount than they really had.

I cant seem to identify the template Tags to set this up on the printed receipt.

Edgar
Title: Re: Print Template missing tags
Post by: JohnS on January 07, 2012, 05:40:10 am
I can answer this :)

Had to do this for our pole display.

Two Actions

Action Name - Update Tendered Amount
Action Type - Update Program Setting
Setting Name - TENDERED
Setting Value - [Setting Value]
Update Type - Update

Action Name - Update Change Due
Action Type - Update Program Setting
Setting Name - CHANGEDUE
Setting Value - [Setting Value]
Update Type - Update

One Rule

Rule Name - Change Updated
Event Name - Change Amount Updated
Actions - Update Tendered Amount
Setting Value - [TenderedAmount]
Actions - Update Change Due
Settings Value - [ChangeAmount]


Printer Template

Add the following to the Footer

<J00>Tendered|${SETTING:TENDERED}
<J00>Change Due|${SETTING:CHANGEDUE}


This is a quick run down, you can use this link as a reference for more detailed step by step - http://forum2.sambapos.org/index.php/topic,80.msg379.html#msg379 (http://forum2.sambapos.org/index.php/topic,80.msg379.html#msg379)

Have Fun.
Title: Re: Print Template missing tags
Post by: jenem on January 07, 2012, 06:23:16 am
As ever John,

Ta!

You are getting too good!!

I will try it later.

Thanks

Edgar

PS I should have used search function on forum.
Title: Re: Print Template missing tags
Post by: jenem on January 08, 2012, 02:14:00 am
Thanks for your help John.

I got a bit confused with setting actions but all ok now.
I couldn't see the drop down box in action list. This was because I occidentally used {} instead of []

Edgar
Title: Re: Print Template missing tags
Post by: jenem on January 09, 2012, 11:52:17 am
Hi John, Emre.

Receipts printing OK showing Tendered amount and Change to give and printing fine.

Problem If you next enter cash, the receipt prints the previous amount tendered and change given.

 I have tried to create action and update rule to clear previous amounts but at the moment nothing seems to work.

Any advice on setting rules and actions would be of great help.

Edgar
Title: Re: Print Template missing tags
Post by: emre on January 09, 2012, 01:03:30 pm
I'm not in front of my development machine but as I can remember you can create a rule for "Ticket Closed" event. Can you can try resetting these values to empty value on closing the ticket?
Title: Re: Print Template missing tags
Post by: jenem on January 09, 2012, 01:24:03 pm
Hi Emre,

I had a try with ticket closed but It didn't seem to clear. I'll try again later.

Thanks for your help.

Edgar
Title: Re: Print Template missing tags
Post by: JohnS on January 09, 2012, 08:07:31 pm
Try adding these Actions to a Ticket Closed Rule

Actions - Update Tendered Amount
Setting Value - 0
Actions - Update Change Due
Settings Value - 0
Title: Re: Print Template missing tags
Post by: jenem on January 10, 2012, 01:28:02 am
Hi John,

Thanks I will try later.

From what you have found out, the setting rule can be a system variable or a user numeric or text value which you can test ?

How do you know what system variables are available? did you look through the source code?

As always,

Thanks

Edgar
Title: Re: Print Template missing tags
Post by: JohnS on January 10, 2012, 01:34:02 am
The drop down lists in the different Rules & Actions, printer tags and by trial and error.
Title: Re: Print Template missing tags
Post by: jenem on January 10, 2012, 01:47:25 am
My way of working but you are better than me!!

Edgar
Title: Re: Print Template missing tags
Post by: jenem on January 10, 2012, 02:07:33 am
John,

"Try adding these Actions to a Ticket Closed Rule

Actions - Update Tendered Amount
Setting Value - 0
Actions - Update Change Due
Settings Value - 0"

I tried this but wouldn't work. This is because ticket is closed before being printed. The printed tendered value, change value is zero whatever amount is tendered.

I used the rule with open ticket rule and set the same action and its works ok except tendered amount shows 0 when exact money is tendered.
On the upside at least previous tendered amount and change is cleared!!

Idealy what is required is combining exact cash and tendered amount into one variable.

Edgar 
Title: Re: Print Template missing tags
Post by: JohnS on January 10, 2012, 02:26:54 am
OK, one step closer.

Try adding a rule when Payment Received, check if TENDERED = 0, add the Action Update Tendered Amount and set value to [Amount]

That should work. If not I will set up the Rules & Actions and test my end.
Title: Re: Print Template missing tags
Post by: jenem on January 10, 2012, 02:30:11 am
We're getting there! Got to go out now. Will try later but feeling confident we can crack it.

Edgar
Title: Re: Print Template missing tags
Post by: jenem on January 10, 2012, 05:42:29 am
Hi, John,

tried as you suggested and all works ok now. Phew!

Question.

Do you use split cheque on your system? How should it work?

When I tried it It shows correct split on screen but when split cash is entered it doesnt print a receipt until all amounts are paid and then it prints showing only the last amount entered.

Should SambaPos print 3 receipts for 3 amounts showing split payments?

I dont use split payments but just curious.

Edgar
Title: Re: Print Template missing tags
Post by: JohnS on January 10, 2012, 06:50:47 am
You got me interested in solving this one, as I too should have tendered and change due on receipts as that's what a customer expects to see.
So I set it up earlier to test it, and we were on the money.

Reset TENDERED & CHANGE DUE on CREATE TICKET .
On CHANGE AMOUNT UPDATED Rule set TENDERED and CHANGE DUE to TenderedAmount & ChangeAmount
Then check TENDERED on PAYMENT RECEIVED and if 0, set TENDERED to AMOUNT
Plus the 2 Actions for updating Tendered & ChangeDue

With the Pole Display I didn't need the first or third settings.

Simple now  ::)


Splitting checks is not popular in Oz (in fact its discouraged), this feature just helps the operator think quicker. The receipts print the same after the first amount is paid, no matter what else gets tendered. My solution would be if the bill is split evenly, then take the first amount, hit Print Receipt x3 and take the remaining money.

I tried some Rules to update Tendered, but wasn't successful.

Maybe Emre can clarify this, as I am sure it will come up elsewhere.
Title: Re: Print Template missing tags
Post by: JohnS on January 12, 2012, 02:34:19 am
Emre,

Now that we are so cool having Tendered and Change on the printed receipts :)

I have come across an issue. If you reprint a receipt, the Tendered & Change amounts are from the last sale - not the actual sale for the receipt you are printing.
Title: Re: Print Template missing tags
Post by: emre on January 12, 2012, 10:03:26 am
I think we (including me) shouldn't forget this nice SambaPOS rule.
"If we need to track additional info about tickets we should use Ticket Tags"

We can pretty use "Update Ticket Tag" action for storing tendered and change due amounts on individual tickets and use {TICKET TAG:Tendered Amount, Change Due} tag for printing them on the bill. So we can see these amounts on tickets too. Like The example we can print multiple tags at once by merging them with comma.

The only issue with Ticket Tag printing is we can use {TICKET TAG:x,y,z} tag only once so if you'll need to print additional tags you need to include them in a singe tag by separating them with comma. I changed it like we did for {SETTING:xxx} tag. You'll receive it on next update...
Title: Re: Print Template missing tags
Post by: JohnS on January 12, 2012, 05:33:18 pm
I think we (ME!) need to get more creative with the solutions :)

You don't think of using the unique feature of Ticket Tags for things like change due amounts.
What drew me to SambaPOS was the fresh approach to a POS solution and the unique features it offers, and I know I need to exploit these features more.

Ok, so I have given it a go, and got it to work.

Emre, will the formatting be available to Ticket Tags just like {SETTING:xxx} Tag? During my tests I get this result

Tendered: 5.00
Change Due: 1.80

If I use <J>, <R> or <C>, first line does what its told, second line is left justified.




"To be a Programmer, you need to know what a box is.
To be a Creative Programmer, you need to know how to get out of the box!"
Title: Re: Print Template missing tags
Post by: jenem on January 13, 2012, 01:38:43 am
Hi John,

(or Good morning from Wales)

I dont quite understand what you mean.

 When you reprint a old receipt. If I select a old ticket and select release lock and select print ticket the receipt prints ok.

The receipt shows the amount tendered, change given etc.

If I generate a new sale the receipt shows the correct value ie tendered value, change etc for the new sale.

Edgar
Title: Re: Print Template missing tags
Post by: JohnS on January 13, 2012, 01:52:00 am
Edgar,

That's what I thought until I added the change due to the ticket amount and didn't get the tendered amount on old ticket reprints.

Using Ticket Tags has fixed this for me as the Tendered & Change Due amounts are saved with the ticket.
Title: Re: Print Template missing tags
Post by: emre on January 13, 2012, 04:13:43 am
Hello. I've just uploaded 2.81...
You'll be able to use {TICKETTAG:xxx} (not TICKET TAG) for fine formatting.
Title: Re: Print Template missing tags
Post by: JohnS on January 13, 2012, 04:24:40 am
Thanks Emre.
Title: Re: Print Template missing tags
Post by: jenem on January 15, 2012, 02:27:35 am
Hi Emre,
I have tried to use the TICKETTAG setting but I dont quite understand how it works.
I have Set up a TICKET Tag named TEST and added CHANGEDUE and TENDEREDAMOUNT to ticket tag TEST (Not sure what settings to use in Ticket tag.

I tried adding TICKETTAG setting to print template but was unable to store change and tendered amount with ticket.

Have you any procedures to set up Ticket tags? I have looked at Setting Waiter and Tips using Ticket tags but storing change with ticket is a different application.of Ticket Tags

If I figure it out I'll post later.

Edgar
Title: Re: Print Template missing tags
Post by: JohnS on January 15, 2012, 02:41:11 am
Edgar,

- Create 2 Ticket Tags - Tendered & Change Due. Click Free Tagging and type Price
- Add them to the departments
- Create 2 Actions, 1 for each Tag, set the name, but use [Setting Value] for Tag Value
- In your rule for Change Amount Updated, add the 2 Actions above using [TenderedAmount] & [ChangeAmount]
- Set a new Rule on Payment Received (if your haven't already) with Setting TENDERED=0.00, use both Actions above, setting Tendered to [Amount] and Change Due to 0.00

Use the following on your receipts

<J00>Tendered|${TICKETTAG:Tendered}
<J00>Change Due|${TICKETTAG:Change Due}

Does this help?
Title: Re: Print Template missing tags
Post by: jenem on January 15, 2012, 03:13:39 am
As ever John, Thanks will try out later.

Just going out to repair a compressor :(

Edgar
Title: Re: Print Template missing tags
Post by: emre on January 15, 2012, 04:49:46 am
Hello John and Edgar...
Since Update Ticket Tag action works like Program Settings there is no need to pre-define ticket tags.
It is useful if you want to have side buttons and want to see these tags on reports.
Thanks...

Title: Re: Print Template missing tags
Post by: jenem on January 16, 2012, 07:09:38 am
Hi Emre,

Quote
"Since Update Ticket Tag action works like Program Settings there is no need to pre-define ticket tags.
It is useful if you want to have side buttons and want to see these tags on reports. "

I don't quite understand what you mean.

Do you mean you do not have to create a ticket tag to use TICKETAG on the printed receipt?
Do you have to create different rules/actions to the ones we created for Change Due, Tendered etc?

I just tried to replace SETTING with TICKETTAG but results were 0, and 0 in amount tendered and change.

What are the benefits and application of using TICKETTAG?

Thanks

Edgar
Title: Re: Print Template missing tags
Post by: emre on January 16, 2012, 07:47:39 am
Yes, if you use actions / rules for updating ticket tag values you don't need creating Ticket Tags.
You can update CHANGEDUE ticket tag value with Update Ticket Tag action and print its value with {TICKETTAG:CHANGEDUE}. Program settings are global values but Ticket Tag values stored in ticket header data...

For example you can store "Waiter = Emre" value on a ticket and track which waiter received that order .. You'll need buttons for choosing a waiter. For this reason you'll create a ticket tag group and enter waiter names as values. But for storing ChangeDue = 2.45 we don't need a button because action will do it automatically for us when payment screen generates a change due value. Since these values stored with ticket data reprints will work.
Title: Re: Print Template missing tags
Post by: jenem on January 16, 2012, 08:06:55 am
Thanks Emre,

"Waiter = Emre"

It should be me waiting on you for all your hard work !!

By the way found Turkish text in red while creating department

Edgar


Title: Re: Print Template missing tags
Post by: jenem on January 17, 2012, 10:52:17 am
Hi Emre,

all ok now thanks a lot!!

Edgar
Title: Re: Print Template missing tags
Post by: SAMBA USER on February 07, 2012, 04:18:17 pm
Hi jenem.

I'm new to this and wanted to make my receipt to print like you mention.  Go back and forth with different setting and scenario, but still haven't find the right spot yet.  Could you please provide me with a detail script of how to set codes to get it going.
I got it to print tendered and change due, $0 on the other end so I'm missing a step here or left out something.

A great software, one terminal at a time. ;D

Thanks!
Title: Re: Print Template missing tags
Post by: jenem on February 08, 2012, 01:35:28 am
Hi Sambauser,

Will grab some screenshots bit later to help you.

Edgar
Title: Re: Print Template missing tags
Post by: jenem on February 08, 2012, 01:52:06 am
Hi Sambauser,

Have a look at screenshots see if they are of any help!

Edgar
Title: Re: Print Template missing tags
Post by: SAMBA USER on February 08, 2012, 02:06:30 pm
Hi jenem,
Thanks for the info.  The rule screenshot has a "Event Name" slot and your said Change Amount Updated.  When I click on my it doesn't have that.  I was wondering if that has to be entered manually or it programmed  into it already. 
I entered exactly like you shown but it comes out {TENDERED:TENDEREDAMOUNT} at the end, no number at all.  I probably skip a beat somewhere.

Thanks ! :-[
Title: Re: Print Template missing tags
Post by: jenem on February 08, 2012, 02:36:39 pm
Hi Sambauser,
I have a problem at the moment.(See my other post)

 If I remember you enter it manually You then add the actions you previously created.

You should be able to click on the actions you added and select the relevant tags.

Edgar

Title: Re: Print Template missing tags
Post by: mozhi on February 25, 2012, 10:49:52 am
Hi Jenem/Emre,
Thanks Guys for Providing a detailed summary

I am getting this in the Print
I have done the configuratiuon exactly as said. But I am getting Grand TOTAL: 0.00, which is unexPected. Is it because the TICKETTAG has got three system Value and I am not setting one Value in the rule

==============
Total: 20.47
Paid: 20.47
Grand TOTAL: 0.00
Tendered: Rs.35
Change Due: Rs.14.53
==================


Printer Settings:
=================
<F>=
<EB>
<J10>[{IF DISCOUNT}]
<J10>[{SERVICE DETAILS}]
<J10>[Total Gift:|{GIFT TOTAL}]
<J10>Total:|{TICKET TOTAL}
{IF PAID}
<J00>Tendered:|Rs.{TICKETTAG:TENDERED}
<J00>Change Due:|Rs.{TICKETTAG:CHANGEDUE}
<DB>
<F>*
<C10>*Thank You for Dining With Us!!!*
<F>*
============================
Title: Re: Print Template missing tags
Post by: JohnS on February 25, 2012, 05:24:05 pm
From memory, Grand Total is zero because the ticket is has been paid.
Title: Re: Print Template missing tags
Post by: emre on February 26, 2012, 03:47:32 am
From memory, Grand Total is zero because the ticket is has been paid.

Yes, Paid: and Grand Total: lines generated by {IF PAID} Tag.