code: private function getBundleStock($bundleNumber)
      {
          $repository = $this->entityManager->getRepository(DetailModel::class);
          $detail = $repository->findOneBy(['number' => $bundleNumber]);
  
          if (null === $detail) {
              return 0;
          }
  
          return $detail->getInStock();
      }
docs: @param string $bundleNumber
  
  @return int