*/ | */ | ||||
protected $section; | protected $section; | ||||
public function getSection(): ?SectionInterface | |||||
public function getSection(): SectionInterface | |||||
{ | { | ||||
return $this->section; | return $this->section; | ||||
} | } |
$byWeight = true; | $byWeight = true; | ||||
} | } | ||||
return $this->productSolver->getAvailableQuantityInherited($product) - $this->getQuantityOrderByProduct( | |||||
$orderShop, | |||||
$product, | |||||
$byWeight | |||||
); | |||||
return max($this->productSolver->getAvailableQuantityInherited($product) - $this->getQuantityOrderByProduct( | |||||
$orderShop, | |||||
$product, | |||||
$byWeight | |||||
), 0); | |||||
} | } | ||||
public function hasMakeAChoiceAboutComplementaryOrder(OrderShop $orderShop): bool | public function hasMakeAChoiceAboutComplementaryOrder(OrderShop $orderShop): bool |
class TicketSolver extends SovTicketSolver | class TicketSolver extends SovTicketSolver | ||||
{ | { | ||||
public function getTypeChoices(): array | |||||
public static function getTypeChoices(): array | |||||
{ | { | ||||
$choices = parent::getTypeChoices(); | $choices = parent::getTypeChoices(); | ||||
$choicesProduct = [ | $choicesProduct = [ |