Fiscal ticket conditional formatting

Hi,
I want to format a fiscal ticket in Sambapos, and i need to specify the department in the ticket. Here is an example, with the department bolded.

S,1,___,,;TEST KITCHEN;0.01;1.000;;2;1;0;
S,1,___,,;TEST;0.02;1.000;;1;1;0;0;
T,1,___,,;0;7.53;;;;

The above ticket contains a product (#1) for kitchen and a (#2) bar product. I need to make a conditional formatting to print 1 OR 2, got by ITEM TAG. How can i achive this?

Thanks!

If you use V5, you can do something like this:

[='{ITEM TAG:Department}' == 'Kitchen' ? '2' : '1']

For V4, you can’t use the tenary operator, so I think the best solution would be you either store 1 or 2 in the ITEM TAG, or create an additional ITEM TAG for this purpose (e.g. DepartmentID) (if you also want to store Kitchen and Bar). Then you just need to add this to your template:

{ITEM TAG:DepartmentID}
1 Like