lunarphp/lunar

AmountOff percentage is cast to an int, even though it could contain a decimal value

tvlokven opened this issue · 0 comments

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.