item_builder 0.1.22 → 0.1.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5a6934085cfe1926b09fb737c0c0f761cf0bb7859c082f4dc07c2163c560bb9
4
- data.tar.gz: 40a86c7aa4053ffe184fc29985df61c5ba618a5057d2934b71cb7113af3db33f
3
+ metadata.gz: f6780bd1811cc5b5a70e34a875fbecc9f492d82c0755b80465fe06565f7f58ee
4
+ data.tar.gz: 0b45360d1a8651670204a8fa8638ea5454978b90122837d8447f0284ea39fa9a
5
5
  SHA512:
6
- metadata.gz: 9a0c75bd7df65ff8d82b4ec450555bad3bfa52540db1b2b16da9e738d111726c01c3fe0a3fc077f58c33890a9c66a303786b0ec397edf5d6b78fecd2aafbd1e9
7
- data.tar.gz: cf5a9172f95878cf74ae9b71a9f07b0debe08e3286e058a6a80b9fc5ba210a63a971084fb2acd0363a1b73cb510bc182547af0aff20ade9b097ae44d3b9396e9
6
+ metadata.gz: cc7850d78db626648be0b915bf8a8f72d928268892d5360a83b071f65b2e6ba645505fbafae82548da165b0d7ed99f83f1ecdf195cff03c575fa7e4b60d3d7a7
7
+ data.tar.gz: 7cba37504ce2c06fec5d2bc5d9be2e80844629a214c1df12c9996147c4b779947867451d24575a30aea1d4455d7be26c5c118786d4491435f45d9ec544a01530
@@ -78,7 +78,8 @@ class ItemBuilder
78
78
  if @bundle_variants.present?
79
79
  qty_list = []
80
80
  @bundle_variants.each do |bvr|
81
- qty = wh_space.select {|ws| ws.item_variant_id == bvr.variant_id }.first.quantity
81
+ warehouse_space = wh_space.select {|ws| ws.item_variant_id == bvr.variant_id }.first
82
+ qty = warehouse_space.quantity if warehouse_space.present?
82
83
  qty ||= 0
83
84
  qty = qty / bvr.unit
84
85
  qty_list.push(qty)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ItemBuilder
4
- VERSION = '0.1.22'
4
+ VERSION = '0.1.23'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: item_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.22
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - okaaryanata