This commit is contained in:
Juan Pablo Vial
2025-08-22 09:28:53 -04:00
parent 78222eb9f1
commit 454ba41d9c
26 changed files with 1036 additions and 135 deletions

View File

@ -93,7 +93,7 @@ class Contract extends Common\Ideal\Repository
->select('a.*')
->from("{$this->getTable()} a")
->joined($this->statusJoin())
->where('a.broker_rut = :broker_rut AND bcs.state = :state');
->where('a.broker_rut = :broker_rut AND bcs.type = :state');
return $this->fetchMany($query, ['broker_rut' => $brokerRut, 'state' => Model\Proyecto\Broker\Contract\Type::ACTIVE]);
}
@ -108,8 +108,8 @@ class Contract extends Common\Ideal\Repository
->select('a.*')
->from("{$this->getTable()} a")
->joined($this->statusJoin())
->where('a.proyecto_id = :proyecto_id AND bcs.state = :state');
return $this->fetchMany($query, ['proyecto_id' => $projectId, 'state' => Model\Proyecto\Broker\Contract\State\Type::ACTIVE->value]);
->where('a.project_id = :project_id AND bcs.type = :state');
return $this->fetchMany($query, ['project_id' => $projectId, 'state' => Model\Proyecto\Broker\Contract\State\Type::ACTIVE->value]);
}
/**