Difference between services and discounts

When designing my ticket printer template, what is the difference between the transactions that appear as [SERVICES] and [DISCOUNTS]?

I currently have a bunch of rounding, credit card surcharge and cashback transactions and occasionally a discount. The rounding transactions correctly appear as SERVICES, but the Cashback and credit card surcharges are appearing as discounts, which makes designing my receipts difficult.

I am using this guide to add the cashback:

They are however you define them, service and discount are calculations, each calculation type has a field for its transaction type.
Im not a pro with calculations but you should be able to set them up all as independent transaction types and even in to different account types if you really wanted, its pretty flexible.

PS, either reopen a topic or start a now one - not both :stuck_out_tongue:

1 Like

Sorry! - I’ve deleted the other one.

Yes, I can see that, and I have various transaction types created, but I don’t se a field where I set it as a service or discount - could you point me in the right direction?

Found this after searching quite a bit. This is the only explanation I have seen, but it does explain the exact reason why some Calculations are “Discounts” while others are “Services”.

So…

Discounts = Calculations before Tax
Services = Calculations after Tax

1 Like

Ahhh - Thanks @QMcKay - I did try a lot of searching, but I guess I was looking in the wrong places…

Yes, it was very difficult for me too to find that. I read through a lot of posts before I came across that one. The search phrase I used that finally came up with that is:

service discount print sections

But now with the Title of your Topic, people should find this easily. Makes a good reference for the Forum.

More information:

Interesting, never really looked in to it.

@mjb2000 an alternate idea you might want to try if you cant get the layout you want…
We seem to have {CALCULATION TOTAL:X} tag which is listed in ticket values.
On that basis I would maybe try;

[<L00>Discount | £{CALCULATION TOTAL:Discount}]
[<L00>Service | £{CALCULATION TOTAL:Service}]
[<L00>Cash Back| £{CALCULATION TOTAL:Cash Back}]
[<L00>Whatever| £{CALCULATION TOTAL:Whatever}]

In the main part of the template with whatever calculations you have in whatever order?
This undermines the [DISCOUNTS] and [SERVICES] ‘sections’ which will group on the basis outlined by Q.
The [DISCOUNTS] and [SERVICES] ‘sections’ are good for covering bases but if you know possible calculations and dont change often you can ‘hard code’ the specific calculations and their format rather than using the ‘type section’ template which repeats for all used.
The square brackets will hide the line if no value for the tag within so will achive same things expect you have to specify each one but can order however and format individually.
(Also dont forget to comment out the [DISCOUNTS] and [SERVICES] ‘sections’ formatting so as not to duplicate on print.)

Pretty sure something like the above might solve your problems :slight_smile:

'its samba baby, where theres a will there’s a way :wink:

1 Like

Ah - Didn’t realise we could use that trick. I will take a look now.

Yep. I hope this will be helpful for someone else one day.

This is my current full Template (business-specific information has been removed):

[LAYOUT]
<EC>
<XCT>29,40,76,6,0,48,69,32,32,1,1
<DC>
<J00> | 
<EB>
<T>Awesome Business
<DB>
<J00>{TICKET DATE} {TICKET TIME}|Server: {USER NAME}  #{TICKET NO}
{ENTITIES}
<EB>
[<L00>NOTE: [{NOTE}]]
<DB>
<F>-
{ORDERS}
<F>=
<EB>
<J00>Total:|(L[=F((TN('{TICKET TOTAL}')-TN('{CALCULATION TOTAL: }'))/TN('{EXCHANGE RATE:HNL}'))]) [=F(TN('{TICKET TOTAL}')-TN('{CALCULATION TOTAL: }'))]
<DB>
{DISCOUNTS}
[<J00>Total FREE:|(L-[=F(TN('{ORDER STATE TOTAL:Gift}')/TN('{EXCHANGE RATE:HNL}'))]) -{ORDER STATE TOTAL:Gift}]
[<J00>Discounts:|-[=F(TN('{ORDER TAG TOTAL:Discount}')+(-1*(TN('{ORDER TAG TOTAL:VIP Discount}')+TN('{ORDER TAG TOTAL:HH Discount}'))))]]
<EB>
[<J00>*** TOTAL SAVINGS:|-[=F((TN('{ORDER TAG TOTAL:Discount}')+(-1*(TN('{ORDER TAG TOTAL:VIP Discount}')+TN('{ORDER TAG TOTAL:HH Discount}')))+TN('{ORDER STATE TOTAL:Gift}')+(-1*TN('{CALCULATION TOTAL:Discount}'))))]]
<DB>
<F>=
<EB>
<J00>Subtotal:|(L[=F((TN('{TICKET TOTAL}')-TN('{TAX TOTAL}')-TN('{CALCULATION TOTAL:Round HNL +}'))/TN('{EXCHANGE RATE:HNL}'))]) [=F(TN('{TICKET TOTAL}')-TN('{TAX TOTAL}')-TN('{CALCULATION TOTAL:Round HNL +}'))]
<DB>
{TAXES}
<EB>
<J00>Tax Total:|(L[=F(TN('{TAX TOTAL}')/TN('{EXCHANGE RATE:HNL}'))]) {TAX TOTAL}
<DB>
{SERVICES}
<EB>
<J10>GRAND TOTAL:|(L[=F(Math.round(TN('{TICKET TOTAL}')/TN('{EXCHANGE RATE:HNL}')))]) [=F(TN('{TICKET TOTAL}'))]
<DB>
<L00>{CALL:num.numToSpanish('{TICKET TOTAL}','{EXCHANGE RATE:HNL}')} Lempira
<J00>XR:|([=F('{EXCHANGE RATE:HNL}','0.0000')]) [=F(1/TN('{EXCHANGE RATE:HNL}'))]
[<F>=
<J00>PAYMENT TOTAL:|(L[=F(TN('{PAYMENT TOTAL}')/TN('{EXCHANGE RATE:HNL}'))]) [=F(TN('{PAYMENT TOTAL}'))]]
{PAYMENTS}
[<L00>CC Info: {TICKET TAG:CCtype} ({TICKET TAG:CCdigits})]
<F>-
[<J00>[=(TN('{PAYMENT TOTAL}')-TN('{TICKET TOTAL}')) > 0 ? 'CHANGE TOTAL:|' + F(TN('{PAYMENT TOTAL}')-TN('{TICKET TOTAL}')) : '']
{CHANGES}
<F>=]
<EB>
<T>Tip/Propina
<C00>Suggested Amounts NOT INCLUDED!
<DB>
<J00>10%:|(L[=F(TN('{TICKET TOTAL}')/{EXCHANGE RATE:HNL} * 0.10)]) [=F(TN('{TICKET TOTAL}') * 0.10)]
<J00>15%:|(L[=F(TN('{TICKET TOTAL}')/{EXCHANGE RATE:HNL} * 0.15)]) [=F(TN('{TICKET TOTAL}') * 0.15)]
<J00>20%:|(L[=F(TN('{TICKET TOTAL}')/{EXCHANGE RATE:HNL} * 0.20)]) [=F(TN('{TICKET TOTAL}') * 0.20)]
<EB>
<C00>ALL TIPS go to our Awesome Staff!
<DB>

[DISCOUNTS]
<J00>{CALCULATION NAME} {CALCULATION AMOUNT}:|(L[=F(TN('{CALCULATION TOTAL}')/TN('{EXCHANGE RATE:HNL}'))]) {CALCULATION TOTAL}

[PAYMENTS:Cash USD]
<J00>{PAYMENT NAME}|{PAYMENT AMOUNT}

[PAYMENTS:Cash HNL]
<J00>{PAYMENT NAME} (L[=F(Math.round(TN('{PAYMENT AMOUNT}')/TN('{EXCHANGE RATE}')))])|{PAYMENT AMOUNT}

[PAYMENTS:Credit Card HNL]
<J00>{PAYMENT NAME} (L[=F(TN('{PAYMENT AMOUNT}')/TN('{EXCHANGE RATE}'))])|{PAYMENT AMOUNT}

[PAYMENTS:Credit Card USD]
<J00>{PAYMENT NAME}|{PAYMENT AMOUNT}

[PAYMENTS:Customer Account]
<J00>{PAYMENT NAME}|{PAYMENT AMOUNT}

[CHANGES:Cash USD]
<J00>{CHANGE PAYMENT NAME}|{CHANGE PAYMENT AMOUNT}

[CHANGES:Cash HNL]
<J00>{CHANGE PAYMENT NAME} (L[=F(Math.round(TN('{CHANGE PAYMENT AMOUNT}')*(F(1/TN('{EXCHANGE RATE}')))))])|{CHANGE PAYMENT AMOUNT}

[ORDERS]
<L00>{CALL:str.pad('{QUANTITY}','right',2," ")} {CALL:str.pad('{NAME}','right',27," ")} {CALL:str.pad('{PRICE}','left',7," ")} {CALL:str.pad('{TOTAL PRICE}','left',9," ")}
{ORDER TAGS}

[ORDERS:Gift]
<L00>{CALL:str.pad('{QUANTITY}','right',2," ")} {CALL:str.pad('{NAME}','right',27," ")} {CALL:str.pad('{PRICE}','left',7," ")} {CALL:str.pad('**FREE**','left',9," ")}
{SORTED ORDER TAGS}

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

[ORDER TAGS:Special Modifiers]
<L00>    [=(TN('{ORDER TAG QUANTITY}') > 1 ? ' {ORDER TAG QUANTITY}x ' : '    ')] {CALL:str.pad('{ORDER TAG NAME}','right',20," ")} [=TN('{ORDER TAG PRICE}')!=0 ? '{CALL:str.pad('{ORDER TAG PRICE}','left',8," ")}' : ''] [=TN('{ORDER TAG PRICE}')!=0 ? ("         "+F((TN('{QUANTITY}')*TN('{ORDER TAG TOTAL PRICE}')),'0.00')).slice(-9) : '']

[ORDER TAGS:ExtraAddons]
<L00>    [=(TN('{ORDER TAG QUANTITY}') > 1 ? ' {ORDER TAG QUANTITY}x ' : '    ')] {CALL:str.pad('{ORDER TAG NAME}','right',20," ")} [=TN('{ORDER TAG PRICE}')!=0 ? '{CALL:str.pad('{ORDER TAG PRICE}','left',8," ")}' : ''] [=TN('{ORDER TAG PRICE}')!=0 ? ("         "+F((TN('{QUANTITY}')*TN('{ORDER TAG TOTAL PRICE}')),'0.00')).slice(-9) : '']

[ORDER TAGS:SideServings]
<L00>    [=(TN('{ORDER TAG QUANTITY}') > 1 ? ' {ORDER TAG QUANTITY}x ' : '    ')] {CALL:str.pad('{ORDER TAG NAME}','right',20," ")} [=TN('{ORDER TAG PRICE}')!=0 ? '{CALL:str.pad('{ORDER TAG PRICE}','left',8," ")}' : ''] [=TN('{ORDER TAG PRICE}')!=0 ? ("         "+F((TN('{QUANTITY}')*TN('{ORDER TAG TOTAL PRICE}')),'0.00')).slice(-9) : '']

[ORDER TAGS:Discount]
<L00>    [=(TN('{ORDER TAG QUANTITY}') > 1 ? ' {ORDER TAG QUANTITY}x ' : '    ')] {CALL:str.pad('{ORDER TAG NAME}','right',20," ")} [=TN('{ORDER TAG PRICE}')!=0 ? '{CALL:str.pad('{ORDER TAG PRICE}','left',8," ")}' : ''] [=TN('{ORDER TAG PRICE}')!=0 ? ("         "+F((TN('{QUANTITY}')*TN('{ORDER TAG TOTAL PRICE}')),'0.00')).slice(-9) : '']

[ORDER TAGS:VIP Discount]
<L00>    [=(TN('{ORDER TAG QUANTITY}') > 1 ? ' {ORDER TAG QUANTITY}x ' : '    ')] {CALL:str.pad('{ORDER TAG NAME}','right',20," ")} [=TN('{ORDER TAG PRICE}')!=0 ? '{CALL:str.pad('{ORDER TAG PRICE}','left',8," ")}' : ''] [=TN('{ORDER TAG PRICE}')!=0 ? ("         "+F((TN('{QUANTITY}')*TN('{ORDER TAG TOTAL PRICE}')),'0.00')).slice(-9) : '']

[ORDER TAGS:HH Discount]
<L00>    [=(TN('{ORDER TAG QUANTITY}') > 1 ? ' {ORDER TAG QUANTITY}x ' : '    ')] {CALL:str.pad('{ORDER TAG NAME}','right',20," ")} [=TN('{ORDER TAG PRICE}')!=0 ? '{CALL:str.pad('{ORDER TAG PRICE}','left',8," ")}' : ''] [=TN('{ORDER TAG PRICE}')!=0 ? ("         "+F((TN('{QUANTITY}')*TN('{ORDER TAG TOTAL PRICE}')),'0.00')).slice(-9) : '']

[ENTITIES:Table]
<L00>Table: {ENTITY NAME}

[ENTITIES:Customer]
<J00>Cust: {ENTITY NAME}|Bal: {ENTITY BALANCE}

[TAXES]
<J00>Tax {TAX NAME} ({TAX RATE}%):|(L[=TN('{TAX AMOUNT}')/TN('{EXCHANGE RATE:HNL}')]) {TAX AMOUNT}

[SERVICES]
<J00>{CALCULATION NAME} ([=F(TN('{CALCULATION AMOUNT}'))]):|(L[=TN('{CALCULATION TOTAL}')/TN('{EXCHANGE RATE:HNL}')]) {CALCULATION TOTAL}

Sample Result:

   <XCT> command produces NVRAM Logo Here

░░░░░░░░ A w e s o m e  B u s i n e s s ░░░░░░░░
2016-12-12 15:04               Server: Q  #12062
Cust: Cathy                            Bal: 8.00
------------------------------------------------
2  Barena                         3.00      6.00
         VIP Discount 1          -1.00     -2.00
1  Imperial                       3.00  **FREE**
1  Donair Wrap.Wrap              12.00     12.00
         SIDE NONE               -1.00     -1.00
1  Pulled Pork Wrap.Wrap         12.00     12.00
         SIDE Fries                             
     3x  ADD PEPPER JACK          1.00      3.00
         ADD GRAVY                1.00      1.00
================================================
Total:                           (L713.00) 31.00
Total FREE:                      (L-69.00) -3.00
Discounts:                                 -2.00
*** TOTAL SAVINGS:                         -5.00
================================================
Subtotal:                        (L635.03) 27.61
Tax T2 (18%):                      (L14.03) 0.61
Tax T1 (15%):                      (L71.99) 3.13
Tax Total:                         (L86.02) 3.74
Round USD + (0.35):                 (L8.05) 0.35
GRAND TOTAL:                     (L721.00) 31.35
SETECIENTOS VEINTIUNO Lempira                   
XR:                               (0.0435) 23.00
================================================
PAYMENT TOTAL:                   (L752.10) 32.70
1111 1111-Cathy                             4.00
Cash USD                                    5.00
Cash HNL (L100.00)                          4.35
Cash HNL (L100.00)                          4.35
Credit Card USD                            15.00
------------------------------------------------
CHANGE TOTAL:                               1.35
Cash HNL (L31.00)                           1.35
================================================
░░░░░░░░░░░░░ T i p / P r o p i n a ░░░░░░░░░░░░
        Suggested Amounts NOT INCLUDED!         
10%:                               (L72.11) 3.14
15%:                              (L108.16) 4.70
20%:                              (L144.21) 6.27
       ALL TIPS go to our Awesome Staff!        
************************************************

1 Like