Printer template with condition

How can I make condition in printer template for different payment type
29,66,1 is command for invert colors.

I try something like this
[PAYMENTS:NAME!=‘Cash’]
29,66,1
PAYMENT WITH: {PAYMENT NAME}|{PAYMENT AMOUNT}
29,66,0

[PAYMENTS:NAME==‘Cash’]
TYP PLATBY: {PAYMENT NAME}|{PAYMENT AMOUNT}

Drop name and have not cash as just payments so everything unless specified and then specify cash format.
Or you could use a ternary expression within a single payments section;
[= ‘{A}’==‘B’ ? ‘True’ : ‘False’]
You can use that inline with content of template to skip or change bits as needed.

I found your post:

And I modify for me.
[PAYMENTS:Cash]
<J00>TYP PLATBY: {PAYMENT NAME}|{PAYMENT AMOUNT}

[PAYMENTS:Credit Card]
<XCT>29,66,1
<J00>TYP PLATBY: {PAYMENT NAME}|{PAYMENT AMOUNT}
<XCT>29,66,0

[PAYMENTS:Internet]
<XCT>29,66,1
<J00>TYP PLATBY: {PAYMENT NAME}|{PAYMENT AMOUNT}
<XCT>29,66,0

Now it works
Thanks for help

You shouldn’t need to specify each. if you put your XCT in the unspecified general PAYMENT section and only specify cash without it is like order void where unless specified it does the generic template.
It is probably reconmended to leave the generic format in either way encase payment type is added and then doesnt have a payments section for it.

Yes it is true. I want mark only credit card payment and internet payment.

Then

[PAYMENTS]
<J00>TYP PLATBY: {PAYMENT NAME}|{PAYMENT AMOUNT}

[PAYMENTS:Credit Card]
<XCT>29,66,1
<J00>TYP PLATBY: {PAYMENT NAME}|{PAYMENT AMOUNT}
<XCT>29,66,0

[PAYMENTS:Internet]
<XCT>29,66,1
<J00>TYP PLATBY: {PAYMENT NAME}|{PAYMENT AMOUNT}
<XCT>29,66,0

1 Like