Agregar y editar abono cuotas.

This commit is contained in:
Juan Pablo Vial
2024-11-28 17:12:35 -03:00
parent 4f0a56c711
commit f4b8634cb4
10 changed files with 114 additions and 12 deletions

View File

@ -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);