Skip to content

Commit 16e6542

Browse files
committed
Revert "Set base_total_value and total_value on DiscountSet event"
This reverts commit 6bb3136.
1 parent 54694e9 commit 16e6542

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

ecommerce/pricing/lib/pricing/offer.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ def apply_discount(discount)
5151
data: {
5252
order_id: @id,
5353
type: discount.type,
54-
amount: discount.value,
55-
base_total_value: @list.base_sum,
56-
total_value: @list.actual_sum - @list.actual_sum * (discount.value / 100)
54+
amount: discount.value
5755
}
5856
)
5957
end

ecommerce/pricing/test/three_plus_one_test.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,7 @@ def test_given_3_plus_one__when_10_percent_discount_for_offer__then_offer_price_
260260
data: {
261261
order_id: order_id,
262262
type: Discounts::GENERAL_DISCOUNT,
263-
amount: 10,
264-
base_total_value: 80,
265-
total_value: 54
263+
amount: 10
266264
}
267265
),
268266
OrderTotalValueCalculated.new(

0 commit comments

Comments
 (0)