Precios con promociones para listado brokers
This commit is contained in:
@ -63,21 +63,19 @@ class Unidades extends Ideal\Controller
|
||||
try {
|
||||
$proyecto = $proyectoService->getById($proyecto_id);
|
||||
foreach ($unidad_ids as $unidad_id) {
|
||||
$output['estados'][] = [
|
||||
'id' => $unidad_id,
|
||||
'sold' => false
|
||||
];
|
||||
try {
|
||||
$unidad = $unidadRepository->fetchById($unidad_id);
|
||||
} catch (Implement\Exception\EmptyResult) {
|
||||
try {
|
||||
$output['estados'][] = [
|
||||
'id' => $unidad_id,
|
||||
'sold' => $unidadRepository->fetchSoldByUnidad((int) $unidad_id)
|
||||
'sold' => $unidadRepository->fetchSoldByUnidad($unidad->id)
|
||||
];
|
||||
} catch (Implement\Exception\EmptyResult) {
|
||||
$output['estados'][] = [
|
||||
'id' => $unidad_id,
|
||||
'sold' => false
|
||||
];
|
||||
}
|
||||
}
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
}
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
return $this->withJson($response, $output);
|
||||
|
Reference in New Issue
Block a user