Customer Receipt Not printing full item name

Hello,

My customer receipt is not printing the full item name and is cutting off near the price.

I would like it to go onto the second line if the item name is long instead of cutting it off.

Please view attached screen shot of my receipt.

My ticket template is as follows:

[LAYOUT]
-- General layout
<T>Receipt

<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
<EB>
<J00>Subtotal:|[=F(TN('{TICKET TOTAL}')-TN('{TAX TOTAL}'))]
{DISCOUNTS}
{TAXES}
[<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
<J10>Total:|{TICKET TOTAL}
{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}|{TENDERED TOTAL}
<J00>Change Due:|{CHANGE TOTAL}

[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}

[TAXES]
<J00>{TAX NAME}|{TAX AMOUNT}

Your assistance is highly appreciated.

Not sure if there is a simple solution to this.
First I would say it looks like you have allot of empty space on the right of the print. Have you tried increasing your character count to make most of the width of the roll?

Personally I bare this in mind when entering product names to not make too long and cause cut off, but it does sill happen sometimes.
Personally because I keep short it is usually only one or two letters dropped so doesnt make unreadable.

I think this has been achived using some scripts to slice the name into parts if over a certain length but scripts are a V5 feature not V4.

One solution would be to use custom product tags like those used by some who print tickets in multiple languages.
Ie you would have a first and second line tag and enter values which fit your print width and use square brackets on the second line to hide if not used. Would be a little long winded as you would need to set values for all products.
Although you could do it with just one extra tag for ‘extended name’ keep the product name itself within the space available but any extra description put in the extended field.

Personally I would start by tweeking a few other parts first and see how you get on.
Firstly change the - 1;
<J00>- {QUANTITY} {NAME}|{TOTAL PRICE}
to maybe just 1with
<J00>{QUANTITY} {NAME}|{TOTAL PRICE}
Which would have you 2 characters straight away.

I would maybe adjust the numbers on the product name, do they really need to be on the product name? They can be on the button without being on the product name by changing the button header field in the menu settnigs you know.
If you can/wanted to remove the number from the product names that sames you another 5 letters on each line.

1 Like

This is possible in V5 with simple Ternary Expression (without word wrap) or using script if you want word wrap.

[ORDERS]
<L00>- {QUANTITY} [='{NAME}'.substr(0,24)]
[='{NAME}'.substr(24,48) == '' ? '' : '<L00>    ' + '{NAME}'.substr(24,48)]
{ORDER TAGS}

Or maybe try this in V4, I’m not sure.

[ORDERS]
<L00>- {QUANTITY} [='{NAME}'.substr(0,24)]
[<L00>     [='{NAME}'.substr(24,48)]]
{ORDER TAGS}
2 Likes

It isnt working. Is there any other detailed solution for this issue?

The scripting engine in V5 is different than in V4, so you probably cannot do this in V4. You will likely need to upgrade to V5 for this type of thing.

I tried this in version 5, how ever now the item price on the right beside the item name is missing. Please view attached receipt

My ticket template is as follows:

[LAYOUT]
-- General layout
<T>Golden Dragon Restaurant
 F-7/3, Round Market, Islamabad
 Tel: 051-2610916,051-8358809
 www.goldendragonpakistan.com
 www.facebook.com/goldendragonpakistan

<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
<EB>
<J00>Subtotal:|[=F(TN('{TICKET TOTAL}')-TN('{TAX TOTAL}'))]
{DISCOUNTS}
{TAXES}
[<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
<J10>Total:|{TICKET TOTAL}
{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}|{TENDERED TOTAL}
<J00>Change Due:|{CHANGE TOTAL}

[ORDERS]
<L00>- {QUANTITY} [='{NAME}'.substr(0,24)]
[='{NAME}'.substr(24,48) == '' ? '' : '<L00>    ' + '{NAME}'.substr(24,48)]
{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}

[TAXES]
<J00>{TAX NAME}|{TAX AMOUNT}

I added the |{TOTAL PRICE} in the orger tag after the code, how ever now its printing the price not aligned on the right but in the end of each line. Please view attached image:

Your Template does not contain the {PRICE} tag, so of course it will be missing in the print.

I added the Price Tag: how ever the price is no longer aligned on the right but within the same line towards the end:

My ticket template is as follows:

[LAYOUT]
– General layout
Receipt

Date:{TICKET DATE}
Time:{TIME}
{ENTITIES}
Ticket No:{TICKET NO}
-
{ORDERS}
=

Subtotal:|[=F(TN(’{TICKET TOTAL}’)-TN(’{TAX TOTAL}’))]
{DISCOUNTS}
{TAXES}
[Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
Total:|{TICKET TOTAL}
{PAYMENTS}

=
T H A N K Y O U

[DISCOUNTS]
{CALCULATION NAME} %{CALCULATION AMOUNT}|{CALCULATION TOTAL}

[SERVICES]
{CALCULATION NAME}|{CALCULATION TOTAL}

[PAYMENTS]
{PAYMENT NAME}|{TENDERED TOTAL}
Change Due:|{CHANGE TOTAL}

[ORDERS]
- {QUANTITY} [=’{NAME}’.substr(0,24)]
[=’{NAME}’.substr(24,48) == ‘’ ? ‘’ : ’ ’ + ‘{NAME}’.substr(24,48)]|{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}

[TAXES]
{TAX NAME}|{TAX AMOUNT}

You are using a Left-Align tag <L00> for the format.

You need to use a Justify tag <J00>

This is all explained in the Printer Template guide. Read it.

I change it to J00 tag how ever its still not printing the price value aligned on right.

My code is:

[ORDERS]
<J00>- {QUANTITY} [='{NAME}'.substr(0,24)]
[='{NAME}'.substr(24,48) == '' ? '' : '<L00>    ' + '{NAME}'.substr(24,48)]|{TOTAL PRICE}
{ORDER TAGS}

The receipt is:

Please help as its stopping us from going live and purchasing the license

Try this:

[ORDERS]
<J00>- {QUANTITY} [='{NAME}'.substr(0,24)]|{TOTAL PRICE}
[='{NAME}'.substr(24,48) == '' ? '' : '<L00>    ' + '{NAME}'.substr(24,48)]
{ORDER TAGS}

I fixed it with the following:

[ORDERS]
<J00>- {QUANTITY} [='{NAME}'.substr(0,24)]
[='{NAME}'.substr(24,48) == '' ? '' : '<J00>    ' + '{NAME}'.substr(24,48)]|{TOTAL PRICE}
{ORDER TAGS}

Your “fix” will not work as well as what I posted, because if the item name length is less than 25, then the Price will not print at all.

You will be better off using what I posted instead.

1 Like