Listado de Precios para Contrato Broker
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user