Sha256: 93b8d7e48fbdfa4362b12bf4c5e5539b09c4b5c8002d6b2c2283942a5bf72809

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.size > 0
              split_packages << build_package(package.on_hand)
            end

            if package.backordered.size > 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
spree_core-3.2.9 app/models/spree/stock/splitter/backordered.rb
spree_core-3.1.14 app/models/spree/stock/splitter/backordered.rb
spree_core-3.3.6 app/models/spree/stock/splitter/backordered.rb
spree_core-3.2.8 app/models/spree/stock/splitter/backordered.rb
spree_core-3.1.13 app/models/spree/stock/splitter/backordered.rb
spree_core-3.3.5 app/models/spree/stock/splitter/backordered.rb
spree_core-3.3.4 app/models/spree/stock/splitter/backordered.rb
spree_core-3.2.7 app/models/spree/stock/splitter/backordered.rb
spree_core-3.1.12 app/models/spree/stock/splitter/backordered.rb
spree_core-3.3.3 app/models/spree/stock/splitter/backordered.rb
spree_core-3.2.6 app/models/spree/stock/splitter/backordered.rb
spree_core-3.1.11 app/models/spree/stock/splitter/backordered.rb
spree_core-3.1.10 app/models/spree/stock/splitter/backordered.rb
spree_core-3.3.2 app/models/spree/stock/splitter/backordered.rb
spree_core-3.2.5 app/models/spree/stock/splitter/backordered.rb
spree_core-3.1.9 app/models/spree/stock/splitter/backordered.rb
spree_core-3.3.1 app/models/spree/stock/splitter/backordered.rb
spree_core-3.2.4 app/models/spree/stock/splitter/backordered.rb
spree_core-3.1.8 app/models/spree/stock/splitter/backordered.rb
spree_core-3.3.0 app/models/spree/stock/splitter/backordered.rb