API
User Manual
  • Introduction to API v2
  • Guides
    • Getting started
    • Authorization
    • Delivery Notes Integrations
  • API Reference
    • General
      • Data types
        • Validation
        • Prices
      • Schema
      • Flags
      • ETags
        • ETag examples
      • Filtering
      • Sorting
      • Paging
      • Methods
      • HTTP Status Codes
    • Enums
      • Payment methods
      • Units
      • Order status
  • Entity
    • Attendance
    • Branch
    • Category
    • Cloud
    • Course
    • Customer
    • Customer Account
    • Customer Account Log
    • Daily Menu
    • Daily Menu Product
    • Delivery Note
    • Discount group
    • EET subject
    • Employee
    • Money log
    • Order
    • Order item
    • Product
    • Product Customization
    • Product Ingredient
    • Reservation
    • Stock Packaging
    • Supplier
    • Table
    • Tag
    • Tax (VAT rates)
    • Warehouse
    • Warehouse Branch
  • Others
    • Reports
      • Base Sales Report
    • POS actions
    • Release notes
    • Breaking changes
    • Webhook
    • Third-party libraries
  • Migration
    • Migrating from API v1
    • API v1 Services
      • Branch Service
      • Category Service
      • Customer Service
      • Employee Service
      • OAuth2 Login Service
      • POS action service
      • Product Service
      • Reservation Service
      • Sale Service
      • Stock Service
      • Supplier Service
      • Tableseat Service
      • Tag Service
      • Warehouse Service
Powered by GitBook
On this page
  • Limitations
  • Rounding

Was this helpful?

Export as PDF
  1. API Reference
  2. General
  3. Data types

Prices

Limitations

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

Rounding

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.

PreviousValidationNextSchema

Last updated 3 years ago

Was this helpful?