public function filterByIsDefault(bool $isDefault) | public function filterByIsDefault(bool $isDefault) | ||||
{ | { | ||||
return $this | |||||
->andWhere('.isDefault = :isDefault') | |||||
->setParameter('isDefault', $isDefault); | |||||
return $this->andWhereEqual('isDefault', $isDefault); | |||||
} | |||||
public function filterByIsCommon(bool $isCommon) | |||||
{ | |||||
return $this->andWhereEqual('isCommon', $isCommon); | |||||
} | } | ||||
} | } |
// @TODO : à implémenter avec le nouveau système d'ouverture des commandes | // @TODO : à implémenter avec le nouveau système d'ouverture des commandes | ||||
} | } | ||||
public function getOnlineWithoutCommon($query = null) | |||||
{ | |||||
$query = $this->createDefaultQuery($query); | |||||
$query->filterByIsCommon(false); | |||||
return $query->find(); | |||||
} | |||||
} | } |
$this->productSolver = $productSolver; | $this->productSolver = $productSolver; | ||||
} | } | ||||
public function countProductFamiliesOrganizedByParentCategory(array $categories): int | |||||
{ | |||||
$count = 0; | |||||
foreach ($categories as $category) { | |||||
$count += count($category['products']); | |||||
} | |||||
return $count; | |||||
} | |||||
public function getAvailableQuantityInherited(ProductFamilyInterface $productFamily) | public function getAvailableQuantityInherited(ProductFamilyInterface $productFamily) | ||||
{ | { | ||||
$availableQuantity = 0; | $availableQuantity = 0; |