|
|
|
|
|
|
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// getOrderShopsOfWeekByUser |
|
|
|
|
|
//getByCurrentCycleAndUser |
|
|
|
|
|
public function getByCurrentDistributionAndUser(UserInterface $user = null, array $params = [], $query = null) |
|
|
|
|
|
{ |
|
|
|
|
|
return $this->getByCurrentDistribution( |
|
|
|
|
|
array_merge( |
|
|
|
|
|
[ |
|
|
|
|
|
'user' => $user, |
|
|
|
|
|
'excludeComplementaryOrderShops' => true |
|
|
|
|
|
], |
|
|
|
|
|
$params |
|
|
|
|
|
), |
|
|
|
|
|
$query |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//public $countOrderShopsOfWeek = null; |
|
|
//public $countOrderShopsOfWeek = null; |
|
|
// public function countByCurrentCycle(bool $excludeComplementaryOrderShops = true, $query = null) |
|
|
// public function countByCurrentCycle(bool $excludeComplementaryOrderShops = true, $query = null) |
|
|
|
|
|
|
|
|
return $this->countOrderShopsOfWeek;*/ |
|
|
return $this->countOrderShopsOfWeek;*/ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getByCurrentDistributionAndUser(UserInterface $user = null, array $params = [], $query = null) |
|
|
|
|
|
{ |
|
|
|
|
|
return $this->getByCurrentDistribution( |
|
|
|
|
|
array_merge( |
|
|
|
|
|
[ |
|
|
|
|
|
'user' => $user, |
|
|
|
|
|
'excludeComplementaryOrderShops' => true |
|
|
|
|
|
], |
|
|
|
|
|
$params |
|
|
|
|
|
), |
|
|
|
|
|
$query |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function countValidByCurrentDistributionAndUser(UserInterface $user = null, array $params = [], $query = null) |
|
|
|
|
|
{ |
|
|
|
|
|
return $this->countByCurrentDistribution( |
|
|
|
|
|
array_merge( |
|
|
|
|
|
[ |
|
|
|
|
|
'isValid' => true, |
|
|
|
|
|
'user' => $user, |
|
|
|
|
|
'excludeComplementaryOrderShops' => true |
|
|
|
|
|
], |
|
|
|
|
|
$params |
|
|
|
|
|
), |
|
|
|
|
|
$query |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// getNextWeekId |
|
|
// getNextWeekId |
|
|
public function getNextCycleId(Distribution $distribution, $query = null): int |
|
|
public function getNextCycleId(Distribution $distribution, $query = null): int |
|
|
{ |
|
|
{ |