Not Saving Item Price at 3 Decimal Places

I went to program settings and changed the database decimal places from 2 to 3.

Now when I go to products and try to set the price for Large portion to 8.985 and save it changes to 8.495 Is it possible to define a number for all 3 decimal places?

My reason for this is when they order 2 of that item its supposed to be 16.99. I know its no big difference but the item is advertised as such so it could cause some customer complaints.

I have the same issue, I went to program setting => Change decimal places 3 (But it didn’t save) .

How can i resolve it.

I just Resolve it bu going to Program Setting =>Currency decimal => change it to .

Now it work like a charm :wink:

Actually, this is still an issue.
The OP resolved it for his situation, but i also have rounding errors when using calculated item prices.

I set Database Decimal Places to 4 (that is the maximum allowed apparently)

There are cases where we derive item price from total price and
quantity, and use Update Order to set the item price. Depending on the
numbers, the item price can end up being calculated to something like
3.3333333 (example Qty=3 Total=10). In those cases SambaPOS is
truncating item price using the setting for Visible Decimal Places and not Database Decimal Places.
(it ends up being STORED as 3.3300 when the Database decimals to set to 4).

Prior to saving the ticket, the item price is stored locally with 4 decimal places and the total price is calculated correctly. But after saving the ticket the item price is stored as 3.3300 and the total is wrong (9.99 instead of 10.00 in this example with Visible Decimal Places set to 2)

(sorry for any confusion, but i originally posted this error quite differently and had to correct after fiddling with Decimals settings and further testing)

Maybe someone could explain the difference between the following settings, and how they inter-operate. How they are stored, rounded, calculated, and displayed could be confusing.

Do OS Regional/Locale settings have any affect as well?

P.S. I don’t have any issues with decimals.

1 Like

Thanks for showing all these settings.
Looks like I’ll have to experiment more!
but this behavior looks like a bug to be fixed because there is an inconsistency with the data stored locally and stored in the database. I can see the local value displayed in a key pad with a default value set to {PRICE}. This is showing correctly according to the Database Decimal Places setting. example 33.3333
But after saving the ticket, {PRICE} is truncated to the Visible Decimal Places setting but showing the extra trailing 2 decimals. example: 33.3300

Now you have reminded me that when i was first setting up SambaPOS and changed the decimals in “Change Decimal Places” to 0, SambaPOS went crazy, the navigation screen disappeared and I couldn’t get it back!
I didn’t know how to manually restore databases at the time, and have never tried that again.

I don’t recommend such pricing. When you force ticket to calculate as $9.9999 and appear as $10 you’ll tender 0.0001 more and that will lead to differences on taxes and long range reports. While setting up prices try to set up tender-able prices.

PS: [quote=“philbkk, post:4, topic:7706”]
(it ends up being STORED as 3.3300 when the Database decimals to set to 4).

That will work fine when SambaPOS is restarted. Database access objects needs to reload to work with updated decimal places.

Some of them explained here.


Program Settings > Currency Decimals

Implemented to make SambaPOS currency decimal places to work fine for countries that have 3 decimal places like Bahrain. Database Decimal Places updates database currency fields to store that much decimals. Visible Decimal Places rounds values for screen.

Payment Screen Settings > Auto Rounding

Rounds order prices that appears on the left side of payment screen. These prices reflects discounts, tips, etc and that leads to non-tenderable prices like 3.24. By using that setting it is possible to round prices to 5, 25 or 50 cents.

Payment Screen Settings > Auto Decimals

Maintenance > Change Decimal Places

Implemented to update decimal places as a maintenance to ensure database fields updated correctly. Might needed to fix possible decimal place issues.

Foreign Currency > Rounding

Rounds calculated amount in that foreign currency while Calculating amount with Exchange Rate.

Calculation Type > Rounding

Rounds the amount of the calculation to a tender-able price. For example $13.11 discount can be rounded to $13.10 if the smallest currency in that country is 10 cents.

Regional settings also affects how values appears on screen but it does not change how values are stored in database.