I get an error message when printing with barcode. If I remove <BAR>{TICKET ID} it will print. If I add it back in it will print maybe one and same error again.
<T>Ticket
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<L00> Ticket ID:{TICKET ID}
<F>-
{ORDERS}
<F>=
<EB>
{DISCOUNTS}
[<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
<J10>Total:|{TICKET TOTAL}
{PAYMENTS}
<DB>
<F>=
<C10>T H A N K Y O U
<BAR>{TICKET ID}
[DISCOUNTS]
<J00>{CALCULATION NAME} %{CALCULATION AMOUNT}|{CALCULATION TOTAL}
[SERVICES]
<J00>{CALCULATION NAME}|{CALCULATION TOTAL}
[PAYMENTS]
<J00>{PAYMENT NAME}|{PAYMENT AMOUNT}
[ORDERS]
-- Default format for orders
<J00>- {QUANTITY} {NAME}|{TOTAL PRICE}
{ORDER TAGS}
[ORDERS:Gift]
-- Format for gifted orders
<J00>- {QUANTITY} {NAME}|**GIFT**
{ORDER TAGS}
[ORDERS:Void]
-- Nothing will print for void lines
[ORDER TAGS]
-- Format for order tags
<J00> * {ORDER TAG NAME} | {ORDER TAG PRICE}
[ENTITIES:Table]
-- Table entity format
<L00>Table: {ENTITY NAME}
[ENTITIES:Customer]
-- Customer entity format
<J00>Customer: {ENTITY NAME} | {ENTITY DATA:Phone}
When are you printing? After ticket has closed? What rule holds your print command?
Ticket Id is not generated until ticket is closed and orders submitted
Since it says value can not be null I’m suspicious that your printing before its generated.
I think you want to print a barcode on ticket to be able to open ticket later by using that barcode.
As @Jesse mentioned {TICKET ID} returns an empty value for new created tickets.
You have two options.
Use Save Ticket action to force saving ticket before printing so {TICKET ID} will work properly.
While creating a new ticket generate a unique number with {RANDOM} tag and store it as a ticket tag or ticket state. Open Ticket action supports opening tickets by tag or state instead of ticket id.
I agree totally. This is the reason its nearly impossible to write any kind of documentation that would actually help people. I mean we could list all functions etc… but that wont help anyone. The best resource is tutorials where you find similar implementation you learn it then adapt it to yours.
You must have another rule somewhere interfering with the workflow as im pretty sure print bill should work on a an unsubmitted ticket.
Also I have a very similar rule on my standard V4 setup (exc mine also has constraint for payment type is card so forces print on card payment) and works fine…