|
|
|
|
|
|
|
|
$pointSale = null; |
|
|
$pointSale = null; |
|
|
$arrayUserPointSale = $this->userPointSaleRepository->findUserPointSalesByUser($user, $distribution); |
|
|
$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); |
|
|
$pointSale = $this->pointSaleRepository->findOnePointSaleById($arrayUserPointSale[0]->id_point_sale); |
|
|
} else { |
|
|
} else { |
|
|
$lastOrder = $this->findOneOrderLastByUser($user); |
|
|
$lastOrder = $this->findOneOrderLastByUser($user); |