Sha256: a6c5501b342e03b5c7b5b7899bd6e7be3bfa7fefc7169a7d1f172d015d39e96b

Contents?: true

Size: 550 Bytes

Versions: 9

Compression:

Stored size: 550 Bytes

Contents

module Skr
    module Concerns

        module PT

            module Lines

                def set_ship_qty
                    each{|l| l.qty_to_ship = l.qty }
                end

                def ea_picking_qty
                    if proxy_association.loaded?
                        inject(0){ | sum, ptl | sum+(ptl.qty*ptl.uom_size) unless ptl.is_complete? }
                    else
                        where( is_complete: false ).sum('qty*uom_size')
                    end
                end
            end
        end
    end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
stockor-0.5.0 lib/skr/concerns/pt_extensions.rb
stockor-0.4.0 lib/skr/concerns/pt_extensions.rb
stockor-0.3.0 lib/skr/concerns/pt_extensions.rb
stockor-0.2 lib/skr/concerns/pt_extensions.rb
stockor-0.1.9 lib/skr/concerns/pt_extensions.rb
stockor-0.1.8 lib/skr/concerns/pt_extensions.rb
stockor-0.1.7 lib/skr/concerns/pt_extensions.rb
stockor-0.1.5 lib/skr/concerns/pt_extensions.rb
stockor-core-0.2 lib/skr/concerns/pt_extensions.rb