Changing Table Button Captions

Instead of keeping tickets open you can track a customer account for these customers. Did you watched this video or tested this feature?

2 Likes

OK Thank You will have a Look and see where it leads me thankyou for your Help and Support and can i just say Fabulous Software…

Thanks

MW

1 Like

Are you able to display the time ticket was opened.

I would like to display the number of persons on table and time ticket was opened. More like a timer showing how long the table has been occupied. Thanks

Yes, use {TICKET TIME} or I think better use {TICKET STATE MINUTES:X} or {ENTITY STATE MINUTES:X}

1 Like

$1
Occupied {TICKET STATE MINUTES:X}

Is that the correct display format?

1 Like

No X is State Name like Status.

So how would I type it? If you can tell me that I would be grateful, also I will understand how it works.

At the moment I have “$1
Occupied” Which shows occupied only.

Please advise

{TICKET STATE MINUTES:Status}

I am confused, I type “$1{TICKET STATE MINUTES:X}” in the display format in the states.

On the screen it shows table number plus {TICKET STATE MINUTES:X}

Not table number plus actual minutes.

Sorry for being so confused.

OK. I know the reason of the confusion. (me lol).

On next V5 update you’ll be able to use {ENTITY STATE MINUTES:Status} and other entity related tags on state display formats.

We don’t have access to tickets from entity buttons but you can use reporting tags like {DISPLAY TICKET DETAILS} to display ticket related data.

Why at IN Entity Screen, i can’t display status button table?
But at OUT Entity Screen status button display remaining total table.

this out entity screen:

this in entity screen :

New Order State:

1 Like

Check if your table names are exactly 05,06, etc.

Oke, Thanks Again. it solve now. my fault because my table name 1, 2.

Hey @emre
Just trying to put this topic to bed - when you made the comment above, which part of the Tutorial were you referring to? With regards Button Captions I thought from our work the other day JScript was not supported.

Also just found this so will included it just to keep “documentation” in order:
http://forum.sambapos.com/t/entity-state-formatting-templates/6120/2?u=pauln

Your reference in above link:

Hello @pauln

This is a JScript Expression[=2+1].
This is not supported.

This is a printer template that calls JScript {CALL:utils.sum(2,1)}. **
This is supported as Printer Templates already supported on button headers.

Using inline report tag expressions for calculations is recommended as it does not instantiate (create) JScript Engine.

**Assuming you already defined utils.sum function in scripts.

Ok so I may be confused - can I use a {CALL:x} function in Entity State “Display Format:”
If this was the case I can use logic IF’s and AND’s to my contentment to return Caption Data for Caption ButtonText?

Yes you can but… whatever… Yes you can use if’s in button captions by using {CALL:X}

Therefor below we are using “Credit Limt $” which is a custom field but it only exists for Customer and Tabs Entity. So I should use a {Call:x} function to return Null if the field does not exist for Entity Assigned to Ticket as now we just get a “Credit Limit $” result - not so desirable for Entity Pager ot Entity Tables.

<bold>$1</bold><br/>Open Sales: ${REPORT TICKET DETAILS:[T.RemainingAmount.Sum]:(TEN.Customers={ENTITY NAME}) OR (TEN.Tabs={ENTITY NAME})  OR (TEN.Pagers={ENTITY NAME}) and T.RemainingAmount>0}
<br/> On Account: $ {ENTITY BALANCE}
<br/> Credit Limit $ {ENTITY DATA:Credit Limit}
{REPORT TICKET DETAILS:'<br/>Notes '+[T.Note]:(TEN.Customers={ENTITY NAME}) OR (TEN.Tabs={ENTITY NAME})  OR (TEN.Pagers={ENTITY NAME})  and T.RemainingAmount>0 and Ticket.Note != null}

This will also solve my last line above whereas I cannot omit the line if no ticket note exists. Currently I am getting for each button Caption:
Note
Note
Note Make the Coffee Hot!
Note

Parser Note FYI if you embed a “:” colon in the prefix '<br/>Notes ' like <br/>Notes: it breaks the Parser.

EDIT: PS After all is “said & done” I will probably only use this Captions for Simple Entity like Pagers, Tables, and Tabs. As there will be over 1,000+ repeat Customers I would widgets.

Here is the Sample:

Once you confirm @emre - it means here comes Samba scripting for me :sweat_smile:
I reckon the entire Caption will be returned as a String i.e "br/ … data br/ more data + br/ end data.

EDIT2:
If I change the last line to this:
{REPORT TICKET DETAILS:'<br/>Notes '+[T.Note]:(TEN.Customers={ENTITY NAME}) and (TS.Status=Unpaid) and Ticket.Note != null}

I get that:

Which is sort of OK as I only using that part of the Caption for Pagers anyway…

Calling jscript in button headers means each button will be calling jscript engine everytime screen refreshes for every button. That doesn’t sound very efficient. Maybe it won’t be issue and maybe I’m wrong but wouldn’t that be unnessisary resources for such a simple function.

Agree, but would only be using it for say 20 of TAB Entities, Table Entities and Pager Entities. The script also would only be doing what the buttons do now except use IF; CASE; OR arguments to get around the inability to use Expressions.