Skip to content

Commit

Permalink
- Removed statuses that are NULL from the OrderItemStatus dashboard w…
Browse files Browse the repository at this point in the history
…idget as they cannot be displayed correctly
  • Loading branch information
24198 committed Jul 20, 2020
1 parent 04a60f8 commit 1f318b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function getOrderItemsGroupedByStatus(WidgetOptionBag $widgetOptions)
$orderitemRepository = $this->registry->getRepository('MarelloOrderBundle:Order');
$qb = $orderitemRepository->createQueryBuilder('o')
->select('IDENTITY (oi.status) status, COUNT(oi.id) as quantity')
->andWhere('IDENTITY (oi.status) IS NOT NULL')
->innerJoin('o.items', 'oi')
->groupBy('oi.status')
->orderBy('quantity', 'DESC');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public function getOrderItemsGroupedByStatusDQLDataProvider()
'SELECT IDENTITY (oi.status) status, COUNT(oi.id) as quantity '
. 'FROM MarelloOrderBundle:Order o '
. 'INNER JOIN o.items oi '
. 'WHERE IDENTITY (oi.status) IS NOT NULL '
. 'GROUP BY oi.status '
. 'ORDER BY quantity DESC'
],
Expand All @@ -160,6 +161,7 @@ public function getOrderItemsGroupedByStatusDQLDataProvider()
'SELECT IDENTITY (oi.status) status, COUNT(oi.id) as quantity '
. 'FROM MarelloOrderBundle:Order o '
. 'INNER JOIN o.items oi '
. 'WHERE IDENTITY (oi.status) IS NOT NULL '
. 'GROUP BY oi.status '
. 'ORDER BY quantity DESC'
],
Expand Down

0 comments on commit 1f318b4

Please sign in to comment.