Break down Service Charge In Work Period Report

How do I add an update cacluation action to the dine in ticket tag flow

Again please read what is said.
I cannot be more specific without knowing your setup and seeing screenshots of how you are applying the tag. Every samba setup is different and cannot guess.
You might be able to use a ticket tag updated rule if available however I would personally have an ask question on ticket created for eat in or dine out to ensure every ticket is tagged one way or the other. Then the resulting rules based on the selection would set the tag and in case of the dine in also set the service charge calculation.

Doesnt help a huge amount.
Going to guess ou have just mapped the tag to show the default tag selector.

Try (CA=Service Charge) expression instead of (TT) expression. That will work for tickets that includes a calculation named “Service Charge”.

So it should be:

[Payments:1, 1, 1, 1]
>Payment|Net|Service Charge|Total
{REPORT PAYMENT DETAILS:P.Type,[$4-($4*0.05)];0.00,[$4*0.05];0.00,P.Amount.Sum:(CA=Service Charge)}
>Total|{REPORT PAYMENT DETAILS:=[$3-($3*0.05)];0.00,[$3*0.05];0.00,P.Amount.Sum}

Yes
 and you should also add it for Total part of the report to have correct totals.

PS: For ease of reading please format templates properly by selecting template and clicking </> button. I fixed last one for you.

indent preformatted text by 4 spaces

[Payments:1, 1, 1, 1]

Payment|Net|Service Charge|Total
{REPORT PAYMENT DETAILS:P.Type,[$4-($40.05)];0.00,[$40.05];0.00,P.Amount.Sum:(CA=Service Charge)}
Total|{REPORT PAYMENT DETAILS:=[$3-($30.05)];0.00,[$30.05];0.00,P.Amount.Sum:(CA=Service Charge)}

Is this correct?

Yes, please execute and let us know if it works fine.

The numbers in this report are not matching the actual correct numbers that are displayed in the work period report. When I try to subtract the numbers from the work period report manually, the answer is not matching the net total of the new report. its off by 2,000

The net total in the new report is not correct. Also service charge total is also not correct.

The net total for both cash and credit card payments should be 54,590 and net total service charge should be 2,632.

In the new report its showing net total for both payment types as 47852.45 and net total service charge as 2518.55. These are not correct figures.

Can you post the screenshot for full work period report?



Can you please settle remaining unpaid ticket and fully post both reports?

1 Like

OK we made a mistake while calculating service charge. Replace your report with that and it will work fine. Please keep in mind work period > service charge amount shows total from both paid and unpaid tickets. Our report shows totals for only paid amounts as it calculates from payments.

[Service Breakdown:1, 1, 1, 1]
>Payment|Net|Service Charge|Total
{REPORT PAYMENT DETAILS:P.Type,[$4-(($4*5)/105)];'#,0.00',[($4*5)/105];'#,0.00',P.Amount.Sum:(CA=Service Charge)}
>Total|{REPORT PAYMENT DETAILS:=[$3-(($3*5)/105)];'#,0.00',[(($3*5)/105)];'#,0.00',P.Amount.Sum:(CA=Service Charge)}
1 Like

I tried it still not matching. all tickets are closed no payment is pending:

Can you create a backup and PM me the zip file?

Please check I have messaged you the backup file.

There are 2 issues.

-1. Your current setup does not match to your definition.

You said when your cash sales is $4000 the service charge will be $200 but you don’t calculate service charge from discounted ticket amount. Here you can see service charge is almost %10 ($405) of payment amount ($4.405.)

-2. You applied rounding to service charge calculation.

When such rounding applied service charge won’t be exact %5.

I tried to find a solution from your comments but as @JTRTech tried to explain service charge calculations does not directly relates to how you settle ticket.

We can force calculating service charge from ticket total like



[Service Breakdown:1, 1, 1, 1]
>Payment|Net|Service Charge|Total
{REPORT PAYMENT DETAILS:P.Type,[$4-(($4*5)/100)];'#,0.00',[($4*5)/100];'#,0.00',T.PlainSum.Sum:(CA=Service Charge)}
>Total|{REPORT PAYMENT DETAILS:=[$3-(($3*5)/100)];'#,0.00',[(($3*5)/100)];'#,0.00',T.PlainSum.Sum:(CA=Service Charge)}

However that won’t perfectly match to original service amount.

3 Likes