Sha256: 2ef8e5be1cd2ce0a435f3fe8fdb30cb2783fdbe0fa079ac3631f7b0b4aa4c96c

Contents?: true

Size: 384 Bytes

Versions: 36

Compression:

Stored size: 384 Bytes

Contents

# frozen_string_literal: true

module Spree
  module Tax
    module TaxHelpers
      private

      def rates_for_item(item)
        @rates_for_item ||= Spree::TaxRate.item_level.for_address(item.order.tax_address)

        @rates_for_item.select do |rate|
          rate.active? && rate.tax_categories.map(&:id).include?(item.tax_category_id)
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
solidus_core-4.4.2 app/models/spree/tax/tax_helpers.rb
solidus_core-4.4.1 app/models/spree/tax/tax_helpers.rb
solidus_core-4.4.0 app/models/spree/tax/tax_helpers.rb
solidus_core-4.3.4 app/models/spree/tax/tax_helpers.rb
solidus_core-4.2.4 app/models/spree/tax/tax_helpers.rb
solidus_core-4.1.5 app/models/spree/tax/tax_helpers.rb
solidus_core-4.3.3 app/models/spree/tax/tax_helpers.rb
solidus_core-4.3.2 app/models/spree/tax/tax_helpers.rb
solidus_core-4.1.4 app/models/spree/tax/tax_helpers.rb
solidus_core-4.3.1 app/models/spree/tax/tax_helpers.rb
solidus_core-4.3.0 app/models/spree/tax/tax_helpers.rb
solidus_core-4.2.3 app/models/spree/tax/tax_helpers.rb
solidus_core-4.1.3 app/models/spree/tax/tax_helpers.rb
solidus_core-4.0.4 app/models/spree/tax/tax_helpers.rb
solidus_core-3.4.6 app/models/spree/tax/tax_helpers.rb
solidus_core-4.0.3 app/models/spree/tax/tax_helpers.rb
solidus_core-4.1.2 app/models/spree/tax/tax_helpers.rb
solidus_core-4.2.2 app/models/spree/tax/tax_helpers.rb
solidus_core-3.4.5 app/models/spree/tax/tax_helpers.rb
solidus_core-4.2.1 app/models/spree/tax/tax_helpers.rb