Skip to main content

Hi, 

Is there a option to store HighPrecisionMoney on Orders? 

Article has a HighPrecisionMoney but all the calculations on order/cart are rounded and stored as CentPrecisionMoney. 

Our use case is that we would need to export orders to external systems and we could have rounding issues when we reimport orders or need to sync them. 

Regards, 
Drazen 

Hi Drazen, thanks for raising this question in the Community. I’d recommend to contact the support team and raise a ticket with them. Have a great day! 

 


Hi Drazen,

I’m sure its a good idea to follow Lily’s recommendation and contact support.

For anybody reading this in the hope to find a solution, I’d like to propose the following workaround for the time being:

Use an extension (or, if possible, a subscription) that is executed on every create or update order event and writes the high precision sum into a custom field
Unfortunately, there is no custom field type for high precision money - there is once again only cent precision, so you’ll need to store it e.g. as a JSON String.

 

I believe there is potential in two easy-to-implement but valuable improvements in commercetools in your inquiry:
1. Add a custom type for high precision money

2. Add a “mode” to orders that will calculate the totalPrice in high precision money

 

Best regards,
Patrick


Thank you @Patrick Burkart I would agree on the high precision mode on order level. 

Because currently variants support the high precision but a lot of systems need to be in sync also on order level and I know that often there could be rounding issues, especially when some discounts are applied or custom items. 

 

Regards, 
Drazen


Reply