item_builder_mwh 0.1.24 → 0.1.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/item_builder_mwh/get_quantity_service.rb +9 -1
- data/lib/item_builder_mwh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c9c6c65d5fee047753d199f8c7bd84fb8728e1c4b2663f6b51f4739cf00cb60
|
4
|
+
data.tar.gz: dd63fdff719a3efd3a6ddc2de281932dca87456811fb81b90300154eabd7f20e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e56af16e87e30221e3941dc4e2219dd371718176fac6b6d81b713403aed250b5d1b78cc6e9f8e9b7955c09a0f5c7c550f038163955c213bb3098a1e804ed2ea0
|
7
|
+
data.tar.gz: a174536640d9d9c52b6f5611f1751337578af9b53648146e5c8652eed697458ff03f7704ffe12cbc36ace789df14b076ec292bbc1e192466572c01f25198413c
|
@@ -79,10 +79,18 @@ class ItemBuilderMwh
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def listing_warehouse_routing_quantity
|
82
|
-
warehouse_spaces = WarehouseSpace.where(item_variant_id: variant.id)
|
82
|
+
warehouse_spaces = WarehouseSpace.where(item_variant_id: variant.id, warehouse_id: wh_ids)
|
83
83
|
warehouse_spaces.sum(:quantity)
|
84
84
|
end
|
85
85
|
|
86
|
+
def wh_mappings
|
87
|
+
WarehouseMapping.where(profile_channel_association_id: listing.profile_channel_association_id)
|
88
|
+
end
|
89
|
+
|
90
|
+
def wh_ids
|
91
|
+
@wh_ids ||= wh_mappings.map{|x|x.warehouse_id}.flatten.uniq
|
92
|
+
end
|
93
|
+
|
86
94
|
def qty_bundle
|
87
95
|
# Quantity for bundle config
|
88
96
|
if @bundle_variants.present?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: item_builder_mwh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Ivander
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|