diff --git a/app/models/spree/order.rb b/app/models/spree/order.rb index b1731b42d4..4093c995f8 100644 --- a/app/models/spree/order.rb +++ b/app/models/spree/order.rb @@ -42,16 +42,16 @@ module Spree as: :adjustable, dependent: :destroy - has_many :line_item_adjustments, through: :line_items, source: :adjustments - has_many :shipment_adjustments, through: :shipments, source: :adjustments - has_many :all_adjustments, class_name: 'Spree::Adjustment', dependent: :destroy - has_many :shipments, dependent: :destroy do def states pluck(:state).uniq end end + has_many :line_item_adjustments, through: :line_items, source: :adjustments + has_many :shipment_adjustments, through: :shipments, source: :adjustments + has_many :all_adjustments, class_name: 'Spree::Adjustment', dependent: :destroy + belongs_to :order_cycle belongs_to :distributor, class_name: 'Enterprise' belongs_to :customer