Simplificacion de retorno de ventas por unidades
This commit is contained in:
@ -19,7 +19,7 @@ class Propiedad extends Ideal\Repository
|
||||
|
||||
public function create(?array $data = null): Model\Venta\Propiedad
|
||||
{
|
||||
$map = (new Implement\Repository\MapperParser(['unidad_principal', 'estacionamientos', 'bodegas', 'estado']))
|
||||
$map = (new Implement\Repository\MapperParser())
|
||||
->register('estado', new Implement\Repository\Mapper\Boolean('estado'));
|
||||
return $this->parseData(new Model\Venta\Propiedad(), $data, $map);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class Propiedad extends Service
|
||||
public function getArrayById(int $propiedad_id): array
|
||||
{
|
||||
try {
|
||||
return $this->propiedadRepository->fetchArrayById($propiedad_id);
|
||||
return json_decode(json_encode($this->propiedadRepository->fetchById($propiedad_id)), true);
|
||||
} catch (EmptyResult $exception) {
|
||||
throw new Exception\ServiceAction\Read(__CLASS__, $exception);
|
||||
}
|
||||
|
Reference in New Issue
Block a user