protected function buildItemData($key, array $data, Collection $products)
    {
        if (!$product = $products->find($key)) {
            throw new \RuntimeException("ID $key not found in products collection");
        }

        $this->setProduct($product);

        if (!empty($data['purchased_amount'])) {
            $data['purchased_for'] = $product->in_price;
        }

        if (!empty($data['sold_amount'])) {
            $data['sold_for'] = $product->out_price;
        }

        return $data;
    }