Printer Template and IF THEN ELSE or .IsNull

Good morning,

Business : Bar/Restaurant.

When a customer requests the bill, he can ask it:

  • Normal: All Orders are printed on the bill.
  • Por Consumo: Instead of the orders details, just one line will appear on the bill “Por Consumo”.

This happen when a customer has to give his bill to the company he is working for, and he does not want to see alcohol on the bill, so Instead his ticket will contain a generic line, like Food and drink and the total of the bill.

I created a Ticket Tag Consumo.

Now if the ticket is tagged with that consumo tag, I’d like to print “Food and drink” insteads of {ORDERS}

I could do it with 2 print templates and some rules if Ticket Tag contains Consumo.

But instead I would like to know if somehow we could put some if-test expression in print template, like:

 IF {TICKET TAG:Consumo=1}
 <C00>Food and Drink Service

Thank you,


If would work as a ternary expression, but think you would be better off with second template.

Euh … Ternary? :slight_smile:

I found it … will have a look

You are the man !!


[='{TICKET TAG:Consumo}'==1?'<C11>Por Consumo':'{ORDERS}']

Ticket Tag:

Printed Ticket:

Great, thank you,

btw, easier that way, 1 line in the printer template
no rule, constrain, extra print template, job, etc … and more “stable” in case of an upgrade of SambaPOS.


1 Like