Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.3.0
-
Component/s: None
-
Labels:None
Description
Coupons can have "Apply when service is added only" set. When adding a service from the admin UI or the order form, such coupons are not applied unless the service is a one-time service.
- Fix the issue with coupons not applying to new services as described above.
The below is a separate issue altogether.
Coupons can have "Apply when service is added only" set. When upgrading/downgrade a service through the admin interface, however, these coupons should apply a service that has not yet been renewed.
To do this we need to determine whether a service has been renewed. I can think of a number of ways to do this, but they all have problems.
- Check whether date_last_renewed is empty (A prorated service will have this set on creation).
- Check how many invoices there are associated with this service (An admin can create a service without an invoice).
- Check whether the date_renews is the same as the renew date would be when created base on the pricing and date_added (An admin can change the renew date of a service).