Ticket Tags - Tendered, Change, Payment Type, CCinfo

It is possible yes you can do that.

Oh, I see, so you would get multiple payment type ticket tags (like ‘PMT cash’ = 10 and ‘PMT credit card’ = 55) using this system…

That’s a nice setup…

It does not go in as Tender Type however its Payment Type {TENDERED TOTAL} [:PaymentTypeName] covers this. Yep its nice.

@QMcKay Since 4.1.60 we can now use masking for [?syntax] this would be a great way to ensure only 4 digits is allowed for the last 4 of CC info and it would restrict it to just numbers reducing any input mistakes.

@Jesse, I’m not sure what you mean. This Tutorial already uses a mask for CC digits.

[?Credit Card last 4 Digits:\d+\.?\d{0,2}]

I realize that mask isn’t correct for limiting to 4 digits, and it contains a decimal, (should probably be masked as simply [0-9]{4} or \d{4}), but this feature has been available for quite a while. Is there another area you are referring to?

Yes you can make it only show a numeric keypad not entire keyboard. and restrict it to specific input. It is near bottom of this tutorial.

1 Like

Wow, very cool! So this would work better as of v4.1.61 …

[?Credit Card last 4 Digits;\d{4};;ON]

Did I get that correct for: Require 4 digits, Ok button, Numeric Keypad?

1 Like

looks right to me :stuck_out_tongue:

1 Like

Can also be used in the various discount tutorials… making them even better :stuck_out_tongue:

Nice. I updated the Tutorial with the following, when running v4.1.61 or later…

[?Credit Card last 4 Digits;\d{4};;ON]


yes, that is really a GREAT feature!!!


Hello, Thanks for your Tutorial, I pursue it step by step to reach this part.
But when the ticket reopens and settle the payment again, Both the new & the history indicated on the ticket print.

Is there any method to clear the OLD record for reopening a ticket?

Thank You.!!!

It should be possible.

Let’s take a look at what we’re storing in Ticket Tags, and how they are being stored.

The Ticket Tag Name is to the left of the colon (:) and the Tag Value is to the right of that.

These Ticket Tags would be easy to clear, since their Names are not dynamic (the Names don’t contain DateTime):


These Ticket Tags will be a little more difficult because DateTime is part of their Name as well as the Payment Type, so I’m not sure if it can be done:

PMT 14.30.253 [Credit Card]
PMT 14.30.802 [Cash]

For the “easy” Ticket Tags, we need to create an Update Ticket Tag Action to fire when a Ticket is Re-opened and Payments are Cancelled. This Action can go in the same Rule that handles the “Re-Open” Automation Command.

Action - Update Ticket Tag:

Rule - modify the Rule that contains the Cancel Payment Action, and add 4 Clear Ticket Tags Actions:

@emre, for the “difficult” Tags, is there anything we can do? I see there is an Event for Ticket Tag Selected, but there is no accompanying Action … can we use this Event somehow?

I am unable to get desired result

[Payment Detail:2,2, 2]

TT.PMT—shows nothing

Actually want to have payment summary something like this:
Cash 2 22.90
VISA 1 30.12

This is because PMT is not the name of the Ticket Tag. It is the same difficulty as with the previous post for clearing these Tags, because the name of the Ticket Tags in this case are dynamic, including the Time and [Payment Type]. These are the actual names of the “PMT” Ticket Tags:

PMT 14.30.253 [Credit Card]
PMT 14.30.802 [Cash]

lol. I was wondering the reason of having ticket tag descriptions item in my to do list.

1 Like

That would probably help @emre.

The reason this setup is written this way is because theoretically someone could pay with multiple types, multiple times before the Ticket is fully paid. Ideally, we would want to be able to store all tenders separately, something like this:

TOT: Amount
TND: Amount
CHG [currency] Amount
PMT CC [type] [digits] (date/time) Amount
PMT CC [type] [digits] (date/time) Amount
PMT CC [type] [digits] (date/time) Amount
PMT Cash [currency] (date/time) Amount
PMT Cash [currency] (date/time) Amount
PMT Cash [currency] (date/time) Amount

I know it might look ridiculous to use so many Payment Types on a single Ticket, but it does happen, even if only rarely. So it would equate to this (or similar):

TOT: 2300.00
TND: 2400.00
CHG [LMP] 100.00
PMT CC [MAST] [1111] (2014-12-01_09.58.22) 500.00
PMT CC [VISA] [1234] (2014-12-01_09.59.05) 300.00
PMT CC [VISA] [5678] (2014-12-01_09.59.30) 800.00
PMT Cash [LMP] (2014-12-01_11.00.11) 230.00
PMT Cash [LMP] (2014-12-01_11.00.47) 170.00
PMT Cash [USD] (2014-12-01_11.01.15) 400.00

so is there any tag in report to check for tag name ?
like ticket tag name contains Credit Card!

I am not well-versed in Custom Report Tags, so I can’t really comment - you would need the ability to check the Tag name to see if it “contains” certain characters, similar to the LIKE %name% function in SQL.

Using SQL, you could theoretically parse out the Tags using LIKE and SUBSTRING() functions, but I haven’t looked into it - plus the Tags are stored in JSON format which makes things much more difficult… this is where Custom Report Tags excels over SQL, because @emre has designed it in such a way that it makes reading Tags fairly simple in comparison.

Hello @QMcKay

I have followed this setup. I have one problem but it can be solved as well.

The problem is

When I print the receipt, I do not want to print the tendered and change for mom cash payments and CC info for Cash Payments

One way to solve is to use the separate print job but is there anyway to define that in the Print Template ?

Please let me know