Browse Source

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Charly 3 years ago
parent
commit
7d21c80d5f
3 changed files with 5 additions and 16 deletions
  1. +1
    -1
      Field/Filter/ProductCategoriesFilter.php
  2. +4
    -4
      Generator/OrderReferenceGenerator.php
  3. +0
    -11
      Repository/Order/OrderProductStore.php

+ 1
- 1
Field/Filter/ProductCategoriesFilter.php View File

$isOffline = " [Hors ligne]"; $isOffline = " [Hors ligne]";
} }
$section = ' ['.$category->getSection()->getTitle().']' ;; $section = ' ['.$category->getSection()->getTitle().']' ;;
return $category->getTitle() . $section. $isOffline;
return $category . $section. $isOffline;


} }
) )

+ 4
- 4
Generator/OrderReferenceGenerator.php View File

if ($this->orderShopSolver->isValid($complementaryOrder)) $complementaryIndex++; if ($this->orderShopSolver->isValid($complementaryOrder)) $complementaryIndex++;
} }
$orderShop = $complementaryOrder->getMainOrderShop(); $orderShop = $complementaryOrder->getMainOrderShop();

} }


switch ($orderShop->getSection()->getCycleType()) { switch ($orderShop->getSection()->getCycleType()) {
break; break;
} }


if($complementaryIndex){
if($complementaryIndex) {
$reference = $reference.'C'.$this->numberPad($complementaryIndex, 1); $reference = $reference.'C'.$this->numberPad($complementaryIndex, 1);
} }


return $reference; return $reference;

} }


public function buildReferenceCycleDay(OrderShopInterface $orderShop): string public function buildReferenceCycleDay(OrderShopInterface $orderShop): string
{ {
return $this->getPrefixReference($orderShop) . return $this->getPrefixReference($orderShop) .
'C' . $this->numberPad($orderShop->getCycleId(), 3);
'J' . $orderShop->getDistribution()->getCycleNumber() .
'C' . $this->numberPad($orderShop->getCycleId(), 3) .
'A' . $this->formatYear($orderShop->getDistribution()->getYear());
} }


public function buildReferenceCycleWeek(OrderShopInterface $orderShop): string public function buildReferenceCycleWeek(OrderShopInterface $orderShop): string

+ 0
- 11
Repository/Order/OrderProductStore.php View File

return $query; return $query;
} }


// findGiftVouchersByOrder
public function getGiftVouchersByOrder(OrderShopInterface $orderShop): array
{
$query = $this->createQuery();
$query
->filterByOrderShop($orderShop)
->filterIsGiftVoucherActive();

return $query->find();
}

// findOrderProductsInCartsByProduct // findOrderProductsInCartsByProduct
public function getInCartsByProduct(ProductInterface $product, $query = null): array public function getInCartsByProduct(ProductInterface $product, $query = null): array
{ {

Loading…
Cancel
Save