Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1652

Single-use coupon still appyling to renewing service

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 3.4.3
    • Fix Version/s: 3.5.0-b2
    • Component/s: None
    • Labels:
      None

      Description

      It appears that when a service renews, if it has a coupon assigned to it, that coupon is applied to the service even if the coupon is specified to only be applied when a service is added.

      Looking at the logic, I think this is in Services::buildServiceCouponLineItems:
      if ($coupon_applies && $coupons[$service->coupon_id]->limit_recurring == "1") {

      The above condition checks whether a coupon has recurring limitations to validate, but I don't see anywhere that it determines whether the coupon applies to recurring services, e.g. where
      $coupons[$service->coupon_id]->recurring == "1"

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              tyson Tyson Phillips (Inactive)
              Reporter:
              tyson Tyson Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/15