New Ticket Lister formats

Sorted it! thanks a lot, ill have a go at formatting it now (well copy yours and tweak :slight_smile: )

When it converts it to red it ignores right alignment. The memory thing was my mistake I accidently screwed up the jscript and it went into an infinite cycle causing samba to run out of memory and crash. That was a novice mistake I fixed that.

The only issue I have and I can call this done is the minutes when converted to red after 15 min it loses all justification formatting.

1 Like

OK I thought you’re referring to the memory issue. I’ll check that.

1 Like

By the way @emre just thought I would let you know that:

<block left,top,right,bottom>

Worked great it now shows correctly. Thanks!

Had to do this:

function min(minutes)
{
  var test = minutes;

  if (test>10){

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

  }

  return '<L><block 276,0,0,0>' + test + ' min.</block>';

}

Kind of odd but it works!

1 Like

Hi guys.
Is there any tutorial for possible New Ticket Lister formats And how to use it?
I really like the way it looks.
@kendash Can you please share the last ticket lister template that you made? I tried to copy this to my templat but it comes out different and I don’t understand how to get this working.
Thanks

You all should read the V5 Feature Compilation Topic …

1 Like

@pizzaeilat4

Here is the script:
Goes into Automation > Scripts

Name it whatever you want but for handler put tlister

function min(minutes)
{
  var test = minutes;

  if (test>10){

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

  }

  return '<L><block 276,0,0,0>' + test + ' min.</block>';

}

The format for Ticket Lister widget:

<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/>

Finally the rest of the settings for widget:

To adjust the timer for when orders turn red you simply change this line:

 if (test>10){

Put whatever time you want the example shows after 10 minutes it turns red.

BTW You should rename var test I just used test for quick testing :stuck_out_tongue: Something more fitting might be

var min = minutes;

You could also rename the function because min isnt the most fitting but it really doesnt matter as it works with whatever you put there. Just bad programming habits.

I would probably rename it to this:

function latetimer(minutes)
{
  var min = minutes;
  if (min>10){
  return '<R><block 276,0,0,0><color Red>' + min + ' min.</color></block>';
}
return '<L><block 276,0,0,0>' + min + ' min.</block>';
}

Then the format portion of widget would be:

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

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

Thanks @kendash
I really appreciate this.

Sorry @Jesse
it’s not working for me :frowning:
It won’t show me the ticket state minutes.
Please help

Have you tried putting that tag in the template directly? In other words: don’t use the CALL:X and don’t use a script. If you still see no results for the minutes, did you rename any of your State Groups?

@QMcKay
Yes i did. It’s working fine without the call:x

Is your script Handler named tlister?

Yes I copied the name from @Jesse Post

Do any of your Scripts work properly when used with CALL:x ?

Check the block setting. 276 might be too many pixels for your screen. I use 30" screen. Is the numbers running off screen?

http://forum.sambapos.com/t/navigation-screen-issue/4470/11
Thanks @kendash

1 Like

So did you get it working? BTW me and @QMcKay had that same issue early on in testing when he first introduced Script Debugger

Yes i did. probably was my problem too.
Thanks.

1 Like

I really like this new lister format. And I love that it changes color. I think there are a lot of people that will like this.

3 Likes

Dear @kendash
Can you show an example of how to change colors more than once. 10 min= green 20 min=orange 30 min=red etc…?
Can we change the ticket background color after certain time?
Thanks.