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.