@@ -417,7 +417,7 @@ class OrderRepository extends AbstractRepository | |||
$pointSale = null; | |||
$arrayUserPointSale = $this->userPointSaleRepository->findUserPointSalesByUser($user, $distribution); | |||
if (count($arrayUserPointSale) == 1) { | |||
if (count($arrayUserPointSale) == 1 && $arrayUserPointSale[0]->id_point_sale) { | |||
$pointSale = $this->pointSaleRepository->findOnePointSaleById($arrayUserPointSale[0]->id_point_sale); | |||
} else { | |||
$lastOrder = $this->findOneOrderLastByUser($user); |