|
|
|
|
|
|
|
|
$orderModule = $this->getOrderModule(); |
|
|
$orderModule = $this->getOrderModule(); |
|
|
|
|
|
|
|
|
$user = GlobalParam::getCurrentUser(); |
|
|
$user = GlobalParam::getCurrentUser(); |
|
|
$userProducer = $this->getUserProducerModule()->getRepository()->findOneUserProducer($user); |
|
|
|
|
|
|
|
|
$userProducer = null; |
|
|
|
|
|
if($user) { |
|
|
|
|
|
$userProducer = $this->getUserProducerModule()->getRepository()->findOneUserProducer($user); |
|
|
|
|
|
} |
|
|
$pointsSaleArray = PointSale::find(); |
|
|
$pointsSaleArray = PointSale::find(); |
|
|
|
|
|
|
|
|
if ($distribution) { |
|
|
if ($distribution) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Filtre par accès exclusif aux points de vente |
|
|
// Filtre par accès exclusif aux points de vente |
|
|
$pointsSaleArray = $this->getUserProducerModule()->getSolver()->filterPointsSaleByExclusiveAccess( |
|
|
|
|
|
$userProducer, |
|
|
|
|
|
$pointsSaleArray |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
if($userProducer) { |
|
|
|
|
|
$pointsSaleArray = $this->getUserProducerModule()->getSolver()->filterPointsSaleByExclusiveAccess( |
|
|
|
|
|
$userProducer, |
|
|
|
|
|
$pointsSaleArray |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return $pointsSaleArray; |
|
|
return $pointsSaleArray; |
|
|
} |
|
|
} |