From c6319daecf7b301b4b169bbc770cc8a94b7c9513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Thu, 10 Feb 2022 10:07:52 +0100 Subject: [PATCH] OrderPaymentManager: Fix internal query. --- src/Payment/OrderPaymentManager.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Payment/OrderPaymentManager.php b/src/Payment/OrderPaymentManager.php index c63de1f..06cbc88 100644 --- a/src/Payment/OrderPaymentManager.php +++ b/src/Payment/OrderPaymentManager.php @@ -159,9 +159,10 @@ public function orderHasPaidByVariableSymbol(?int $number): bool try { $this->entityManager->getRepository(OrderOnlinePayment::class) ->createQueryBuilder('o') - ->where('o.number = :number') - ->setParameter('number', $number) + ->leftJoin('o.order', 'realOrder') + ->where('realOrder.number = :number') ->andWhere('o.status = :status') + ->setParameter('number', $number) ->setParameter('status', OrderStatus::STATUS_PAID) ->getQuery() ->getSingleResult();