Need support to fix my printing template

did not work , keep shwing empty line

             NKAHAT Resturant             
                                          
            Samtah, Le Le Mall            
            Phone: 0500581579             
                                          
         Email: nkahat@gmail.com          
                                          
Date: 9/24/2015              TICKET NO: 88
Time: 6:41 PM     Sales Rep: Administrator
                                          
            Customer: ALABBAS             
                                          
---------------------------------------------
    Items                  QUANTITY x PRICE
---------------------------------------------
                                          
PIZZA CHICKEN.SMALL              2 x 13.00
* VIP Discount 1
                                          
------------- Total Before Discount ---------
                                          
Total Amount: |                           
                                          
-------------------- Gift -------------------
Total Gift:                           0.00
------------------ Discount -----------------
VIP Discounts:                        4.00
Happy Hour Discounts:                 0.00
Other Discounts:                      0.00
                                          
Total Discounts:                      4.00
                                          
------------------ Total --------------------
                                          
Total                              $ 22.00
                                          
----------------- Payment -------------------
                                          
Paid                               $100.00
Change                              $78.00
                                          
---------------------------------------------
            T H A N K   Y O U             
                                          
       fOLLOW US ON TWITTER @NKAHAT

@emre Interesting it seems {PLAIN TOTAL} is not working let me test this further.

Actually it is working on my main database but not a fresh one. Perhapse something needs to be enabled for that tag to work.33

thanks ā€¦ waiting :blush:

Either way we can also get what you want with some math.

Try something like this

[LAYOUT]

-- General layout

<EB>

<C00>NKAHAT Resturant

<L>

<C00>Samtah, Le Le Mall

<C00>Phone: 0500581579

<DB>

<L>

<C00>Email: nkahat@gmail.com

<L>

<J00>Date: {TICKET DATE}| TICKET NO:| {TICKET NO}

<J00>Time: {TIME}|Sales Rep: {USER NAME}

<L>

{ENTITIES}

<L00>--------------------------------------------- 

<L00>    Items                  QUANTITY x PRICE

<L00>---------------------------------------------

<L>

{ORDERS}

[<L00>------------------ Notes -------------------

<L>

{NOTE}

<L>]

<L00>------------- Total Before Discount ---------

<L>

<J00>Total Amount: [=F(TN('{TICKET TOTAL}')-TN('{DISCOUNTS}'))]

<L>

<L00>-------------------- Gift -------------------

<J00>Total Gift:|{ORDER STATE TOTAL:Gift}

<L00>------------------ Discount -----------------

{DISCOUNTS}

<L00>

<EB>

<J00>Total Discounts:|[=F(-1*(TN('{ORDER TAG TOTAL:Discount}')+TN('{ORDER TAG TOTAL:VIP Discount}')+TN('{ORDER TAG TOTAL:HH Discount}'))+TN('{ORDER STATE TOTAL:Gift}'))]

<L>

<DB>

<L00>------------------ Total --------------------

<EB>

<L>

<J00>Total | $ {TICKET TOTAL}

<L>

<DB>

<L00>----------------- Payment -------------------

<L>

<J00>Paid | ${TENDERED TOTAL}

<J00>Change | ${CHANGE TOTAL}

<L>

<L00>---------------------------------------------

<C10>T H A N K   Y O U

<L>

<C00>fOLLOW US ON TWITTER @NKAHAT





[PAYMENTS]

<J00>{PAYMENT NAME}|${PAYMENT AMOUNT}



[ORDERS]

-- Default format for orders

<J00>{NAME} | {QUANTITY} x {PRICE}

<J00>{ORDER TAGS}

-- <J00>- {QUANTITY} {NAME}|{TOTAL PRICE}

<L>



[ORDERS:Gift]

-- Format for gifted orders

<L00>{NAME}

<R00>{QUANTITY}x *GIFT*

{ORDER TAGS}

<L>



[DISCOUNTS]

<J00>{CALCULATION NAME}[=F('{CALCULATION AMOUNT}')]|{CALCULATION TOTAL}

[<J00>VIP Discounts:|[=F(-1*(TN('{ORDER TAG TOTAL:VIP Discount}')))]]

[<J00>Happy Hour Discounts:|[=F(-1*(TN('{ORDER TAG TOTAL:HH Discount}')))]]

[<J00>Other Discounts:|[=F(-1*(TN('{ORDER TAG TOTAL:Discount}')))]]



[ORDERS:Void]

-- Nothing will print for void lines



[ORDER TAGS]

-- Format for order tags

* {ORDER TAG NAME}



[ENTITIES:Customer]

-- Customer entity format

<C00>Customer: {ENTITY NAME}

-- <C00>Balance: $[=F(0-TN('{ENTITY BALANCE}'))]

<L>
1 Like

I left your <L> tags inā€¦ what were you expecting those to do?

@Jesse {PLAIN TOTAL} displays a value if it is different than {TICKET TOTAL}. That small trick allows you to remove {PLAIN TOTAL} (sub total) with square brackets on tickets that have no discount.

As discounts are order tags plain total will not work and we need to add them to ticket total by using expressions. However how discount types structured as separate order tag groups makes it a little long expression. I think @Jesseā€™s sample explains how it should be done.

<J00>Total Discounts:|[=F(-1*(TN('{ORDER TAG TOTAL:Discount}')+TN('{ORDER TAG TOTAL:VIP Discount}')+TN('{ORDER TAG TOTAL:HH Discount}'))+TN('{ORDER STATE TOTAL:Gift}'))]
1 Like

I think the templ3ate I3333333333333333 I 3suppli3ed above will work.333333333333333333333333

1 Like

Just sp3il3t coffee on m3y3 3ke3ybo3ar3d.

lol what? hahahahahā€¦

grr yes now my 33333 key is3 stuc3k

EDIT. Ill3 3be back after 3it drys

1 Like

Here is something I can help you with:
TIP:
Do not use a hairdryer on your keyboard to dry it - the keys may melt :grin:
I now have a brand new keyboard after tipping my water bottle on the old one andā€¦guess the rest.

Itā€™s a mechanical so Iā€™ve took the keys off and letting it air dry.

Iā€™ll just use my phone for now.

I just hope I didnt fry it.

thanks Kendash, i used that tag to print empty line only for more nice looking.

i used another math which give me the total before the discount. thenks for all support.

my final template:

[LAYOUT]
-- General layout
<EB>
<C00>NKAHAT Resturant
<L>
<C00>Samtah, Le Le Mall
<C00>Phone: 0506760076
<DB>
<L>
<C00>Email: nkahat@gmail.com
<L>
<J00>Date: {TICKET DATE}| TICKET NO:| {TICKET NO}
<J00>Time: {TIME}|Sales Rep: {USER NAME}
<L>
{ENTITIES}
<L00>--------------------------------------------- 
<L00>    Items                  QUANTITY x PRICE
<L00>---------------------------------------------
<L>
{ORDERS}
[<L00>------------------ Notes -------------------
<L>
{NOTE}
<L>]
<EB>
<L>
<J00>Total Amount:| [=F(TN('{TICKET TOTAL}')-1*(TN('{ORDER TAG TOTAL:Discount}')+TN('{ORDER TAG TOTAL:VIP Discount}')+TN('{ORDER TAG TOTAL:HH Discount}'))+TN('{ORDER STATE TOTAL:Gift}'))]
<L>
<DB>
<L00>------------ Discount & Gifts ---------------
{DISCOUNTS}
<J00>VIP Discounts:|[=F(-1*(TN('{ORDER TAG TOTAL:VIP Discount}')))]
<J00>Happy Hour Discounts:|[=F(-1*(TN('{ORDER TAG TOTAL:HH Discount}')))]
<J00>Other Discounts:|[=F(-1*(TN('{ORDER TAG TOTAL:Discount}')))]
<J00>Total Gift:|{ORDER STATE TOTAL:Gift}
<L00>
<EB>
<J00>Total Discounts:|[=F(-1*(TN('{ORDER TAG TOTAL:Discount}')+TN('{ORDER TAG TOTAL:VIP Discount}')+TN('{ORDER TAG TOTAL:HH Discount}'))+TN('{ORDER STATE TOTAL:Gift}'))]
<L>
<DB>
<L00>------------- Payments ----------------------
<EB>
<L>
<J00>Total :| $ {TICKET TOTAL}
<J00>Paid  :| ${TENDERED TOTAL}
<J00>Change:| ${CHANGE TOTAL}
<DB>
<L>
<L00>---------------------------------------------
<C10>T H A N K   Y O U
<L>
<C00>fOLLOW US ON TWITTER @NKAHAT


[PAYMENTS]
<J00>{PAYMENT NAME}|${PAYMENT AMOUNT}

[ORDERS]
-- Default format for orders
<J00>{NAME} | {QUANTITY} x {PRICE}
<J00>{ORDER TAGS}
-- <J00>- {QUANTITY} {NAME}|{TOTAL PRICE}
<L>

[ORDERS:Gift]
-- Format for gifted orders
<L00>{NAME}
<R00>{QUANTITY}x *GIFT*
{ORDER TAGS}
<L>

[DISCOUNTS]
<J00>{CALCULATION NAME}[=F('{CALCULATION AMOUNT}')]|{CALCULATION TOTAL}

[ORDERS:Void]
-- Nothing will print for void lines

[ORDER TAGS]
-- Format for order tags
* {ORDER TAG NAME}

[ENTITIES:Customer]
-- Customer entity format
<C00>Customer: {ENTITY NAME}
<C00>Balance: $[=F(0-TN('{ENTITY BALANCE}'))]
<L>

You might want to change < L > to < F > so instead of setting left alignmet you use fill. It may not cause you issues unless tou change your template and forget that its sets the format to left

< F > fills the character you type after it across the while ticket, good for using dividing sections on the receipt so instead of typing loads of ------- to fill across the receipt you could just format as:

< F > -

And that will fill - across the ticket

< F > *

Will fill * across the ticket etc

2 Likes

thanks, yes its better to use that

I have always used <L00> for my blank lines and never had any issues, presumably the size numbers make it a line formatter rather than a ā€˜set leftā€™ tag if that makes sense?