mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Remove Order #shipped_shipments method
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user