spree_core 5.2.2 → 5.2.3

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: 40e658898150457b9405d6d68e58d78c1b31b23518e2ffdb6829d3bfb0d68a90
4
- data.tar.gz: e36b7e5d2e39426e2ea9cb4078625f72c36ed58e626959b277174f7f033bdd1f
3
+ metadata.gz: 92beba989ce9cb710594c81743585143d23519b30406146a6fd0c17d792ab4a3
4
+ data.tar.gz: 7389b6c100d69785017e5924ef6d600cc3d266b0c022da4b35f002cfb54d7872
5
5
  SHA512:
6
- metadata.gz: f01a4d3e5245986e4a851dc51fb18103405cf2fab2669a43d504c922a5e7284739a23f6cd17da01276a6ab9a71b4c9589667a4bd7e3373d2c83a9508ea9b87e4
7
- data.tar.gz: 1be2f451d4c370d7c72eee740dfce1536308d61ad7f16c114a7db2eb2462401150ca874b56cda455645abccdc65e9bc97e5810ef82dac16a263ed64ea584c7f7
6
+ metadata.gz: 92d2afee02b65b1ebcd35092eea9d57af361881100d9d43402a9956b8bb10091a2b444b102634b1a4d278ea6f4e8ae10ca7107654f58841908c4732d21bf1b2b
7
+ data.tar.gz: 4dc73e2e8654d3c0ee10bb6aa06d5507ef747b297cf5e2a96c78b38a6a5d3e8f36ec582531be5741cedd5a5402173342e8b7c9d47951cf816431e6be0916b67f
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
2
+ <path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0 1 15.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 0 1 3 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 0 0-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 0 1-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 0 0 3 15h-.75M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm3 0h.008v.008H18V10.5Zm-12 0h.008v.008H6V10.5Z" />
3
+ </svg>
@@ -0,0 +1,22 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" id="katman_1" x="0px" y="0px" style="enable-background:new 0 0 1190.55 841.89;" xml:space="preserve" viewBox="238.65 160 712.7 521">
2
+ <style type="text/css">
3
+ .st0{fill:#26367D;}
4
+ .st1{clip-path:url(#SVGID_00000165933728503162618370000013584018841918814628_);}
5
+ .st2{fill:#FFFFFF;}
6
+ .st3{fill:#FBBA2C;}
7
+ </style>
8
+ <path class="st0" d="M302,160h586c34.99,0,63.35,28.36,63.35,63.35v394.3c0,34.99-28.36,63.35-63.35,63.35H302 c-34.99,0-63.35-28.36-63.35-63.35v-394.3C238.65,188.36,267.01,160,302,160z"/>
9
+ <g>
10
+ <defs>
11
+ <rect id="SVGID_1_" x="341.04" y="162.96" width="507.9" height="506.81"/>
12
+ </defs>
13
+ <clipPath id="SVGID_00000137126528663880082090000017192719521453020821_">
14
+ <use xlink:href="#SVGID_1_" style="overflow:visible;"/>
15
+ </clipPath>
16
+ <g style="clip-path:url(#SVGID_00000137126528663880082090000017192719521453020821_);">
17
+ <path class="st0" d="M367.09,226.31h455.81c14.38,0,26.04,13.62,26.04,30.41v319.29c0,16.79-11.66,30.41-26.04,30.41H367.09 c-14.38,0-26.05-13.62-26.05-30.41V256.72C341.04,239.93,352.71,226.31,367.09,226.31z"/>
18
+ <path class="st2" d="M404.53,381.92c0,3.22,0,5.34,1.06,8.55c0,1.09,1.05,2.12,1.05,3.22c2.06,13.91,8.3,20.27,21.76,21.38 c9.3,1.08,19.64,2.12,29,3.22c5.18,0,8.3,3.22,8.3,9.58c0,6.38-2.06,10.69-8.3,10.69h-18.64c-6.24,0-8.3-3.22-9.3-12.81h-24.82 v9.66c0,1.08,1.06,3.22,1.06,4.24c1.05,9.6,7.24,16.03,16.58,18.15c6.22,1.09,12.4,1.09,18.64,2.12h18.64 c6.24-1.09,11.4-2.12,17.58-4.24c7.24-2.12,12.42-7.48,13.46-16.03c1.06-7.48,1.06-16.03,1.06-23.5 c-1.05-8.55-5.16-14.94-13.46-17.1l-18.64-3.23c-6.22-1.09-12.42-1.09-18.64-1.09c-7.24,0-9.3-3.22-9.3-9.58 c0-7.48,3.12-9.6,9.3-10.69h10.34c9.3,0,11.4,1.11,12.42,10.69v1.09h24.82v-6.43c0-13.91-6.22-22.47-20.7-24.6 c-14.46-2.12-28.98-2.12-43.46,1.09c-11.4,2.12-16.58,7.48-18.64,20.27C405.55,378.69,404.53,379.8,404.53,381.92z M631.19,458.83 v-27.8h35.18c13.46,0,22.76-8.55,24.82-21.38c1.06-8.55,2.06-17.1,1.06-25.61c-1.06-19.24-10.34-28.82-28.98-29.93 c-17.58-1.09-35.18-1.09-52.82-1.09c-4.12,0-5.18,1.11-5.18,5.35v101.5C613.61,459.92,622.91,459.92,631.19,458.83z M631.19,407.53V377.6c0,0,2.06-2.12,3.12-2.12h18.64c7.24,1.11,10.36,4.32,10.36,11.78v10.69c0,6.43-2.06,9.58-8.3,9.58H631.19z M708.83,459.92c1.06-5.34,2.06-11.77,4.18-17.1c0-1.11,2.06-2.14,3.12-2.14h33.1c1.06,0,2.06,2.12,3.12,3.22 c2.06,5.35,3.12,10.69,5.18,16.03h27.94c-1.06-2.12-2.06-5.34-3.12-7.46l-27.94-96.23c0-1.09-2.06-3.22-3.12-3.22h-39.34 c-4.18,12.88-7.24,25.67-11.4,38.49c-6.24,22.41-13.46,45.9-19.64,68.37C680.9,459.87,708.83,459.92,708.83,459.92z M747.12,421.43h-26.94c4.12-15,8.3-31.01,12.42-45.96h1.05c4.18,15,9.34,29.93,13.46,45.96H747.12z"/>
19
+ <path class="st3" d="M575.35,441.71c-16.6,0-29-7.46-34.18-19.24h37.28l4.12-11.77h-45.58v-8.55l46.59,2.12l5.16-13.86h-49.68 c5.16-14.94,18.64-22.46,36.22-22.46c7.44-0.05,14.81,1.44,21.76,4.26l4.12-14.94c-4.12-2.14-13.46-4.26-26.92-4.26 c-27.95,0-49.71,13.91-56.94,38.49h-12.35l-5.18,11.78h15.52v9.53h-9.3l-6.22,11.78h17.58c6.24,21.37,25.88,34.18,53.82,34.18 c13.46,0,23.82-2.12,27.94-4.26l-3.12-14.94C591.93,440.69,583.63,441.71,575.35,441.71z"/>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -163,16 +163,22 @@ module Spree
163
163
  # Skip cancelled shipments
164
164
  return BigDecimal('0') if shipment.canceled?
165
165
 
166
- # Get all inventory units in this shipment for this line item
167
- line_item_units = shipment.inventory_units.where(line_item_id: id).count
166
+ # Skip shipments with no cost/zero cost
167
+ return BigDecimal('0') if shipment.cost.zero?
168
168
 
169
169
  # Get total inventory units in this shipment
170
- total_units = shipment.inventory_units.count
170
+ total_units = shipment.inventory_units
171
+
172
+ # Calculate proportional shipping cost
173
+ return BigDecimal('0') if total_units.empty?
174
+
175
+ # Get all inventory units in this shipment for this line item
176
+ line_item_units = shipment.inventory_units.find_all { |unit| unit.line_item_id == id }.count
171
177
 
172
178
  # Calculate proportional shipping cost
173
- return BigDecimal('0') if total_units.zero? || line_item_units.zero? || shipment.cost.zero?
179
+ return BigDecimal('0') if line_item_units.zero?
174
180
 
175
- shipment.cost * (line_item_units.to_d / total_units)
181
+ shipment.cost * (line_item_units.to_d / total_units.count)
176
182
  end
177
183
  end
178
184
 
@@ -25,6 +25,10 @@ module Spree
25
25
  #
26
26
  has_one_attached :attachment, service: Spree.private_storage_service_name
27
27
 
28
+ def self.report_type
29
+ name.demodulize.underscore
30
+ end
31
+
28
32
  # Returns a scope of records to be used for generating report lines
29
33
  #
30
34
  # @return [ActiveRecord::Relation]
@@ -43,7 +47,11 @@ module Spree
43
47
  end
44
48
 
45
49
  def to_partial_path
46
- "spree/admin/reports/report"
50
+ 'spree/admin/reports/report'
51
+ end
52
+
53
+ def no_report_data_partial_path
54
+ 'spree/admin/reports/no_report_data'
47
55
  end
48
56
 
49
57
  def human_name
@@ -7,7 +7,7 @@ module Spree
7
7
  currency: currency,
8
8
  completed_at: (date_from.to_time.beginning_of_day)..(date_to.to_time.end_of_day)
9
9
  )
10
- ).includes(:order, variant: :product)
10
+ ).includes(:order, shipments: :inventory_units, variant: :product)
11
11
 
12
12
  scope = scope.where(vendor_id: vendor.id) if defined?(vendor) && vendor.present?
13
13
 
@@ -1410,6 +1410,7 @@ en:
1410
1410
  oops: Oops!
1411
1411
  no_products_added: No products added
1412
1412
  no_products_found: No products found
1413
+ no_report_data: No report data
1413
1414
  no_resource_found: No %{resource} found
1414
1415
  no_results: No results
1415
1416
  no_returns_found: No returns found
@@ -1909,6 +1910,7 @@ en:
1909
1910
  select_stock: Select stock
1910
1911
  select_stores: Select Store(s)
1911
1912
  select_user: Select customer
1913
+ select_vendor: Select vendor
1912
1914
  selected_quantity_not_available: selected of %{item} is not available.
1913
1915
  send_consumer_transactional_emails: Send Customer Transactional Emails
1914
1916
  send_copy_of_all_mails_to: Send Copy of All Mails To
@@ -1,5 +1,5 @@
1
1
  module Spree
2
- VERSION = '5.2.2'.freeze
2
+ VERSION = '5.2.3'.freeze
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.2
4
+ version: 5.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -600,6 +600,7 @@ files:
600
600
  - app/assets/images/payment_icons/bankmuamalat.svg
601
601
  - app/assets/images/payment_icons/bankofamerica.svg
602
602
  - app/assets/images/payment_icons/bankrakyat.svg
603
+ - app/assets/images/payment_icons/banktransfer.svg
603
604
  - app/assets/images/payment_icons/base.svg
604
605
  - app/assets/images/payment_icons/becs.svg
605
606
  - app/assets/images/payment_icons/benefit.svg
@@ -742,6 +743,7 @@ files:
742
743
  - app/assets/images/payment_icons/seabankid.svg
743
744
  - app/assets/images/payment_icons/seabankph.svg
744
745
  - app/assets/images/payment_icons/sepa_bank_transfer.svg
746
+ - app/assets/images/payment_icons/sepadebit.svg
745
747
  - app/assets/images/payment_icons/sepadirectdebit.svg
746
748
  - app/assets/images/payment_icons/seveneleven.svg
747
749
  - app/assets/images/payment_icons/shib.svg
@@ -1678,9 +1680,9 @@ licenses:
1678
1680
  - BSD-3-Clause
1679
1681
  metadata:
1680
1682
  bug_tracker_uri: https://github.com/spree/spree/issues
1681
- changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.2
1683
+ changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.3
1682
1684
  documentation_uri: https://docs.spreecommerce.org/
1683
- source_code_uri: https://github.com/spree/spree/tree/v5.2.2
1685
+ source_code_uri: https://github.com/spree/spree/tree/v5.2.3
1684
1686
  rdoc_options: []
1685
1687
  require_paths:
1686
1688
  - lib