erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

fix: coupon code validation logic

Open bhavesh95863 opened this issue 4 months ago • 3 comments

Ensure errors are thrown if the coupon validity hasn't started, has expired, or if the maximum usage has been exceeded.

Previously, the condition was always satisfied with if coupon.valid_from:, which prevented the elif condition from being reached.

bhavesh95863 avatar Oct 11 '24 20:10 bhavesh95863