spree_core 3.2.2 → 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/spree/adjustment_source.rb +1 -1
- data/app/models/spree/order.rb +4 -7
- data/app/models/spree/order/payments.rb +1 -1
- data/app/views/spree/order_mailer/cancel_email.text.erb +2 -2
- data/app/views/spree/order_mailer/confirm_email.text.erb +2 -2
- data/config/locales/en.yml +6 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/localized_number.rb +3 -0
- data/spree_core.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 144d7de948f95e01bbb75ffde51126bc6984b06b
|
4
|
+
data.tar.gz: 9e6d276d6f1c6200e20fb4756e5988fc8ad3053a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9b32122a06dd3ffb391b85540d7709ec07584818a861f56c7b06cdcb4f59b15497cf5d11219c27160c69bbb436c7be6e47cc6adb412d479431a08c10121c1b1
|
7
|
+
data.tar.gz: 736fe659b598549cdc0ad8ab88e23dd17a9508a9c26e4199e18b2fc7385312b0eca4ebd0c882e1fbcc96241d351829808a3fc1da2e21c5526fa424baeb20464b
|
data/app/models/spree/order.rb
CHANGED
@@ -323,13 +323,10 @@ module Spree
|
|
323
323
|
def outstanding_balance
|
324
324
|
if canceled?
|
325
325
|
-1 * payment_total
|
326
|
-
elsif
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
# If reimbursement has happened add it back to total to prevent balance_due payment state
|
331
|
-
# See: https://github.com/spree/spree/issues/6229
|
332
|
-
total - (payment_total + reimbursed)
|
326
|
+
elsif refunds.exists?
|
327
|
+
# If refund has happened add it back to total to prevent balance_due payment state
|
328
|
+
# See: https://github.com/spree/spree/issues/6229 & https://github.com/spree/spree/issues/8136
|
329
|
+
total - (payment_total + refunds.sum(:amount))
|
333
330
|
else
|
334
331
|
total - payment_total
|
335
332
|
end
|
@@ -9,8 +9,8 @@
|
|
9
9
|
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) <%= Spree.t('at_symbol') %> <%= item.single_money %> = <%= item.display_amount %>
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
|
-
<%= Spree.t('order_mailer.
|
12
|
+
<%= Spree.t('order_mailer.subtotal') %> <%= @order.display_item_total %>
|
13
13
|
<% @order.adjustments.eligible.each do |adjustment| %>
|
14
14
|
<%= raw(adjustment.label) %> <%= adjustment.display_amount %>
|
15
15
|
<% end %>
|
16
|
-
<%= Spree.t('order_mailer.
|
16
|
+
<%= Spree.t('order_mailer.total') %> <%= @order.display_total %>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) <%= Spree.t('at_symbol') %> <%= item.single_money %> = <%= item.display_amount %>
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
|
-
<%= Spree.t('order_mailer.
|
12
|
+
<%= Spree.t('order_mailer.subtotal') %> <%= @order.display_item_total %>
|
13
13
|
<% if @order.line_item_adjustments.exists? %>
|
14
14
|
<% if @order.all_adjustments.promotion.eligible.exists? %>
|
15
15
|
<% @order.all_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
|
@@ -33,6 +33,6 @@
|
|
33
33
|
<%= adjustment.label %> <%= adjustment.display_amount %>
|
34
34
|
<% end %>
|
35
35
|
============================================================
|
36
|
-
<%= Spree.t('order_mailer.
|
36
|
+
<%= Spree.t('order_mailer.total') %> <%= @order.display_total %>
|
37
37
|
|
38
38
|
<%= Spree.t('order_mailer.confirm_email.thanks') %>
|
data/config/locales/en.yml
CHANGED
@@ -96,8 +96,10 @@ en:
|
|
96
96
|
path: Path
|
97
97
|
starts_at: Starts At
|
98
98
|
usage_limit: Usage Limit
|
99
|
+
promotion_category: Promotion Category
|
99
100
|
spree/promotion_category:
|
100
101
|
name: Name
|
102
|
+
code: Code
|
101
103
|
spree/property:
|
102
104
|
name: Name
|
103
105
|
presentation: Presentation
|
@@ -476,6 +478,8 @@ en:
|
|
476
478
|
taxonomies: Taxonomies
|
477
479
|
taxons: Taxons
|
478
480
|
users: Users
|
481
|
+
return_authorizations: Return Authorizations
|
482
|
+
customer_returns: Customer Returns
|
479
483
|
order:
|
480
484
|
events:
|
481
485
|
approve: approve
|
@@ -715,6 +719,7 @@ en:
|
|
715
719
|
error: error
|
716
720
|
errors:
|
717
721
|
messages:
|
722
|
+
blank: can't be blank
|
718
723
|
could_not_create_taxon: Could not create taxon
|
719
724
|
no_shipping_methods_available: No shipping methods available for selected location, please change your address and try again.
|
720
725
|
errors_prohibited_this_record_from_being_saved:
|
@@ -1027,6 +1032,7 @@ en:
|
|
1027
1032
|
payment_processor_choose_banner_text: If you need help choosing a payment processor, please visit
|
1028
1033
|
payment_processor_choose_link: our payments page
|
1029
1034
|
payment_state: Payment State
|
1035
|
+
payment_identifier: Payment Identifier
|
1030
1036
|
payment_states:
|
1031
1037
|
balance_due: balance due
|
1032
1038
|
checkout: checkout
|
@@ -1154,7 +1160,6 @@ en:
|
|
1154
1160
|
reference: Reference
|
1155
1161
|
reference_contains: Reference Contains
|
1156
1162
|
refund: Refund
|
1157
|
-
refund_amount_must_be_greater_than_zero: Refund amount must be greater than zero
|
1158
1163
|
refund_reasons: Refund Reasons
|
1159
1164
|
refunded_amount: Refunded Amount
|
1160
1165
|
refunds: Refunds
|
data/lib/spree/core/version.rb
CHANGED
@@ -15,6 +15,9 @@ module Spree
|
|
15
15
|
# then replace the locale-specific decimal separator with the standard separator if necessary
|
16
16
|
number.gsub!(separator, '.') unless separator == '.'
|
17
17
|
|
18
|
+
# Returns 0 to avoid ArgumentError: invalid value for BigDecimal(): "" for empty string
|
19
|
+
return 0 unless number.present?
|
20
|
+
|
18
21
|
number.to_d
|
19
22
|
end
|
20
23
|
|
data/spree_core.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
s.add_dependency 'rails', '~> 5.0.0'
|
39
39
|
s.add_dependency 'ransack', '~> 1.8.0'
|
40
40
|
s.add_dependency 'responders'
|
41
|
-
s.add_dependency 'state_machines-activerecord', '~> 0.
|
41
|
+
s.add_dependency 'state_machines-activerecord', '~> 0.5'
|
42
42
|
s.add_dependency 'stringex'
|
43
43
|
s.add_dependency 'twitter_cldr', '~> 3.0'
|
44
44
|
s.add_dependency 'sprockets-rails'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|
@@ -282,14 +282,14 @@ dependencies:
|
|
282
282
|
requirements:
|
283
283
|
- - "~>"
|
284
284
|
- !ruby/object:Gem::Version
|
285
|
-
version: '0.
|
285
|
+
version: '0.5'
|
286
286
|
type: :runtime
|
287
287
|
prerelease: false
|
288
288
|
version_requirements: !ruby/object:Gem::Requirement
|
289
289
|
requirements:
|
290
290
|
- - "~>"
|
291
291
|
- !ruby/object:Gem::Version
|
292
|
-
version: '0.
|
292
|
+
version: '0.5'
|
293
293
|
- !ruby/object:Gem::Dependency
|
294
294
|
name: stringex
|
295
295
|
requirement: !ruby/object:Gem::Requirement
|