diff --git a/app/models/spree/order.rb b/app/models/spree/order.rb index 20f1b3225c..65d1b2aa44 100644 --- a/app/models/spree/order.rb +++ b/app/models/spree/order.rb @@ -62,7 +62,11 @@ module Spree 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 :vouchers, -> { where(originator_type: 'Voucher') }, + has_many :vouchers, + -> { + where(originator_type: 'Voucher') + .order("#{Spree::Adjustment.table_name}.created_at ASC") + }, class_name: 'Spree::Adjustment', dependent: :destroy