spree_core 4.1.10 → 4.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6076d4a3647fbf0b2a1a72578b5cd9336181f4b50c40bda5f7dcffab9806e4a
4
- data.tar.gz: 663b00f1b45448020c4274925264c31ef11363fc6bd4561db5eff1f8897c4b5f
3
+ metadata.gz: 0012b8b02d8d9264ec0b3c586fff55a488e67a71df90f895327fcd4bd01c3fef
4
+ data.tar.gz: e8b4b78b93b46293ce4ec9799134c8f81d40bb8bf3d75dd71e3fba1d44c959c5
5
5
  SHA512:
6
- metadata.gz: 235b59d743b4d580fe4b9e2a16d082a39285bccbee99f9fea6615c65e0e760a9134a0267ed9def3d9bac5fa76974416127dbdaeeac52865b8578b6926a5d2c65
7
- data.tar.gz: 2bdc502c7b9134df69893818a1e230bd546ff895f8d0733e4ff380dbb2a8c4be9eccfe0acc356c8e618ad2d75d75f74228955af8961231617e00e0ec19e6ec27
6
+ metadata.gz: 8a4c7a0e1fd8a7e8a440ed1f22667db0b134e48edd8650de2ec23ab454a58d898e852293e97ef7d1581bd101226e175b427de54b37346eab9203b33415ef80ba
7
+ data.tar.gz: 8376e929ec04606867a8d7655797effe8704cb6deff3cf62410d82af87ab7b67f68e620395312379c754691f1aca9be41ad119cbe474c2a11433db8cdf70f1be
@@ -66,7 +66,8 @@ module Spree
66
66
 
67
67
  extend DisplayMoney
68
68
  money_methods :amount, :subtotal, :discounted_amount, :final_amount, :total, :price,
69
- :adjustment_total, :additional_tax_total, :promo_total, :included_tax_total
69
+ :adjustment_total, :additional_tax_total, :promo_total, :included_tax_total,
70
+ :pre_tax_amount
70
71
 
71
72
  alias single_money display_price
72
73
  alias single_display_amount display_price
@@ -22,7 +22,7 @@ module Spree
22
22
  money_methods :outstanding_balance, :item_total, :adjustment_total,
23
23
  :included_tax_total, :additional_tax_total, :tax_total,
24
24
  :shipment_total, :promo_total, :total,
25
- :cart_promo_total
25
+ :cart_promo_total, :pre_tax_item_amount, :pre_tax_total
26
26
 
27
27
  alias display_ship_total display_shipment_total
28
28
  alias_attribute :ship_total, :shipment_total
@@ -174,7 +174,12 @@ module Spree
174
174
 
175
175
  # Sum of all line item amounts pre-tax
176
176
  def pre_tax_item_amount
177
- line_items.to_a.sum(&:pre_tax_amount)
177
+ line_items.sum(:pre_tax_amount)
178
+ end
179
+
180
+ # Sum of all line item and shipment pre-tax
181
+ def pre_tax_total
182
+ pre_tax_item_amount + shipments.sum(:pre_tax_amount)
178
183
  end
179
184
 
180
185
  def shipping_discount
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- '4.1.10'
3
+ '4.1.11'
4
4
  end
5
5
  end
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: 4.1.10
4
+ version: 4.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-23 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -1089,10 +1089,10 @@ licenses:
1089
1089
  - BSD-3-Clause
1090
1090
  metadata:
1091
1091
  bug_tracker_uri: https://github.com/spree/spree/issues
1092
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.10
1092
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.11
1093
1093
  documentation_uri: https://guides.spreecommerce.org/
1094
- source_code_uri: https://github.com/spree/spree/tree/v4.1.10
1095
- post_install_message:
1094
+ source_code_uri: https://github.com/spree/spree/tree/v4.1.11
1095
+ post_install_message:
1096
1096
  rdoc_options: []
1097
1097
  require_paths:
1098
1098
  - lib
@@ -1108,7 +1108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1108
1108
  version: 1.8.23
1109
1109
  requirements: []
1110
1110
  rubygems_version: 3.1.2
1111
- signing_key:
1111
+ signing_key:
1112
1112
  specification_version: 4
1113
1113
  summary: The bare bones necessary for Spree.
1114
1114
  test_files: []