Changing Table Button Captions

I suggested an alternate method.
You don’t detail your use so hard to say best but if you have waiter assigned to tables you could do many ways including user specific entity screens and others.

try changing
... and T.RemaningAmount > 0

part to

... and 'RemainingAmount > 0'

Please let me know if it makes a difference or not.

1 Like

What is your SambaPOS version?

My versiyon is 5.60.

This feature released with 5.1.62 version.

If you attempt to upgrade please create a backup to ensure you’ll be able to roll back to 5.1.60 if you need to.

5.1.60 released more than 2.5 years before. It will be a good idea to test your backup with latest version on a separate computer before upgrading production system.

How do I show the {ENTITY STATE MINUTES:Status} only when a value exists, e.g. when a ticket is less than 1 minute old, {ENTITY STATE MINUTES:Status} contains no value and so it shows on entity screen like this:

I have tried

[='{ENTITY STATE MINUTES:Status}' == '' ? '' : '<br/><color Red>{ENTITY STATE MINUTES:Status} min</color>']


[<br/><color Red>[{ENTITY STATE MINUTES:Status}] min</color>]

but neither are parsed when the expression or conditional operators are applied.

I notice others seem to have the same issue above in the screenshots but it doesn’t seem to have been addressed.

Use greater than or less than instead of == see if that works.

No, the problem is it does not parse the expression at all. I think expressions are not available for entity display format. So wonder if there is another way?


Would you not want to use TN() if using greater/smaller?

1 Like

True, my mistake… but again regardless, it doesn’t get parsed. So using an expression is not the way…

[=TN('{ENTITY STATE MINUTES:Status}') > 0 ? '' : '<br/><color Red>{ENTITY STATE MINUTES:Status} min</color>']


I have overcame this in the past let me look and see what I did. Off top of my head i swear I used a script.

Now you mention it, yeah I think I may have done something the same myself

This works:

{CALL:custom.formatEntityMinutes('{ENTITY STATE MINUTES:Status}')}
function formatEntityMinutes(entityMinutes) {
	if (entityMinutes.length > 0) {
		return '<br/><color Red>' + entityMinutes + ' min</color>';
	else {
		return '';

Result (note I altered script slightly than from above - I have <br/> before the function call now and removed it from the function as I think it looked better):


Did you missed this?

1 Like

I saw it but didn’t realise it worked in entity display format. Works a treat, thanks!

<if '{ENTITY STATE MINUTES:Status}'!=''><color Red>{ENTITY STATE MINUTES:Status} min</color></if>
1 Like

how can i download 5.1.62

This is the latest release

1 Like

hi emre my versiyon is 5.2.14 now. i write this code but still not working. is there any problem?

{REPORT TICKET DETAILS:T.User:(TEN.Masalar=$1) and (TS.Status=Ödenmedi)}