Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def compute(return_item)
private

def weighted_order_adjustment_amount(inventory_unit)
inventory_unit.order.adjustments.eligible.non_tax.sum(:amount) * percentage_of_order_total(inventory_unit)
inventory_unit.order.adjustments.non_tax.sum(:amount) * percentage_of_order_total(inventory_unit)
end

def weighted_line_item_amount(inventory_unit)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

module SolidusLegacyPromotions
module SpreeCalculatorReturnsDefaultRefundAmountDecorator
private

def weighted_order_adjustment_amount(inventory_unit)
inventory_unit.order.adjustments.eligible.non_tax.sum(:amount) * percentage_of_order_total(inventory_unit)
end

Spree::Calculator::Returns::DefaultRefundAmount.prepend self
end
end