Remove Order #shipped_shipments method

This commit is contained in:
Matt-Yorkley
2023-06-05 19:44:23 +01:00
parent a785b4d5e0
commit b3bd112cdb
2 changed files with 2 additions and 6 deletions

View File

@@ -301,10 +301,6 @@ module Spree
number
end
def shipped_shipments
shipments.shipped
end
def contains?(variant)
find_line_item_by_variant(variant).present?
end

View File

@@ -63,7 +63,7 @@ module Spree
end
def returnable_inventory
order.shipped_shipments.collect{ |s| s.inventory_units.to_a }.flatten
order.shipments.shipped.collect{ |s| s.inventory_units.to_a }.flatten
end
# Used when Adjustment#update_adjustment! wants to update the related adjustment
@@ -74,7 +74,7 @@ module Spree
private
def must_have_shipped_units
return unless order.nil? || order.shipped_shipments.none?
return unless order.nil? || order.shipments.shipped.none?
errors.add(:order, Spree.t(:has_no_shipped_units))
end