spree/spree — pull request #1872 by iloveitaly (2012-08-22 17:15:53+00:00)
Title: Orders unfulfilled filter

In my situation:

* we have accepted pre-orders for a product
* orders have come in for that product, but customers have ordered other in-stock products alongside the pre-order product
* the pre-order product comes in, but there is no easy way of finding orders that haven't been completely fufilled

This adds a filter to the orders admin to easily locate orders with unshipped inventory items. I delete the filter if false to eliminate unneeded SQL query additions.

I'm new to ransack, but I *think* `:distinct => true` shouldn't mess with any existing queries since all results should have distinct order ids to begin with.