Refactor named scope cost report