Skip to main content
Solved

HighPrecisionMoney prices on Orders

  • October 29, 2024
  • 3 replies
  • 113 views

Drazen
Forum|alt.badge.img+2

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 

Best answer by Patrick Burkart

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

View original

Lily
Forum|alt.badge.img+2
  • Community Manager
  • October 30, 2024

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! 

 


Patrick Burkart
Forum|alt.badge.img+2

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


Drazen
Forum|alt.badge.img+2
  • Going Places
  • October 31, 2024

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings