Maintain price for order tags on Gift orders

I have items in my product list, and then i have order tags to add to the order. These tags have extra cost as they are additional toppings to the orders. For promotions i need to flag this order free. However, i still need to charge for the additional order tags applied. Im using the Order Gift status to mark the order free at the moment.

So how do i keep the main item free but charge for the additional order tags?

So i have tried to edit the order price, setting it to 0.
But Sambapos crashes every time any order item in the ticket has a price 0.
I was trying to set the item price to 0, so that the Order tags still have their price. Sambpos crashed.
Then i created a new product with price 0. Now, when i added that item to my ticket, Sambapos crashed.

error exception: Divide by 0

Does anyone know a workaround on this?
The whole goal is to not calculate the Main Item’s price as it is going free with a promotion, but charge for the order tags on it as they have prices.

There is an option to allow 0 priced order.
Think it might be in the ticket type settings but not had to change the setting for a while.

The solution I would suggest would be 0 price order and leave tags priced.
If you need to report these orders you would want to set a new type of state which you can report on however there will obviously be no value to report as changed price to 0…without some more advanced script/coding to check the origional product price… but you could report quantity easily.

Thank You!

Found the ticket option for ‘Allow Zero Priced Orders’.
So enabled it. But anytime i update the order Item price to 0 using the update order action, sambapos crashes.
Exact same case when i add a predefined product from menu that has a price 0.

Error Exception:
Type: System.DivideByZeroException
Message: Attempted to divide by zero.
Source: mscorlib
Stack Trace: at System.Decimal.FCallDivide(Decimal& d1, Decimal& d2)

Another strange thing i found just now is:
I have 2 Calculation Types: Delivery and Promotion.
There is Delivery charge, and promotion cost is set and relative orders marked 0 priced.
Strange enough, Tax calculation works on delivery charge but not on Promotion. Other than the name there is nothing different between Delivery Charge and Promotion Charge.

Any suggestions?

Ok. Checking in deeper it seems all issues are ticket total. If an action results in Ticket Total = 0, sambapos crashes.
When Ticket Total = 0 TAX is also not calculated.

In my case there can be orders where people apply for the promotion. Then the promotion has a price that is added to the ticket and relative order items are marked 0. However if Ticket Total reaches 0, sambapos fails. I tried to test further by adding order tags that had price, thus preventing ticket total from being 0. In this case, everything worked perfectly.

error exception is always ‘Attempted Divide by 0’.

UPDATE: I think i can fix this problem if i turn my Promotion into a product, have the cost on it there, so when i flag an item free due to promotion, it does not make my ticket total 0. The only thing that bothers my now is that the promotion item is printed in the kitchen orders.

So, is there a way to not print Items that belong to a certain group at a print job.?
Basically my promotion is under the group name ‘Promotions’. So i would want to not print all items under this group in my kitchen ticket.

I would be suprised if tax is being calculated with a divide as this would cause other issues for people… saying that it would depend on if price was inclusive or exclusive (only use inclusive in uk)
Sure its not a calculation/service charge?

well, my prices were inclusive of tax. Some strange thing going on… it seems the ticket total is used to divide something. So as soon as that total hit 0, sambapos was crashing.

Anyhow, solved the issue by turning the promotion into a product. That prevented ticket total from becoming 0 on flagging orders promotion and setting their price 0. Order tag prices still get calculated. Tax is calculated accurately. All works now.

The only thing i dont like now is that the promotion info is also printed on the kitchen printer. But i guess i can live with that.

What info? surely this can be excluded from the kitchen print though mapping or specifying a blank order line template for perticuar product.

1 Like

Never figured out how to map a product to not print in a printer template, but we can live with that. its just the name of the promotion in the Kitchen ticket. The chef knows he cant cook a promotion! :slight_smile:

Create a null printer (printer without a printer device selected) and map these products to that printer.

How do i map a product to a printer ?

This tutorial shows how to map food items to kitchen printer and beverages to bar printer.

1 Like