You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The admin panel allows you to enter a decimal value when creating an AmountOff Discount with a percentage discount. However, it gets cast to an int in the AmountOff class, which results in the percentage being rounded and the discount amount being slightly off.
You could argue that usually percentage discounts are given as whole numbers, but since the admin panel already supports decimal values, I think this should be changed.
I'll include a PR to address this.
The text was updated successfully, but these errors were encountered:
#2004)
The admin panel allows you to enter a decimal value when creating an
AmountOff Discount with a percentage discount. However, it gets cast to
an int in the AmountOff class, which results in the percentage being
rounded and the discount amount being slightly off.
You could argue that usually percentage discounts are given as whole
numbers, but since the admin panel already supports decimal values, I
think this should be changed.
Fixes#2003
---------
Co-authored-by: tim <tim@direct-effect.nl>
Co-authored-by: Author <actions@github.com>
Co-authored-by: Alec Ritson <hello@itsalec.co.uk>
The admin panel allows you to enter a decimal value when creating an AmountOff Discount with a percentage discount. However, it gets cast to an int in the AmountOff class, which results in the percentage being rounded and the discount amount being slightly off.
You could argue that usually percentage discounts are given as whole numbers, but since the admin panel already supports decimal values, I think this should be changed.
I'll include a PR to address this.
The text was updated successfully, but these errors were encountered: