@@ -56,7 +56,7 @@ |
||
56 | 56 | ); |
57 | 57 | |
58 | 58 | if ($company) |
59 | - $qb->andWhere('pe = :company')->setParameter('company', $company); |
|
59 | + $qb->andWhere('pe = :company')->setParameter('company', $company); |
|
60 | 60 | |
61 | 61 | return $qb->getQuery()->getResult(); |
62 | 62 | } |
@@ -55,8 +55,9 @@ |
||
55 | 55 | $this->peopleService->getMyCompanies() |
56 | 56 | ); |
57 | 57 | |
58 | - if ($company) |
|
59 | - $qb->andWhere('pe = :company')->setParameter('company', $company); |
|
58 | + if ($company) { |
|
59 | + $qb->andWhere('pe = :company')->setParameter('company', $company); |
|
60 | + } |
|
60 | 61 | |
61 | 62 | return $qb->getQuery()->getResult(); |
62 | 63 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | RequestStack $requestStack |
22 | 22 | |
23 | 23 | ) { |
24 | - $this->request = $requestStack->getCurrentRequest(); |
|
24 | + $this->request = $requestStack->getCurrentRequest(); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | public function getPurchasingSuggestion(People $company) |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function getPurchasingSuggestion(Request $request): JsonResponse |
25 | 25 | { |
26 | - $company = $this->entityManager->getRepository(People::class)->find($request->get('company')); |
|
26 | + $company = $this->entityManager->getRepository(People::class)->find($request->get('company')); |
|
27 | 27 | $data = $this->orderService->getPurchasingSuggestion($company); |
28 | 28 | return new JsonResponse($data); |
29 | 29 | } |