From 8c9733d8da2c035736e5e79959c23de4fbf232cf Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sat, 6 Mar 2021 16:01:05 +0000 Subject: [PATCH] Remove included tax check from CalculatedAdjustments This is handled in TaxRate now. --- lib/spree/core/calculated_adjustments.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/spree/core/calculated_adjustments.rb b/lib/spree/core/calculated_adjustments.rb index 690dcb19a7..5b45063c3d 100644 --- a/lib/spree/core/calculated_adjustments.rb +++ b/lib/spree/core/calculated_adjustments.rb @@ -36,8 +36,7 @@ module Spree order: order_object_for(adjustable), label: label, mandatory: mandatory, - state: state, - included: tax_included?(self, adjustable) + state: state } if adjustable.respond_to?(:adjustments) @@ -65,15 +64,6 @@ module Spree private - # Used for setting the #included boolean on tax adjustments. This will be removed in a - # later step, as the responsibility for creating all adjustments related to tax will be - # moved into the Spree::TaxRate class. - def tax_included?(originator, target) - originator.is_a?(Spree::TaxRate) && - originator.included_in_price && - originator.default_zone_or_zone_match?(order_object_for(target)) - end - def order_object_for(target) # Temporary method for adjustments transition. if target.is_a? Spree::Order