valken-shipping 3.0.0.pre → 3.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/workarea/packaging.decorator +4 -2
- data/lib/valken/shipping/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1513e4c5c0a38b69af9f422bb6312fe996faa0928dd089d42c7288a31887a28
|
4
|
+
data.tar.gz: 1af97c1da52c7408dfbe7289a4d5754f5fb41ad4c2ead8ddc76049812f26a6ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d8150fc9f6cf02f0046882a65d5bdd07a5f375245834ae6474493bcfee8611f10dfff7e9a438cccc17860e897171b2046120f09aa4a97b4c337678438f5bbe7
|
7
|
+
data.tar.gz: 83c7a5f7e96bc89543c3a73552f2d20841b78e76d380f65f0d72e1b4cf963b20bfbb1b39d1a7149418506f67e0df5bc1ed712add24ba5ca4224cef47c88d327a
|
@@ -14,7 +14,9 @@ module Workarea
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def no_of_packs
|
17
|
-
(total_weight_lb / Workarea.config.max_weight_per_pack).ceil
|
17
|
+
packs_count = (total_weight_lb / Workarea.config.max_weight_per_pack).ceil
|
18
|
+
|
19
|
+
return packs_count == 0 ? 1 : packs_count
|
18
20
|
end
|
19
21
|
|
20
22
|
def find_shipping_sku(sku)
|
@@ -24,7 +26,7 @@ module Workarea
|
|
24
26
|
def find_sku_weight(sku)
|
25
27
|
product_by_sku = Catalog::Product.find_by_sku(sku).variants
|
26
28
|
sku_data = product_by_sku.detect {|variant| variant.sku == sku }
|
27
|
-
sku_weight = is_pounds(sku_data) ? convert_to_oz(sku_data.weight ||
|
29
|
+
sku_weight = is_pounds(sku_data) ? convert_to_oz(sku_data.weight || 1) : (sku_data.weight || 1)
|
28
30
|
sku_weight
|
29
31
|
end
|
30
32
|
|