Skip to content
Merged
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
10 changes: 3 additions & 7 deletions core/app/models/spree/tax_rate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,9 @@ def adjust(order_tax_zone, item)

# This method is used by Adjustment#update to recalculate the cost.
def compute_amount(item)
if included_in_price
if default_zone_or_zone_match?(item.order.tax_zone)
calculator.compute(item)
else
# In this case, it's a refund.
calculator.compute(item) * - 1
end
if included_in_price && !default_zone_or_zone_match?(item.order.tax_zone)
# In this case, it's a refund.
calculator.compute(item) * - 1
else
calculator.compute(item)
end
Expand Down