@@ -17,7 +17,7 @@ abstract class NewsletterModel extends SovNewsletterModel implements FilterSecti | |||
*/ | |||
protected $section; | |||
public function getSection(): ?SectionInterface | |||
public function getSection(): SectionInterface | |||
{ | |||
return $this->section; | |||
} |
@@ -351,11 +351,11 @@ class OrderShopSolver | |||
$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 |
@@ -7,7 +7,7 @@ use Lc\SovBundle\Solver\Ticket\TicketSolver as SovTicketSolver; | |||
class TicketSolver extends SovTicketSolver | |||
{ | |||
public function getTypeChoices(): array | |||
public static function getTypeChoices(): array | |||
{ | |||
$choices = parent::getTypeChoices(); | |||
$choicesProduct = [ |