FIX: unidadService -> propiedadUnidadService

This commit is contained in:
Juan Pablo Vial
2024-06-10 15:53:05 -04:00
parent 27e88761e0
commit 1caa62500a

View File

@ -9,7 +9,7 @@ use Incoviba\Service;
class Propiedad extends Ideal\Repository class Propiedad extends Ideal\Repository
{ {
public function __construct(Define\Connection $connection, protected Service\Venta\PropiedadUnidad $unidadService) public function __construct(Define\Connection $connection, protected Service\Venta\PropiedadUnidad $propiedadUnidadService, protected Service\Venta\Unidad $unidadService)
{ {
parent::__construct($connection); parent::__construct($connection);
$this->setTable('propiedad'); $this->setTable('propiedad');
@ -32,7 +32,7 @@ class Propiedad extends Ideal\Repository
{ {
$propiedad = parent::load($data_row); $propiedad = parent::load($data_row);
if (isset($propiedad->id)) { if (isset($propiedad->id)) {
$propiedad->unidades = $this->unidadService->getByPropiedad($propiedad->id); $propiedad->unidades = $this->propiedadUnidadService->getByPropiedad($propiedad->id);
} }
return $propiedad; return $propiedad;
} }