I am trying to add an equation in the ticket printer template! can someone help me? i want to multiply the ticket total by 2 and display the number above ticket total in the bill.
Share your current template
[LAYOUT]
-- General layout
<T>Kbouch El Toute
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
<EB>
{DISCOUNTS}
[<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
<J10>Total:|{TICKET TOTAL} USD
{PAYMENTS}
<DB>
<F>=
<C10>T H A N K Y O U
[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}
It is the original one, i only edited the restaurant name and added the currency.
What i want to do, is to add a line before the total that includes a formula: ticket total x 2
Try this
[LAYOUT]
– General layout
Kbouch El Toute
Date:{TICKET DATE}
Time:{TIME}
{ENTITIES}
Ticket No:{TICKET NO}
-
{ORDERS}
=
{DISCOUNTS}
[Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
Before Total:| [=TN('{TICKET TOTAL}')*2] USD
Total:|{TICKET TOTAL} USD
{PAYMENTS}
=
T H A N K Y O U
[DISCOUNTS]
{CALCULATION NAME} %{CALCULATION AMOUNT}|{CALCULATION TOTAL}
[SERVICES]
{CALCULATION NAME}|{CALCULATION TOTAL}
[PAYMENTS]
{PAYMENT NAME}|{PAYMENT AMOUNT}
[ORDERS]
– Default format for orders
- {QUANTITY} {NAME}|{TOTAL PRICE}
{ORDER TAGS}
[ORDERS:Gift]
– Format for gifted orders
- {QUANTITY} {NAME}|GIFT
{ORDER TAGS}
[ORDERS:Void]
– Nothing will print for void lines
[ORDER TAGS]
– Format for order tags
* {ORDER TAG NAME} | {ORDER TAG PRICE}
[ENTITIES:Table]
– Table entity format
Table: {ENTITY NAME}
[ENTITIES:Customer]
– Customer entity format
Customer: {ENTITY NAME} | {ENTITY DATA:Phone}
You can also find syntax for formula among other things here
1 Like
Thank you for your support! It didn’t works. I will attach the outcome
double dash somehow was translated to an en dash
replaced –
with --
[LAYOUT]
-- General layout
Kbouch El Toute
Date:{TICKET DATE}
Time:{TIME}
{ENTITIES}
Ticket No:{TICKET NO}
-
{ORDERS}
=
{DISCOUNTS}
[Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
Before Total:| [=TN('{TICKET TOTAL}')*2] USD
Total:|{TICKET TOTAL} USD
{PAYMENTS}
=
T H A N K Y O U
[DISCOUNTS]
{CALCULATION NAME} %{CALCULATION AMOUNT}|{CALCULATION TOTAL}
[SERVICES]
{CALCULATION NAME}|{CALCULATION TOTAL}
[PAYMENTS]
{PAYMENT NAME}|{PAYMENT AMOUNT}
[ORDERS]
-- Default format for orders
- {QUANTITY} {NAME}|{TOTAL PRICE}
{ORDER TAGS}
[ORDERS:Gift]
-- Format for gifted orders
- {QUANTITY} {NAME}|GIFT
{ORDER TAGS}
[ORDERS:Void]
-- Nothing will print for void lines
[ORDER TAGS]
-- Format for order tags
* {ORDER TAG NAME} | {ORDER TAG PRICE}
[ENTITIES:Table]
-- Table entity format
Table: {ENTITY NAME}
[ENTITIES:Customer]
-- Customer entity format
Customer: {ENTITY NAME} | {ENTITY DATA:Phone}
The problem is that i had to add