Promociones
This commit is contained in:
@ -164,6 +164,21 @@ class Proyecto extends Ideal\Repository
|
||||
->where('inmobiliaria = ?');
|
||||
return $this->fetchMany($query, [$inmobiliaria_rut]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $promotion_id
|
||||
* @return array
|
||||
* @throws Implement\Exception\EmptyResult
|
||||
*/
|
||||
public function fetchByPromotion(int $promotion_id): array
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select('a.*')
|
||||
->from("{$this->getTable()} a")
|
||||
->joined('INNER JOIN promotion_projects pp ON pp.project_id = a.id')
|
||||
->where('pp.promotion_id = :promotion_id');
|
||||
return $this->fetchMany($query, ['promotion_id' => $promotion_id]);
|
||||
}
|
||||
/*public function fetchSuperficieVendido(int $proyecto_id): float
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user