Facturacion, se agrega PropiedadUnidad

This commit is contained in:
2023-11-29 20:09:08 -03:00
parent 094209823a
commit 39048e12b3
24 changed files with 716 additions and 55 deletions

View File

@ -39,6 +39,16 @@ class Unidad extends Ideal\Repository
return $this->update($model, ['subtipo', 'piso', 'descripcion', 'orientacion', 'pt'], $new_data);
}
public function fetchById(int $id): Model\Venta\Unidad
{
$query = $this->connection->getQueryBuilder()
->select('a.*, up.prorrateo')
->from("{$this->getTable()} a")
->joined($this->joinProrrateo())
->where('a.id = ?');
return $this->fetchOne($query, [$id]);
}
public function fetchByVenta(int $venta_id): array
{
$query = $this->connection->getQueryBuilder()