valken-shipping 3.0.0.pre → 3.0.0

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: 146a3ad0dd1b020312bcf880257b2d080cadd3bdfcb6205c1a63a79247ea080f
4
- data.tar.gz: 02edb837e0c27d4fba3ebce3f2e9545dd896c67f11dd00c865768144147977ea
3
+ metadata.gz: 004ef84a23ea388e41114af37b510e1a2cbfb13f7fb8df36754be594a9dac89f
4
+ data.tar.gz: eb98164b589a99282b5b60e4cc628b84f541582e452e426ad1f2878861ac6fe6
5
5
  SHA512:
6
- metadata.gz: ff8e88fc94268f6ea84ff2eb1d0d01ca4ea0f39609f92492feec006a9a01ea1e3fe9f2b4aaf50afa59badb0d1c9df3501f98bd468302c6b43be4e5a3065d90a7
7
- data.tar.gz: 67a511096848ef71c7a422d56342e63908f118b20f71ed5dc0196156c68355e2d8e3e537f36d13368c272920fb50c3f7dcfb8cf6fc82a6fd343fc8c4d678f64a
6
+ metadata.gz: ad6c0aa41e4e9ddabb088d4f83ce039b2c301d6ba3192b511cd1d99f8390d486b47ce1e3c8da93b2d26ba9f014334812910f4429e64eb10e07934674dd7f0711
7
+ data.tar.gz: 3a920f017dba407a3439cbf699675d020dc3d46df26b22a3c39cf84ab60fe6352ba6e00b959bfb048af0149beb9f03428c4af2ed8d76b41376b478d2874ac69b
@@ -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 || 0) : (sku_data.weight || 0)
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
 
@@ -1,5 +1,5 @@
1
1
  .property
2
- = label_tag 'service_description', "Carrier Name", class: 'property__name'
2
+ = label_tag 'service_carrier', "Carrier Name", class: 'property__name'
3
3
  = text_field_tag "service[carrier]", @service.carrier, class: 'text-box'
4
4
  .property
5
5
  = label_tag 'service_description', "Description", class: 'property__name'
@@ -61,13 +61,14 @@
61
61
  %td= text_field_tag "rates[#{rate.id}][tier_weight_max]", rate.tier_weight_max, class: 'text-box'
62
62
  %td= text_field_tag "rates[#{rate.id}][tier_min]", rate.tier_min, class: 'text-box'
63
63
  %td= text_field_tag "rates[#{rate.id}][tier_max]", rate.tier_max, class: 'text-box'
64
- %td= check_box_tag 'rates_to_remove[]', rate.id
64
+ %td= check_box_tag 'rates_to_remove[]', rate.id, false, id: nil
65
+
65
66
  %tr{ data: { cloneable_row: '' } }
66
67
  %td= text_field_tag 'new_rates[][price]', '', placeholder: 'New Price Tier', class: 'text-box'
67
68
  %td= text_field_tag 'new_rates[][tier_weight_min]', '', placeholder: 'Min Weight Value', class: 'text-box'
68
69
  %td= text_field_tag 'new_rates[][tier_weight_max]', '', placeholder: 'Max Weight Value', class: 'text-box'
69
70
  %td= text_field_tag 'new_rates[][tier_min]', '', placeholder: 'Min Value', class: 'text-box'
70
- %td= text_field_tag 'new_rates[][tier_min]', '', placeholder: 'Min Value', class: 'text-box'
71
+ %td= text_field_tag 'new_rates[][tier_max]', '', placeholder: 'Min Value', class: 'text-box'
71
72
  %td
72
73
 
73
74
  .workflow-bar
@@ -1,5 +1,5 @@
1
1
  module Valken
2
2
  module Shipping
3
- VERSION = '3.0.0.pre'
3
+ VERSION = '3.0.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valken-shipping
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sushmitha02
@@ -76,9 +76,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ">"
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: 1.3.1
81
+ version: '0'
82
82
  requirements: []
83
83
  rubygems_version: 3.0.3
84
84
  signing_key: