%10 service charge for selected products

In this tutorial I’ll show how to calculate service charge for specific products.

First I’ve created an account for Service Charges. I selected Account Type as Sales accounts.

I created an account transaction type and selected Source Account as Service Charges. So service charges will appear on accounts screen separately and I can report them.

We’ll need a calculation type. As we’ll calculate servicing amount dynamically I’ve selected Calculation Method as Fixed Amount and left amount as 0. Please be sure you’ve correctly selected Service Charge Transaction as Transaction type.

I’ll need an action to add Service Charges to Tickets. I created an Update Ticket Calculation action and selected Service Charge as Calculation type. I’ve also configured [:Amount] as a parameter so I can pass calculated service amount from rule.

While preparing tutorial I’ve noticed it will be useful to have a Round Amount setting for that action. That will be available with (.58)

Finally I created a rule that calculates service charge. I’ll use Ticket Total Changed rule to calculate service charge.

This expression calculates servicing amount and passes it to the action.

[=TN('{TICKET ORDER TOTAL EXP:(MG=Beverages) and (ODI=True)}') * 0.1]

I used {TICKET ORDER TOTAL EXP:} tag to get sum of selected orders and multiplied it by 0.1 to calculate %10 of it.

In this expression I applied service charge for items under Beverages Category. You can change (MG=Beverages) part of the expression as (MG=Breakfast) if you want to calculate it for Breakfast items instead of Beverages.

(ODI=True) part of the expression needed to exclude voided items.

We can test it to see it calculates %10 service charge for beverages but not for other items.

If you don’t have a specific product group to calculate service charges you can use product tags to enable service charge for specific items.

To do that create a new product tag from Settings > Program Settings. I named it as Servicing.

Use Product Tag Editor to select products. Type Yes for items you want to enable service charge for.

Edit Update Service Charge rule to change service calculate expression.

I changed (MG=Beverages) part of the expression as (MT.Servicing=Yes).

[=TN('{TICKET ORDER TOTAL EXP:(MT.Servicing=Yes) and (ODI=True)}') * 0.1]

You can use these expressions if you want a different calculation method.

  OT.<tag name>                      Order Tagged With
  OS.<state name>                    Order is in State
  OU                                 Order User Name Equals
  MT.<tag name>                      Order Menu Item Custom tag Equals
  MG                                 Order Menu Item Group Equals

This is how Service Charges should appear on Accounts Screen.

Accounts Screen Shows all Service Charges. In work period reports you can see amounts for reported work periods.


Thanks for the update.
I have reviewed the Service Charge calculation, Tagging and reporting works great. Is it possible to extend this to other entity’s such as employees so we can calculate commission .As we pay some of our employees on commission on sales and each employee vary some are on base plus commission and others on commission only . Or is there a better way of implementing the following .


@emreDear Emre, could you please guide me how to set Service charges 10% auto applied for all items or for every orders.

Change this:

[=TN('{TICKET ORDER TOTAL EXP:(MG=Beverages) and (ODI=True)}') * 0.1]

to this:

[=TN('{TICKET ORDER TOTAL EXP:(ODI=True)}') * 0.1]

Thanks you so much “QMcKay”. Now it is working 10% Service Charges automatically.

There is a problem with states. Everything working for categories but:
If I gift a product, service charge is not being gifted. It counts service charge of gifted product.
Any fix?

Try add OS.GStatus!=Gift
[=TN('{TICKET ORDER TOTAL EXP:(ODI=True)} and (OS.GStatus!=Gift)') * 0.1]

I tried adding that but didnt work

Prety sure you cannot do != here.
Maybe try GStatus= or GStatus=‘’ as by default it has no value.

How to eleminate GIFT Items ?

Did you try the above?
You probably can’t use != but sure you can use =/=‘’ like you can in automation command mapping.

1 Like

I did try the above things. it didnt work.

I will try this now (OS.GStatus=/=Gift)

[=TN('{TICKET ORDER TOTAL EXP:(MT.FAB=KITCHEN) and (ODI=True) and (OS.GStatus=/=Gift)}') * 0.1]

This is my expression. Its not working.

No, you would want OS.GStatus=BLANCK since normal orders have a null/empty GStatus.

Okay Let me try again with just blank space

Its working now. Thanks @JTRTech
I tried this expression before but failed because i actually didnt give a blank space
[=TN(’{TICKET ORDER TOTAL EXP:(MT.FAB=KITCHEN) and (ODI=True) and (OS.GStatus= )}’) * 0.1]

OLD ONE (FAILED) Because it was missing a space i guess.
[=TN(’{TICKET ORDER TOTAL EXP:(MT.FAB=KITCHEN) and (ODI=True) and (OS.GStatus=)}’) * 0.1]

How can I make Service Charge as button which Adds/Removes the Service Charge?

I’ve used the process above to have a service charge per item based on Product Tag but run into the same issue of service remaining on gifted items. however, if I add an additional item the calculation is correct. The problem arises when the entire bill is gifted or the bill itself is only one item that is a gift. it seems as if gifting removes the price after service is added to the ticket and I need a way to make the rule run again after the gift rule?

the rule constraint I’m using:
[=TN(’{TICKET ORDER TOTAL EXP:(MT.Service%=Yes) and (ODI=True) and (OS.GStatus= )}’) * 0.1]


[=TN('{TICKET ORDER TOTAL EXP:(MT.Service=Yes) and (ODI=True) and (OS.GStatus="" )}') * 0.1]

Of not you could transfer menu item tag to an order state on rider adding and add an update order state as part of gift rule to undo the service tag so is excluded and rather than use MT. Use order state in expression.