As we had the need to increase the price precision for our customer, I’ve stumbled upon the
But they are not used in most of the Spryker code.
So far I’ve found the following parts which cannot handle a higher price precision by the core:
- Currency formatting has no conversion from a potential higher price precision before the price is formatted (affects Zed, Yves & Glue)
- Absolute discounts are not converted into a potential higher price precision, neither they are stored in higher precision. Therefore applying an absolute discount will apply a lower discount, depending on the price precision. (e.g.: Price Precision 1000 instead of default 100 will apply a 10€ discount as 0,1€ instead)
- Absolute expenses are not converted into a potential higher precision, neither they are stored in higher precision. Therefore applying an absolute expense, like shipping costs, will add a lower expense than expected. (e.g.: Shipping costs of 4,95€ will be applied as 0,49€ with a price precision of 1000 instead of 100)
- Price data importer does not respect price precision either, but this could be discussed if it is expected behaviour as the project may already import from a dataset which contains the higher price precision.
As adapting the price precision constants was the official solution to increase the price precision, according to Price as decimal I would expect that those constants are used in the code as they provide only a partial solution for now and therefore are mostly useless without adapting a few other parts of the code.