Syntax format text in ticket lister

love the new possibilities to change font size and color on buttons
great improvement for user interface
But how does it work with ticket lister?
the same syntax doesn’t seem to work there

Here is a ticket lister fully customized.

<J><block 30><color #AA00FF00>{TICKET NO} </color></block>
<L><size 12><block 10>
{ORDERS}
<L></block></size>
{CALL:tlister.min('{TICKET STATE MINUTES:Status}')}

[ORDERS]
<J>{QUANTITY} {NAME} | {PRICE}<br/>

Script:

function min(minutes)

{

 var test = minutes;

   if (test>30){

   return '<J><block 276,0,0,0 right 10><color Red>' + test + ' min.</color></block>';

   }

    else if (test>20){

    return '<J><block 276,0,0,0  right 10><color Orange>' + test + ' min.</color></block>';

    }

 return '<J><block 276,0,0,0 right 10>' + test + ' min.</block>';  

}

As you can see that is a more complex use involving a script function. The script basically changes the time on order to Red if past a specific number of minutes. Orange if its at a specific # of minutes and white if its under a specific # of minutes.

For my script after 20 minutes it turns orange, after 30 minutes it turns red. Under 20 minutes its white.

1 Like

It should work as you can see from the example by@kendash , but you still need to prefix your lines with a printer tag such as L, J, C, etc. … just as he has done in his Template.

So this:

<b>Ticket Nr:{TICKET NO}</b>

Should be something like this:

<L><b>Ticket Nr:{TICKET NO}</b>

Alternatively, you could do this:

<EB>
<L>Ticket Nr:{TICKET NO}
<DB>
1 Like

ok, that works; thanks
this is really a great improvement for us

1 Like

Any idea why this aligns horizontally

    <J><block 1,0,0,0 #5ffffff center 100><color #AA00FF00>#{TICKET ID} </color></block>
<J><block 1,0,0,0 #5ffffff center 150><color #2D89EF>{ENTITY NAME:Customer}{ENTITY NAME:Table}</color></block>
<L><size 12><block 10>
{ORDERS}
<L></block></size>
<J><block 1,0,0,0 #5ffffff center 100><color red>€{TICKET TOTAL}</color></block>

[ORDERS]
<J>{QUANTITY} {NAME}<br/>

And when I remove the Orders it displays vertically

<J><block 1,0,0,0 #5ffffff center 100><color #AA00FF00>#{TICKET ID} </color></block>
<J><block 1,0,0,0 #5ffffff center 150><color #2D89EF>{ENTITY NAME:Customer}{ENTITY NAME:Table}</color></block>
<J><block 1,0,0,0 #5ffffff center 100><color red>€{TICKET TOTAL}</color></block>