Browse Source

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

packProduct
Fabien Normand 3 years ago
parent
commit
8a3e5b8e7f
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      Generator/OrderReferenceGenerator.php

+ 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

Loading…
Cancel
Save