FIX: Propietario no tomaba en consideracion comuna para direccion
This commit is contained in:
@ -40,9 +40,9 @@ class Direccion extends Ideal\Repository
|
||||
$query = "SELECT * FROM `{$this->getTable()}` WHERE `calle` = ? AND `numero` = ?";
|
||||
return $this->fetchMany($query, [$calle, $numero]);
|
||||
}
|
||||
public function fetchByCalleAndNumeroAndExtra(string $calle, int $numero, string $extra): Model\Direccion
|
||||
public function fetchByCalleAndNumeroAndExtraAndComuna(string $calle, int $numero, string $extra, int $comuna_id): Model\Direccion
|
||||
{
|
||||
$query = "SELECT * FROM `{$this->getTable()}` WHERE `calle` = ? AND `numero` = ? AND `extra` = ?";
|
||||
return $this->fetchOne($query, [$calle, $numero, $extra]);
|
||||
$query = "SELECT * FROM `{$this->getTable()}` WHERE `calle` = ? AND `numero` = ? AND `extra` = ? AND `comuna` = ?";
|
||||
return $this->fetchOne($query, [$calle, $numero, $extra, $comuna_id]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user