mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Alter scope to return both completed and resumed orders
This commit is contained in:
@@ -14,7 +14,7 @@ class ProxyOrder < ActiveRecord::Base
|
||||
scope :not_closed, -> { joins(:order_cycle).merge(OrderCycle.not_closed) }
|
||||
scope :canceled, -> { where('proxy_orders.canceled_at IS NOT NULL') }
|
||||
scope :not_canceled, -> { where('proxy_orders.canceled_at IS NULL') }
|
||||
scope :placed_and_open, -> { joins(:order).not_closed.where(spree_orders: { state: 'complete' }) }
|
||||
scope :placed_and_open, -> { joins(:order).not_closed.where(spree_orders: { state: ['complete', 'resumed'] }) }
|
||||
|
||||
def state
|
||||
# NOTE: the order is important here
|
||||
|
||||
Reference in New Issue
Block a user