Agregar y editar abono cuotas.
This commit is contained in:
@ -7,11 +7,12 @@ use Incoviba\Common\Implement;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Model;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
|
||||
class Cuota extends Ideal\Repository
|
||||
{
|
||||
public function __construct(Define\Connection $connection, protected Repository\Venta $ventaRepository,
|
||||
protected Repository\Venta\Pago $pagoRepository)
|
||||
protected Service\Venta\Pago $pagoService)
|
||||
{
|
||||
parent::__construct($connection);
|
||||
$this->setTable('venta_abono_cuotas');
|
||||
@ -29,7 +30,7 @@ class Cuota extends Ideal\Repository
|
||||
->register('pago_id', (new Implement\Repository\Mapper())
|
||||
->setProperty('pago')
|
||||
->setFunction(function($data) {
|
||||
return $this->pagoRepository->fetchById($data['pago_id']);
|
||||
return $this->pagoService->getById($data['pago_id']);
|
||||
})
|
||||
);
|
||||
return $this->parseData(new Model\Venta\Abono\Cuota(), $data, $map);
|
||||
|
Reference in New Issue
Block a user