Display customer name on table

Hi to everyone,
we have a sambapos v3 edition and nowe we are preparing to migrate to a full licensed v5 sambapos. Now we use sambapos on an hotel bar. We have also made a connection betwen sambapos and the hotel pms so we can import the client name (using another entity name called “Albergo” ).
So, on the V5 we can see that ther’s the possibility to display the customer name on the table. We have used the emre tutorial “Changing Table Button Captions”. however we can only display customer entity and not “albergo” entity.
how we have to modify the string to display both entity on the table?
In a table we can have a Customer … or a Customer Hotel… or togheter.
our string now is:

<bold>$1</bold>{REPORT TICKET DETAILS:'<br/>'+[EN.Cliente]:(TEN.Tavolo=$1) and (TCET=Cliente) and T.RemainingAmount>0}

we have to add entity “Albergo”

tnx in advance.

Andrea

I think the Alberto entity has not been added to ticket type so that why it is not available.

I’m not at computer you I’m sure it in Ticket -> Ticket Type somewhere.

BTW why don’t just combine both Alberto and Customer together. You may add a field to mark it as pms or normal customers.

Hi sukasem, thank you for your fast answer. We have 2 separate account due to the way we sincronize the hotel client with samba. The pms have an multiple access and we have to take data from many database and import in sql. During this operation the hotel accounts are deleted and re-imported every 15 minutes.
by the way we have partial solved the problem changing the script for the table name.

$1 {REPORT TICKET DETAILS:’
’+[EN.Albergo] + [EN.Cliente] :(TEN.Tavolo=$1) and T.RemainingAmount>0 }

with this script we can see correctly bot the account.

But, if we open a table without a name we obtainy an epmpty space on the tbale name. There’s a way to ignore with the script tablet with no account name? as you can see the last two table has an hotel account and a “cliente” account. The first one is a table open with no account inside.

Try $1 [='{REPORT TICKET DETAILS:[EN.Albergo] + [EN.Cliente] :(TEN.Tavolo=$1) and T.RemainingAmount>0 }'.length > 0 ? '{REPORT TICKET DETAILS:'<br/>'+[EN.Albergo] + [EN.Cliente] :(TEN.Tavolo=$1) and T.RemainingAmount>0 } : '']

thank’s sukasem. we try on report test and we obtain $1 … then in state we put your script but when we go to the pos sambapos crash.
actualy i have solved with $1 {REPORT TICKET DETAILS:’’+[EN.Albergo] +[EN.Cliente] :(TEN.Tavolo=$1) and T.RemainingAmount>0 }
it works but ther’s no possibility to break a line as you can see on the image

Ah because '<br/>' single quote break it. Try use double quote for br "<br/>" or try opposite leave br single quote and change other to double quote. The idea is <br/> need to be inner quote.

also with single or duble br we have the problem that if we put a break line we have also a break line on table without account name. we have found (TCET=Customer)… is it possibile to add it using somthing like this:

$1 {REPORT TICKET DETAILS:’’+[EN.Albergo] +[EN.Cliente] :(TEN.Tavolo=$1) and (TCET=Clienti ) and (TCET=Albergo ) and T.RemainingAmount>0 }

in this way is not working

tnx

May also try this:
[='{REPORT TICKET DETAILS:[EN.Albergo] + [EN.Cliente] :(TEN.Tavolo=$1) and T.RemainingAmount>0 }'.length > 0 ? '<br/>+{REPORT TICKET DETAILS:[EN.Albergo] + [EN.Cliente] :(TEN.Tavolo=$1) and T.RemainingAmount>0 }' : '']

probably there’s an error on the script

Hmm…Does Display Format support [=...]?

maybe but it seems .lenght the problem.

It is not support [=...] but do support {CALL:X}

i don’t understand (i cann’ot open the link with the entity state formatting). I have to put CALL:x instead of =?

Create Script:

function sanitize(table,customer) {
	return (customer.length > 0 ? table + '<br/>' + customer : table)
}

In Display Format:
{CALL:btnTxt.sanitize('$1','{REPORT TICKET DETAILS:[EN.Albergo] + [EN.Cliente] :(TEN.Tavolo=$1) and T.RemainingAmount>0 }')}

3 Likes

Hi sukasem, sorry for my delay but i have no time to try your solution. So, i can confirm that work perfectly like a charm! :slight_smile: thanks in advance, now we can buy the complete license and try to upgrade our old database “a v3 edition” to v5 edition…

Tnx again!

Script function & GraphiQL are priceless.

If you can I don’t recommend upgrading a v3 database. It’s a pain but I recommend building from a fresh new v5 database.

hi kendash we have upgraded succefully the database form an sql server (based on sambapos 3 ) to sql server based on sambapos 5… everythings is ok, so we have today paied for the full version…

hi sukasem… you are in right. Sambapos v5 is very impressive i hope in future we can add more function for our client by the way until now is perfect!

the unique problem is tablet. We are using an enterprise ubiquity antenna, but sambapos seems not fast in rdp or with sql database connection comparison to other well know software.

we hope that with version v5 we will have an upgrade in performance.

unfortunately we have to share our enterprise antenna with the bar customer

There is active work being done on an Android and IOS app for tablet order taking. There is also an open source proof of concept project for HTML based order taking app. These are all very fast and instant response across wifi and 4g or 3g wireless.

I do not think it will be long before these are out of beta and actually live.