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

          jonathan Jonathan Reissmueller created issue -
          jonathan Jonathan Reissmueller made changes -
          Field Original Value New Value
          Rank Ranked higher
          jonathan Jonathan Reissmueller made changes -
          Description Service changes that involve both an upgrade/downgrade and a coupon change 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. Service changes that involve both an upgrade/downgrade and a coupon change 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.

          Make sure unit tests still pass
          jonathan Jonathan Reissmueller made changes -
          Fix Version/s 4.2.1 [ 11020 ]
          Automated transition triggered when Jonathan Reissmueller created a branch in Stash -
          Status Open [ 1 ] In Progress [ 3 ]
          tyson Tyson Phillips (Inactive) made changes -
          Summary Upgrades with changing coupons or not properly handled by the pricing presenter Service changes not considering current coupon when changing it
          tyson Tyson Phillips (Inactive) made changes -
          Description Service changes that involve both an upgrade/downgrade and a coupon change 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.

          Make sure unit tests still pass
          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.

          Make sure unit tests still pass
          jonathan Jonathan Reissmueller made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 2 hours, 4 minutes [ 7440 ]
          Worklog Id 10655 [ 10655 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 2 hours, 4 minutes [ 7440 ] 5 hours, 4 minutes [ 18240 ]
          Worklog Id 10657 [ 10657 ]
          tyson Tyson Phillips (Inactive) made changes -
          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.

          Make sure unit tests still pass
          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
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue blocks CORE-2568 [ CORE-2568 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 5 hours, 4 minutes [ 18240 ] 5 hours, 57 minutes [ 21420 ]
          Worklog Id 10658 [ 10658 ]
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 5 hours, 57 minutes [ 21420 ] 6 hours, 55 minutes [ 24900 ]
          Worklog Id 10659 [ 10659 ]
          tyson Tyson Phillips (Inactive) made changes -
          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
          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
          tyson Tyson Phillips (Inactive) made changes -
          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
          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
          tyson Tyson Phillips (Inactive) made changes -
          Time Spent 6 hours, 55 minutes [ 24900 ] 7 hours, 20 minutes [ 26400 ]
          Worklog Id 10662 [ 10662 ]
          tyson Tyson Phillips (Inactive) made changes -
          Fix Version/s 4.3.0-b1 [ 11019 ]
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.3.0 Sprint 1 [ 49 ]
          tyson Tyson Phillips (Inactive) made changes -
          Rank Ranked higher
          jonathan Jonathan Reissmueller made changes -
          Original Estimate 0 minutes [ 0 ]
          Assignee Jonathan Reissmueller [ jonathan ] Tyson Phillips [ tyson ]
          Automated transition triggered when Tyson Phillips (Inactive) created pull request #385 in Stash -
          Status In Progress [ 3 ] In Review [ 5 ]
          Resolution Fixed [ 1 ]
          Automated transition triggered when Tyson Phillips (Inactive) merged pull request #385 in Stash -
          Status In Review [ 5 ] Closed [ 6 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue relates to CORE-2873 [ CORE-2873 ]

            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