spree/spree — pull request #5819 by richardnuno (2014-12-22 13:58:45+00:00)
Title: Use order’s completed_at to determine time since purchase

* Added another eligibility validator that ensures an order is completed before running any of the other validators
* Changed the TimeSincePurchase validator to check the order’s completed_at date instead of the inventory_unit’s created_at date. This fixes an issue where the time since purchase of an inventory unit that is part of an exchange shipment would be calculated as the time since the exchange was created instead of the time since the original purchase was made.