Changeable orders ignores cancelled orders

This commit is contained in:
Rob Harrington
2017-04-28 15:26:37 +10:00
parent 6c90b4e6d0
commit c0445d46f3

View File

@@ -20,6 +20,7 @@ module Spree
def changeable_orders
return [] unless spree_current_user && current_distributor && current_order_cycle
Spree::Order.complete.where(
state: 'complete',
user_id: spree_current_user.id,
distributor_id: current_distributor.id,
order_cycle_id: current_order_cycle.id)