Explorar el Código

Merge branch 'develop'

master^2
Fab hace 3 años
padre
commit
96efd84f4a
Se han modificado 1 ficheros con 0 adiciones y 15 borrados
  1. +0
    -15
      ShopBundle/Repository/OrderShopRepository.php

+ 0
- 15
ShopBundle/Repository/OrderShopRepository.php Ver fichero

@@ -313,20 +313,5 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
}


public function countValidOrderProductsOfWeekByProduct($weekNumber, $productId)
{
$query = $this->findByMerchantQuery();
$query = $this->filterOrderValid($query);
$query->andWhere('e.weekNumber = :weekNumber');
$query->setParameter('weekNumber', $weekNumber);
$query->leftJoin('e.orderProducts', 'orderProduct');
$query->andWhere('orderProduct.product = :product');
$query->setParameter('product', $productId);
$query->select('SUM(orderProduct.quantityOrder) as quantity');

$result = $query->getQuery()->getOneOrNullResult();

return $result['quantity'];

}
}

Cargando…
Cancelar
Guardar