Sha256: 98b17a3394feb722454a8f86ac9a3f8bfee0e59c729d2914266f7ada89273e6f

Contents?: true

Size: 538 Bytes

Versions: 43

Compression:

Stored size: 538 Bytes

Contents

module Spree
  module Stock
    module Splitter
      class Backordered < Spree::Stock::Splitter::Base
        def split(packages)
          split_packages = []
          packages.each do |package|
            if package.on_hand.count > 0
              split_packages << build_package(package.on_hand)
            end

            if package.backordered.count > 0
              split_packages << build_package(package.backordered)
            end
          end
          return_next split_packages
        end
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
solidus_core-2.3.0.rc1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.3.0.beta1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.0.2 app/models/spree/stock/splitter/backordered.rb
solidus_core-1.4.1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.2.1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.2.0 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.2.0.rc1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.2.0.beta1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.1.0 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.1.0.rc1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.0.1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.1.0.beta1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.0.0 app/models/spree/stock/splitter/backordered.rb
solidus_core-1.4.0 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.0.0.rc1 app/models/spree/stock/splitter/backordered.rb
solidus_core-1.4.0.rc1 app/models/spree/stock/splitter/backordered.rb
solidus_core-2.0.0.beta1 app/models/spree/stock/splitter/backordered.rb
solidus_core-1.4.0.beta1 app/models/spree/stock/splitter/backordered.rb
solidus_core-1.3.1 app/models/spree/stock/splitter/backordered.rb
solidus_core-1.3.0 app/models/spree/stock/splitter/backordered.rb