Describe the bug
When adding coupons in admin panel, it is possible to insert and enable the coupon that has more than 100% discount of whole order value, resulting in shop 'paying the customer for their purchase'.
To Reproduce
Steps to reproduce the behavior:
- Go to 'admin' panel
- Click on 'coupons' under 'promotion'
- Click on the green 'New coupon' button
- In the window that appears, insert more than 100 units value in the 'Discount amount' box
- In the 'Discount Type' selective menu, select 'percentage discount to entire order'
- Coupon is added and active to use
Expected behavior
When selecting 'percentage discount to entire order', a limit on the page should be set to deny adding coupons with more
then 100% discount percentage rate
Screenshots


Background (please complete the following information):
- NodeJS 20.10.0
- Postgres 13.12
- ShopMost 1.0.1
- OS: Fedora
- Browser: Mozilla Firefox
Describe the bug
When adding coupons in admin panel, it is possible to insert and enable the coupon that has more than 100% discount of whole order value, resulting in shop 'paying the customer for their purchase'.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When selecting 'percentage discount to entire order', a limit on the page should be set to deny adding coupons with more
then 100% discount percentage rate
Screenshots


Background (please complete the following information):