Trying to understand Ticket Templates

What is the proper way to show entity tags on other templates except Ticket Template ?
(i search in forum and i think taht I didn’t find anything, in case i’m wrong please point me :smile: )

For example I want on a ticket tos show Customer Name and Balance

If i use {ENTITY NAME:Customer} it gives me ENTITY NAME
If i use
[ENTITIES:Customer]
– Customer entity format
Client: {ENTITY NAME} | Tel:{ENTITY DATA:Telephone}
Addr.{ENTITY DATA:Address} | Floor:{ENTITY DATA:Floor}


[Balance: €[=F(0-TN(’{ENTITY BALANCE}’))]]

it gives me ENTITY NAME

Need more information. Post your template. Show a screenshot of printed result.

Fair enough …
Give me some time to prepare it …

Here what i’ve got (the secons one is for the Second Screen)
If you see the Customer name in the in the second template is working …
and in te seccond picture the ballance should be 10,00 and not 0
I’m sure i have done something wrong …

[LAYOUT] -- General layout <EB> <BMP>C:\Users\Marios\Documents\SambaPOS4\images\free_coffee_1.bmp <T>Coffee Shop <DB> <C>{DOCUMENT DATE} {DOCUMENT TIME} <C>{ENTITY NAME:Customer} <L> <EB> {ORDERS} <DB> <L> {TRANSACTIONS} <C>NO CASH VALUE <F>* [TRANSACTIONS] <C>{AMOUNT} € <L> <F>- <EC> -- <QR>{SOURCE ACCOUNT} -- <BAR>{SOURCE ACCOUNT} <EL> <J00>{SOURCE ACCOUNT} | {AMOUNT} € [ORDERS] -- Default format for order <J00>{QUANTITY} {NAME} {ORDER TAGS}

<l><html>
<l><head>
<l><script src="live.js"></script>
</head>
<l><body>
<l><center><img src="cbc.jpg" width=100% border=0></center>
<l><pre><center><font size="3">Customer: {ENTITY NAME:Customer}</font>
<l><pre><center><font size="3">[Balance: €[=F(0-TN('{ENTITY BALANCE}'))]</font>
<l><pre><center><font size="6">Σύνολο             € {TICKET TOTAL}</font>
<l><center><div style="width: 110px;font-size: 22px;position: absolute;right: 0;left: 0;background: green;color: #FFF;margin: auto;">ΠΡΟΙΟΝΤΑ</div></center>
<l><div style="background: #EEE; width: 400px;padding: 0px 0px 15px 0px;font-size: 14px;font-family: calibri;">
{ORDERS}
<l></div>
<L>
[<L00>----------------------- Notes -------------------------
<L>
{NOTE}
<L>]
<li><table width="360" border="0" style="margin-top: -24px;border-bottom: solid 1px #BBB;padding: 5px;font-family: calibri;font-weight: bold;">
<li>  <tr>
<li>    <td width="152"></td>
<li>    <td width="124">Μετρητά</td>
<li>    <td width="62" style="text-align:right">€ {TENDERED TOTAL}</td>
<li>  </tr>

<li>  <tr>
<li>    <td width="152"></td>
<li>    <td width="124">Ρέστα</td>
<li>    <td width="62" style="text-align:right">€ {CHANGE TOTAL}</td>
<li>  </tr>
<li></table>
<C00>Ε Υ Χ Α Ρ Ι Σ Τ Ο Υ Μ Ε
<l></center></pre>
<l></body>
<l></html>



[ORDERS]
-- Default format for orders
<J00>
<li><table width="360" border="0" style="margin-bottom: -50px; border-bottom:solid 1px #BBB; padding:5px">
<li>  <tr>
<li>    <td width="30">{QUANTITY}.</td>
<li>    <td width="263">{NAME}</td>
<li>    <td width="83" style="text-align:right">€ {TOTAL AMOUNT}</td>
<li>  </tr>
<li></table>
<l><div style="text-align:left;">
{ORDER TAGS}
<l></div>

[ORDER TAGS]
-- Format for order tags
<li><table width="360" border="0" style="margin-left: 17px; font-size: 13px;margin-top: 19px;margin-bottom: -36px;">
<li>  <tr>
<li>    <td width="45"></td>

<li>    <td width="263">{ORDER TAG NAME}</td>
<li>    <td width="83" style="text-align:right">{PRICE TAG}</td>
<li>  </tr>
<li></table>   

<img src="/uploads/default/original/3X/3/7/3722898e6a6e7a3e4063940cb6795b00cf80f0af.PNG"width="475"height=“366”>

What is <li> tag? I dont think that is valid. You also seem to have some brackets out of place.

Butting in a bit late however is this the default entity for customers? Isnt the customer entity presetup in samba Customers not Customer?

You obviously might have changed it from Customers or maybe I have but cant remember but thought Id give my 2 pence worth :smile:

Although I have Name = Customers and Entity Name = Customer… :confounded: think im barking up the wrong tree…

On a separate note, you have an unterminated square bracket on this line which is why you have one showing on your second screen template and further down

1 Like

Ok, think I might nave it…
Your [quote=“marios, post:4, topic:8641”]
{ENTITY NAME:Customer}
[/quote]
in [quote=“marios, post:4, topic:8641”]
[LAYOUT] – General layout <EB> <BMP>C:\Users\Marios\Documents\SambaPOS4\images\free_coffee_1.bmp <T>Coffee Shop <DB> <C>{DOCUMENT DATE} {DOCUMENT TIME} <C>{ENTITY NAME:Customer} <L> <EB> {ORDERS} <DB> <L> {TRANSACTIONS} <C>NO CASH VALUE <F>* [TRANSACTIONS] <C>{AMOUNT} € <L> <F>- <EC> – <QR>{SOURCE ACCOUNT} – <BAR>{SOURCE ACCOUNT} <EL> <J00>{SOURCE ACCOUNT} | {AMOUNT} € [ORDERS] – Default format for order <J00>{QUANTITY} {NAME} {ORDER TAGS}
[/quote]

Doesn’t work because its a transaction document!
Its reporting on account transaction not ticket/entity.
and the ticket is showing transaction not orders.

1 Like

If this is true then it would have helped to share that information early on in the discussion.

The first one looks like a Gift Certificate Template, and the way it reads is for printing Transactions, not Orders. It is not a regular Bill/Ticket Template.

  • instead of Customer, you need to use {ENTITY NAME:Gift Certificate}
  • there should be no {ORDERS} placeholder and no [ORDERS]section in the GC Template

A normal Bill/Ticket Template would not have any of these elements:

<C>{DOCUMENT DATE} {DOCUMENT TIME}
{TRANSACTIONS}
<C>NO CASH VALUE
<F>*
[TRANSACTIONS]
<C>{AMOUNT} €
<L>
<F>-
<EC>
-- <QR>{SOURCE ACCOUNT}
-- <BAR>{SOURCE ACCOUNT}
<EL>
<J00>{SOURCE ACCOUNT} | {AMOUNT} €

A Bill/Ticket Template would look something like this:

[LAYOUT]
-- General layout
<EB>
<BMP>C:\Users\Marios\Documents\SambaPOS4\images\free_coffee_1.bmp
<T>Coffee Shop
<DB>
{ENTITIES}
<F>-
{ORDERS}
<F>=
{DISCOUNTS}
<F>-
{TAXES}
<J00>Tax Total:|L{TAX TOTAL}
{SERVICES}
<EB>
<J10>TOTAL:| {TICKET TOTAL}
<DB>
<F>=
{PAYMENTS}

-- all placeholders above refer to these sections

[DISCOUNTS]
<J00>{CALCULATION NAME} {CALCULATION AMOUNT}|{CALCULATION TOTAL}

[PAYMENTS]
<J00>{PAYMENT NAME}: | {TENDERED}
<L00>Desc:{DESCRIPTION}

[ORDERS]
<J00>{QUANTITY} {NAME}| {TOTAL PRICE}
{ORDER TAGS}

[ORDER TAGS]
<J00>    {ORDER TAG QUANTITY} {ORDER TAG NAME}| {ORDER TAG PRICE}| [=F((TN('{QUANTITY}')*TN('{ORDER TAG PRICE}')),'0.00'))]

[ENTITIES:Table]
<L00>Table: {ENTITY NAME}

[ENTITIES:Customer]
<J00>Cust: {ENTITY NAME}|Bal: {ENTITY BALANCE}

[TAXES]
<J00>Tax {TAX NAME} ({TAX RATE}%):| L{TAX AMOUNT}

[SERVICES]
<J00>{CALCULATION NAME} ([=F(TN('{CALCULATION AMOUNT}'))]):| {CALCULATION TOTAL}
1 Like

As for balance… when are you triggering the second screen update?
If its on payment processed the balance will not be up to date as the transactions are not generated untill the ticket is closed.
You will either need to to BALANCE + TICKET TOTAL as a rough bodge to rework your second screen flow.

This would depend on what he is wanting to be customer name, the other screenshot shows a customer name working so expect he is doubling up on entities (customer details & gift voucher)

When I did my gift voucher setup I added a custom field for the voucher customer name and called it with;
{REPORT ENTITY DETAIL:EC.Customer Name:(EN={ACCOUNT})} (sorry if this is not 100% as do not have that setup loaded at the minute

@JTRTech, your setup is way beyond the mistakes that are being made here. I made it clear that he was using a Transaction Template, and since it has a GC Account number in it, he obviously has the GC setup installed.

I wonder if people even bother reading sometimes…

I need to take a break from this today I guess. Frustrated and lots of “real” work to do for my venues anyway…

1 Like

I get that, was purely saying that to me it looked like he was trying to add the customers name to the transaction receipt by doubling up the entities to use both gift voucher and customer entities as his other screenshot showing a customer name of ‘asdfgh’
And was offering a idea that if he wanted customer name (like i did in my alternative method) that would be a solution which should be useable with your GC setup.

Wow a lot of informations …
First of all Thank you for your answers …
The most of waht you suggested i have already try them …
(I always search the forum for solution and i post only if I can’t find any or if i’m desperate :grin:)
For example

  1. I want the name of the customer who bought the ticket
  2. Gift Certificate already used but nothing …

{ENTITY NAME:x} will not work on a transaction document template as its looking at accounts not entities.

Did you try what he said there?

Can you show your rule thats executing it?

yep

This is the transaction document template from QMcKays tutorial;

No mention of entity name there…

{ENTITY NAME:Gift Certificate} would give gift certificate number on the receipt when sales re charged to the account.

It can but you will need to do some additional modifications.