I've noticed that the AmountOffTotal column of the uCommerce_Discount table is a decimal(18,2).
Because of the way we want to display the discounts in the basket I'm using this field to do some calculations. This causes a problem with the rounding of the discounts.
When loading the basket from the database the rounding can be different than from a 'freshly calculated' basket. That is, when performing the calculations on a basket that has already has TransactionLibrary.ExecuteBasketPipeline() called on it will have many decimal places, but performing the same calculations on a basket retrieved from the database suddenly introduces rounding issues...
If at all possible it'd be great if the AmountOffTotal column of the uCommerce_Discount would be changed to either a MONEY datatype or simply a decimal(18,4) or something.
Thanks, I'll try to find a moment to do an upgrade. Do you happen to know if it's safe to upgrade to the latest Umbraco version aswell (7.2.4 at this point)
I have upgraded Umbraco from 7.2.0 to 7.2.4 with uCommerce and the demo store installed, and then upgrade uCommerce to the newest version. It still works.
I recommend upgrading Umbraco and then upgrade uCommerce to a newer version.
uCommerce_Discount AmountOffTotal decimal places
I've noticed that the AmountOffTotal column of the uCommerce_Discount table is a decimal(18,2).
Because of the way we want to display the discounts in the basket I'm using this field to do some calculations. This causes a problem with the rounding of the discounts.
When loading the basket from the database the rounding can be different than from a 'freshly calculated' basket. That is, when performing the calculations on a basket that has already has TransactionLibrary.ExecuteBasketPipeline() called on it will have many decimal places, but performing the same calculations on a basket retrieved from the database suddenly introduces rounding issues...
If at all possible it'd be great if the AmountOffTotal column of the uCommerce_Discount would be changed to either a MONEY datatype or simply a decimal(18,4) or something.
Hey Robert.
Thank you for reporting the bug, it has been added to our backlog and will be fixed in a upcoming release of ucommerce.
Kind regards
Thomas Arvidsen.
Hey Robert
The data type has been change in version 6.6.3 of uCommerce.
Kind regards
Thomas Arvidsen.
Thanks, I'll try to find a moment to do an upgrade. Do you happen to know if it's safe to upgrade to the latest Umbraco version aswell (7.2.4 at this point)
Hey Robert
I have upgraded Umbraco from 7.2.0 to 7.2.4 with uCommerce and the demo store installed, and then upgrade uCommerce to the newest version. It still works.
I recommend upgrading Umbraco and then upgrade uCommerce to a newer version.
Kind regards
Thomas Arvidsen.
is working on a reply...