Sha256: abb2226db63ef20e46491e50f9d11ffc64d68d9ab3435a3a97252fc0af9884e0

Contents?: true

Size: 447 Bytes

Versions: 118

Compression:

Stored size: 447 Bytes

Contents

module Spree
  class ReturnItem::EligibilityValidator::InventoryShipped < Spree::ReturnItem::EligibilityValidator::BaseValidator
    def eligible_for_return?
      if @return_item.inventory_unit.shipped?
        return true
      else
        add_error(:inventory_unit_shipped, Spree.t('return_item_inventory_unit_ineligible'))
        return false
      end
    end

    def requires_manual_intervention?
      @errors.present?
    end
  end
end

Version data entries

118 entries across 118 versions & 2 rubygems

Version Path
spree_core-3.2.9 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.1.14 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.3.6 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.2.8 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.1.13 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.3.5 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.3.4 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.2.7 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.1.12 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
solidus_core-2.3.1 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
solidus_core-2.2.2 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
solidus_core-2.1.1 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
solidus_core-2.0.3 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
solidus_core-1.4.2 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
solidus_core-1.3.2 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
solidus_core-1.2.3 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
solidus_core-1.1.4 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
solidus_core-1.0.7 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.3.3 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb
spree_core-3.2.6 app/models/spree/return_item/eligibility_validator/inventory_shipped.rb