# %10 service charge for selected products

**URL:** <https://forum.sambapos.com/t/10-service-charge-for-selected-products/8995>\
**Category:** V5 Tutorial\
**Created:** [January 14, 2016, 2:23pm UTC](https://forum.sambapos.com/t/10-service-charge-for-selected-products/8995 "2016-01-14T14:23:34Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [January 14, 2016, 2:23pm UTC](https://forum.sambapos.com/t/10-service-charge-for-selected-products/8995/1 "2016-01-14T14:23:34Z")

</div>

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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/2/8/282ac95bcff2e2fdee5dbff7d1f2ffe822f616ad.png)

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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/9/e/9e716a766618a9a2be599770391a89a8ce38c343.png)

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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/a/0/a0ac493554aaa0babee8b5b4dafa7abf707c977a.png)

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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/f/9/f91a7afff1deb72bd718bfec8b61fde3578c8a05.png)

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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/5/5/5533d77e4459b27a79919567ca81e9d8fae4edc8.png)

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

```auto
[=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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/e/7/e79a650227c0b978f052981c984be5a619e07b21.png)

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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/d/1/d1dffd783aade6e29be9f7bb4500f2c16b3f72ce.png)

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

 ![](https://forum.sambapos.com/uploads/default/original/3X/4/5/4530f4a00dbe10040f1b8c4827f4e75bd96ecf9e.png)

Edit `Update Service Charge` rule to change service calculate expression.

 ![](https://forum.sambapos.com/uploads/default/original/3X/d/8/d85d79e21754f78aa1a4ffdbae9f543328a6bc1e.png)

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

```auto
[=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.

 ![](https://forum.sambapos.com/uploads/default/original/3X/b/c/bc90c6999a94d1cf7933e2bfbe24a75aaa7228e5.png)

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

 ![](https://forum.sambapos.com/uploads/default/original/3X/9/a/9ae593c9dbb12081872481eeca2825ebe9b3ac04.png)

---

_[View the full topic](https://forum.sambapos.com/t/10-service-charge-for-selected-products/8995)._
