Episerver Commerce Purchase Order Conversion Issues (Commerce 11.8.2)

Scott Reed
Member since: 2010
 

A good while ago I posted an issue I had with Money fields causing issues with converting to a PO and was told that the Purcahse Order classes because they are the old classes do not support it and to use a decimal for the value store instead.

I've just found out that when converting to a puchase order all my decimal values are being rounded and loosing all their precision which is breaking key parts of our calculations...

Can someone explain this or give me a work around other than yet again changing all our meta values to say a short string so they don't loose the precision,.

Thanks

#196400 Aug 29, 2018 14:47
  • Mark Hall
    Member since: 2011
     

    What are the Order Meta Fields Data precision?  I thought the default was 9 digits.  Could be something in SaveAsPurchasOrder in the SerialiedCartProvider.  Which fields are losing precesion?

    #196409 Aug 30, 2018 3:02
  • Quan Mai
    Member since: 2011
     

    Yes I'd suggest to look into the precision of the metafield. By default it's (18,0), so you would need to change it to retain the required precision 

    #196416 Aug 30, 2018 8:15
  • Scott Reed
    Member since: 2010
     

    Yeah it looks to be the deciaml settings that was the issues, I used the defaults and assumed these would have a resonable scale out of the box (as it's a decimal) and also wasn't seeing any scaling issues with the cart but I guess the serializable cart doesn't care about this? I changed them to short strings in the end and it's working fine now. Thanks

    #196422 Aug 30, 2018 10:13