treatment of spoilage in cost accounting