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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d975632768624c47af1a7d806b1450a768b778799578fab4cc0fc4d2baf20dc2
|
4
|
+
data.tar.gz: eceaff649dd082013ab32c9aa7066b9990cbea607e43d2560ac1b8dff3bbbd9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 %>
|
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
|
9
|
-
<tr><td><%= Spree.t(:active_to) %></td><td><%= I18n.l
|
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>
|
data/lib/spree_price/version.rb
CHANGED