spree_price 3.1.9 → 3.1.12

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: 0e7c9e9826f085ba64077993f1e7fc6ebd22a394e22f34d74015dd2615859075
4
- data.tar.gz: ea3f831bdf357079452eb416ec4637de452d26554cd53a8aad5c6109186491da
3
+ metadata.gz: d975632768624c47af1a7d806b1450a768b778799578fab4cc0fc4d2baf20dc2
4
+ data.tar.gz: eceaff649dd082013ab32c9aa7066b9990cbea607e43d2560ac1b8dff3bbbd9a
5
5
  SHA512:
6
- metadata.gz: 6caff35150f264472afebc1da992892b155d1b98acb2e20fabcd1d0e9edcd1ab24023ba2b4e1ac2006888867eff7f72e06173982bf19f41317fbdda8967389be
7
- data.tar.gz: c4205773287dcbeac33dc0cb8b6d9230fb9852476546d8234016712bca56c819306ad487b7a7e7811bad62d6b3ce96ef2bdb754f9027226a9e9d7c81ff8f294e
6
+ metadata.gz: b864514c1887280da081dbd8cbc3501b6a0472d5efa6a1951bc4cb3526721a0d07f202d3f74ab7ad14291fdc770d3ae56e74f587fb84c1f079d05ac8a1a72428
7
+ data.tar.gz: 3e64a847c2d4745c03b04a662050079331fddbb5c982d5286811d7123e87fd7b24d9efa1e2b189ff067df6f74103024a1f227a85c8fdee1835e5df7713b1b822
@@ -21,7 +21,7 @@ Spree::LineItem.class_eval do
21
21
  line_item_price = line_item_prices.find do |line_item_price|
22
22
  line_item_price.price_type_id == price_type.id
23
23
  end
24
- line_item_price || line_item_prices.build({ price_type_id: price_type.id })
24
+ line_item_price || line_item_prices.build({ price_type_id: price_type.id, amount: variant_price_by_price_type(price_type) })
25
25
  end
26
26
 
27
27
  def default_line_item_price
@@ -24,7 +24,7 @@ Spree::Variant.class_eval do
24
24
  )
25
25
  price_book_price = price_in_price_book(currency, store, roles, price_type)
26
26
 
27
- logger.warn("Variant #{sku} price cannot be found in store #{store.try(:code)} "\
27
+ logger.warn("Variant #{sku} price #{price_type.try(:name)} cannot be found in store #{store.try(:code)} "\
28
28
  "in #{currency} with roles #{roles.try(:compact).try(:flat_map, &:name)}") if price_book_price.nil?
29
29
 
30
30
  price_book_price ||
@@ -42,7 +42,7 @@
42
42
 
43
43
  <div class="col-md-6">
44
44
  <%= f.field_container :active_to do %>
45
- <%= f.label :active_to %> <span class="required">*</span><br />
45
+ <%= f.label :active_to %>
46
46
  <%= f.text_field :active_to, class: 'form-control datepicker datepicker-to' %>
47
47
  <%= f.error_message_on :active_to %>
48
48
  <% end %>
@@ -5,8 +5,8 @@
5
5
  </colgroup>
6
6
  <tbody>
7
7
  <tr><td><%= Spree.t(:currency) %></td><td><%= price_book.currency %></td></tr>
8
- <tr><td><%= Spree.t(:active_from) %></td><td><%= I18n.l price_book.active_from %></td></tr>
9
- <tr><td><%= Spree.t(:active_to) %></td><td><%= I18n.l price_book.active_to %></td></tr>
8
+ <tr><td><%= Spree.t(:active_from) %></td><td><%= price_book.active_from ? I18n.l(price_book.active_from) : '--' %></td></tr>
9
+ <tr><td><%= Spree.t(:active_to) %></td><td><%= price_book.active_to ? I18n.l(price_book.active_to) : '--' %></td></tr>
10
10
  <tr><td><%= Spree.t(:price_adjustment_factor) %></td><td><%= price_book.price_adjustment_factor %></td></tr>
11
11
  <tr><td><%= Spree.t(:parent) %></td><td><%= price_book.parent.try(:name) || '--' %></td></tr>
12
12
  <tr><td><%= Spree.t(:price_type) %></td><td><%= price_book.price_type.try(:name) %></td></tr>
@@ -10,7 +10,7 @@ module SpreePrice
10
10
  module VERSION
11
11
  MAJOR = 3
12
12
  MINOR = 1
13
- TINY = 9
13
+ TINY = 12
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_price
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.9
4
+ version: 3.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Wong