Listado de Precios para Contrato Broker

This commit is contained in:
Juan Pablo Vial
2025-03-13 12:18:08 -03:00
parent 346001db8e
commit 68aebdb4fe
18 changed files with 826 additions and 14 deletions

View File

@ -16,7 +16,8 @@ class Contract extends Ideal\Service
{
public function __construct(LoggerInterface $logger,
protected Repository\Proyecto\Broker\Contract $contractRepository,
protected Repository\Proyecto\Broker\Contract\State $stateRepository)
protected Repository\Proyecto\Broker\Contract\State $stateRepository,
protected Repository\Venta\Promotion $promotionRepository)
{
parent::__construct($logger);
}
@ -145,6 +146,9 @@ class Contract extends Ideal\Service
$contract->addFactory('states', (new Implement\Repository\Factory())
->setCallable([$this->stateRepository, 'fetchByContract'])
->setArgs(['contract_id' => $contract->id]));
$contract->addFactory('promotions', (new Implement\Repository\Factory())
->setCallable([$this->promotionRepository, 'fetchByContract'])
->setArgs(['contract_id' => $contract->id]));
return $contract;
}
}