FIX: Venta nueva no se ingresaba

This commit is contained in:
Juan Pablo Vial
2024-02-13 17:59:46 -03:00
parent ba0d4073d7
commit e542615128
5 changed files with 51 additions and 16 deletions

View File

@ -240,6 +240,15 @@ GROUP BY a.`id`";*/
->where('`unidad`.`descripcion` LIKE ? AND tu.`descripcion` = ?');
return $this->fetchMany($query, [$unidad, $tipo]);
}
public function fetchByUnidadId(int $unidad_id): Model\Venta
{
$query = $this->connection->getQueryBuilder()
->select('a.*')
->from("{$this->getTable()} a")
->joined('JOIN propiedad_unidad pu ON pu.propiedad = a.propiedad')
->where('pu.unidad = ?');
return $this->fetchOne($query, [$unidad_id]);
}
public function fetchIdsByUnidad(string $unidad, string $tipo): array
{
$query = $this->connection->getQueryBuilder()