item_builder_mwh 0.1.34 → 0.1.38

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: 590c9e095a3e20f271a30683c2c6c11201a024c5b17e03dda9c2691b13939d3d
4
- data.tar.gz: 28d7ea34be369d2248aa59c9513e90ccb8c4e967723baf08d65b26f82acfa4dc
3
+ metadata.gz: e3a70af9be3ee6a0b40b11181cf7f3be19c10ff25d9f7806920596c0034d918b
4
+ data.tar.gz: 28362180aaa9597a53541f08a09f1c4f433bbfc29260f8d9a00db8cfb4dadd10
5
5
  SHA512:
6
- metadata.gz: 6f1039e8d235e08659f70c600f87dd9260a643603e8f0d0bf39e4656bf120085084e276093050bc768fe95e599b45a2ee3c77e265aa67e6872897848568db798
7
- data.tar.gz: '09a04734bfdcf9779f7fd84c8d79155a3c4c5058f18fe85a76552678a6980d74610b26719ec47f57f893d1ed4c3c041b822c1f6571d4553ff87d672ee602cc39'
6
+ metadata.gz: 6859b843f9180df483144b6fc3289c5577944c4300a283e140b0ab62428355e6affab794bdb0102ac71eb218a202b7f0e9dc388e4d99aa26996673a7508207eb
7
+ data.tar.gz: 8da46285477aa90c09fc2fa03794ed859b80cb54206648d7b434c5b9119501c54736bb3caa2691c90464a717bd5b87cec9eaf2510e9db6defcd2ca3212f53194
@@ -6,7 +6,7 @@ class ItemBuilderMwh
6
6
  module Quantity
7
7
  class LazadaService < Base
8
8
  def perform
9
- available_quantity + local_qty
9
+ available_quantity
10
10
  end
11
11
  end
12
12
  end
@@ -101,6 +101,7 @@ class ItemBuilderMwh
101
101
  .joins('JOIN warehouses ON
102
102
  warehouse_spaces.warehouse_id = warehouses.id')
103
103
  .where("warehouse_mappings.profile_channel_association_id=#{pca}")
104
+ .where('warehouse_mappings.deleted_at is NULL')
104
105
  .where("warehouse_spaces.item_variant_id=#{variant_id}")
105
106
  .where('warehouses.consignment = 0')
106
107
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ItemBuilderMwh
4
- VERSION = '0.1.34'
4
+ VERSION = '0.1.38'
5
5
  end
@@ -89,7 +89,7 @@ class ItemBuilderMwh
89
89
  def existing_alloc_stocks
90
90
  @existing_alloc_stocks ||= VariantListingStockAllocation.where(
91
91
  variant_association_id: vl_ids
92
- ).where('ADDTIME(end_at, "07:00") >= NOW()')
92
+ ).where('end_at >= NOW()')
93
93
  end
94
94
 
95
95
  def vl_ids
@@ -121,7 +121,7 @@ class ItemBuilderMwh
121
121
  end
122
122
 
123
123
  def wh_spaces
124
- @wh_spaces ||= WarehouseSpace.where(item_variant_id: variant_ids)
124
+ @wh_spaces ||= WarehouseSpace.where(item_variant_id: variant_ids).where.not(warehouse_id: nil)
125
125
  end
126
126
 
127
127
  def variants
@@ -155,9 +155,7 @@ class ItemBuilderMwh
155
155
  end
156
156
 
157
157
  def lazada_quantity
158
- @lazada_quantity ||= ItemBuilderMwh::LazadaQuantityService.new(
159
- listings: listings, skus: skus
160
- ).perform
158
+ @lazada_quantity ||= nil
161
159
  end
162
160
 
163
161
  def order_host
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.34
4
+ version: 0.1.38
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-11-12 00:00:00.000000000 Z
11
+ date: 2022-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler