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

Service changes not considering current coupon when changing it

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.1, 4.3.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      Service changes that involve both an upgrade/downgrade and a coupon change simultaneously are calculated incorrectly by the pricing presenter because it applies the old coupon to both the old service state and the new service state. The presenter should be updated to apply the old coupon to the old service state and the new coupon to the new service state.

      • Items with differing coupons cannot be merged because they will result in inaccurate pricing calculations since we cannot infer a single unit price and apply multiple coupons (i.e. the old coupon and the new coupon) to that price
      • Items with coupons where one of the coupons is of the 'amount' type cannot be merged because an amount discount is not distributive like a percentage discount and would not arrive at the same price when merged

      Example:
      Old Service
      Price $100
      Discount 10%

      New Service
      Price $150
      Discount 20%

      Assuming the service change occurs for the entire term, the entire old service cost should be removed and the entire new service cost should be added, i.e.:
      Remove $90 ($100 * (1 - 0.1))
      Add $120 ($150 * (1 - 0.2))
      Cost is $30

      Line items:

      Item Price
      Remove Old Service -$100
      Add New Service $150
      Remove Old Discount 10% $10
      Add New Discount 20% -$30

      Total: $30

        Issue Links

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                4/Jan/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 7 hours, 20 minutes
                7h 20m

                  Agile