Shouldn't this be checking the inventory unit state not the order state?