Most of the values representing price are stored as a double precision internally. That means that the numbers have a 15 decimal digits precision.


Do not round any price value when creating or updating an entity. The prices are usually rounded when they are shown in the Dotykacka Application, but they should be stored as precise as possible in the entities. The difference can be unnoticeable for small amounts of goods, but it can result in rounding errors for many items when a report is calculated for a wider time interval.
Let's demonstrate the difference on a product of sell price 50 CZK with 21% VAT. If you set the price without VAT:
  • not rounded, i.e. 41.3223140495868 CZK, then you sell 1,000 pcs for 50,000 CZK (expected)
  • rounded on 2 places, i.e. 41.32 CZK, then you sell 1,000 pcs for 49,997 CZK (41.32*1.21*1000)
Here the difference of 3 CZK is quite visible so we advise setting precise prices without rounding.
Last modified 10mo ago
Export as PDF
Copy link
On this page