Implement search pago
This commit is contained in:
@ -202,6 +202,11 @@ WHERE `proyecto`.`descripcion` = ? AND `unidad`.`descripcion` = ? AND tev.`activ
|
||||
$query = "SELECT * FROM `{$this->getTable()}` WHERE `pie` = ?";
|
||||
return $this->fetchOne($query, [$pie_id]);
|
||||
}
|
||||
public function fetchIdByPie(int $pie_id): array
|
||||
{
|
||||
$query = "SELECT `id` FROM `{$this->getTable()}` WHERE `pie` = ?";
|
||||
return $this->connection->execute($query, [$pie_id])->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
public function fetchByUnidad(string $unidad, string $tipo): array
|
||||
{
|
||||
$query = "SELECT a.*
|
||||
@ -275,4 +280,36 @@ WHERE ptu.`proyecto` = ? AND tev.`descripcion` IN ('firmado por inmobiliaria', '
|
||||
GROUP BY a.`id`";
|
||||
return $this->fetchMany($query, [$proyecto_id]);
|
||||
}
|
||||
public function fetchIdByEscritura(int $escritura_id): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select('id')
|
||||
->from($this->getTable())
|
||||
->where('escritura = ?');
|
||||
return $this->connection->execute($query, [$escritura_id])->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
public function fetchIdBySubsidio(int $subsidio_id): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select('id')
|
||||
->from($this->getTable())
|
||||
->where('subsidio = ?');
|
||||
return $this->connection->execute($query, [$subsidio_id])->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
public function fetchIdByCredito(int $credito_id): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select('id')
|
||||
->from($this->getTable())
|
||||
->where('credito = ?');
|
||||
return $this->connection->execute($query, [$credito_id])->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
public function fetchIdByBono(int $bono_id): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select('id')
|
||||
->from($this->getTable())
|
||||
->where('bono_pie = ?');
|
||||
return $this->connection->execute($query, [$bono_id])->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user