Eat out to help out

Over working it, can make an expression that can just be on an update calulation action to do the math.
Either link in existing covers ticket tag or prompt for covers.
Apply a discount that doesn’t discount tax (only was as including tax distributes accross all orders meaning it discounts from both taxes) Plus vat is payable of full amount before discount so then total vat will be correct on accounts.

So far I can only think of doing it via the payment screen. Select all items that are non alcoholic to see the total and then do the maths.
However, problem with this is as Krypton mentioned, maths isn’t a strong point for some of the staff.

No, samba does the math.
Mine will be automatic as will tap in existing discounts setup.
But basic option would be a product tag for applicable products and a button to apply discount which when pressed just applies discount using formula and report expression to calculate total of applicable products.

@JTRTech Did you complete a setup for this yet? The enquiries are starting lol…

(knowing the typical way things go, there will be a lot more enquiries on 3rd August! :stuck_out_tongue: )

I havnt yet, on my list of jobs for tonight.

1 Like

So here is what i have so far on a test automation command;


1 Like

Thats with a manual button to update calculation.
I already have quite a complicated auto updating fixed method calculation system for my regulars, locals and staff discounts.

This is what mine ends up working like, just need to add day and date constraints and can configure now ready for august.

Just need to decide now if will offer in conjunction with existing loyalty, regular and staff discount offerings.
As is staff get 50% off food and since both calculations are calculated from order totals it means staff would eat for free up to £20 a head LOL. And locals who get 20% off food would pay just £6 for £20 worth of food… Steak would be 4.95 for staff and 10.95 for regulars. :money_mouth_face:

Day and Month constraints;


My full discounts setup;

1 Like

Added update command to ticket entity changed since entity selection is not ticket creation method table might be selected at end and have set table as requirement for auto discount.
Have left open to all entity changes so it catches my other discount types too.


1 Like

The string of execute commands with selected orders expressions is a solution to make sure the onscreen calculation amount is updated as depending on use of autoselect and portion change etc where option of reset ticket comes into play.
Some scenarios need ticket reset to be true to refresh on screen but others do not, and also selected orders so as not to bypass/undo autoselect option from menu.

Changed the covers prompt from order added with EODO Discount tag to Kitchen Course tag since its dining tickets that are applicable and soft drinks alone dont need covers tag or apply for discount alone since they have a busy bar at the hotel.

So will prompt for covers in order to calculate discount if propper food is ordered, if tag not already set (have an existing covers tag flow) on the applicable days


Added update discounts command after covers set to make sure calculation shows straight away encase table not selected untill end after telling a single diner who just ordered one food item say a pint and a burger.


If you notice, the calculation is after tax meaning it doesnt effect vat at all.
Since calulations are distributed across all products when samba calculates taxs it would have to be this way else samba will reduce value of both 20% and 5% products when calculating each of the tax rates.
This was also sambas tax reports will still show the correct amount of vat you will be liable for from total sales since the vat is due of the total before the discount.
Am still unsure if receipt for customer should show the full amount vat or just the amount for the portion customer paid.
If its just the paid portion you may need to overide the print template for the 5% vat tax type and or total tax value using a formular in the template rather than template tags for taxes which would show full value tax. That would be smart route to take as even discounting before tax would still give wrong total due to the distribution of the discount as well as making reporting all over the place.
Discounts is definatly the way to go i think, had through part payment at one point but calculations can be updated on the fly as in gif and removed easily.

Unrelated but I had no idea you can index out selected orders in constraints! That solves another problem of mine lol

Thanks JTR :sweat_smile:

[='{SELECTED ORDERS}'.indexOf('0')] > -1
[='{SELECTED ORDERS}'.indexOf('0')] < 0

This is checking whether {SELECTED ORDERS} contains the 0 character, so if it returns -1, it means the {SELECTED ORDERS} does not contain a 0 character, but this could also be the case if {SELECTED ORDERS} is an empty string - not sure if any scenario would make that be the case, but good to cover that just in case.

Also, if someone selected 10, 20, 30… orders, then this would make it return 1 since it then contains the 0 character at the 2nd position, which would not give the intended results.

Probably a better way of accomplishing this would be to check 0 selected orders:


and to check 1 or more selected orders:


Just thought I’d share this, got this from one of our suppliers who sells other POS software (SamTouch). Thought might be good to see how others are handling this and anything we can learn from it.

SamTouchCovid19Update.pdf (770.8 KB)

If i remember corectly -1 is none selected, 0 is 1 selected order. :-/ was a while ago I did that would need to check back.

indexOf() is a JavaScript (and JScript, as supported by SambaPOS) function, it is to check if a character exists in a string. It will return the position in the string (first character is 0) or will return -1 if the character doesn’t exist.

So you were checking if if selected items is 0, which is fine, but I saying the 2 problems in the way you checked was that if {SELECTED ORDERS} is empty, it will return -1, and if the number contains a 0 (like 10, 20, etc.) it will return 1, i.e. the 2nd position as first position is 0 (JScript / JavaScript uses base of 0 for most counting / position functions)

Sorry, not following.
What I’m looking for is whether or not any orders are selected.
I’m checking if ita -1 or not, -1 being no orders selected so reset ticket on calculation update.
If order selected it does different flow that doesnt reset ticket.
Was a topic a while back where I struggled to explain the issue in that onscreen calculation doesnt reflect the actual discount value set as wasnt refreshing on screen.
Oddity is the issue osnt consistent. Some scenarios it auto refreshes onscreen value, others it didn’t, after allot of trial and error the above worked out so that autoselect wasn’t unselected, and onscreen calculation value was shows corectly at all times.