Cleanup
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
<?php
|
||||
namespace Incoviba\Service\Venta;
|
||||
|
||||
use Incoviba\Service\Valor;
|
||||
use Error;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Incoviba\Common\Implement;
|
||||
use Incoviba\Common\Ideal;
|
||||
use Incoviba\Model;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service\Valor;
|
||||
|
||||
class FormaPago extends Ideal\Service
|
||||
{
|
||||
@ -28,22 +30,22 @@ class FormaPago extends Ideal\Service
|
||||
$formaPago = new Model\Venta\FormaPago();
|
||||
try {
|
||||
$formaPago->pie = $this->pieService->getByVenta($venta_id);
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
} catch (Read) {}
|
||||
try {
|
||||
$formaPago->bonoPie = $this->bonoPieService->getByVenta($venta_id);
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
} catch (Read) {}
|
||||
try {
|
||||
$formaPago->credito = $this->creditoService->getByVenta($venta_id);
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
} catch (Read) {}
|
||||
try {
|
||||
$formaPago->escritura = $this->escrituraRepository->fetchByVenta($venta_id);
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
try {
|
||||
$formaPago->subsidio = $this->subsidioService->getByVenta($venta_id);
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
} catch (Read) {}
|
||||
try {
|
||||
$formaPago->devolucion = $this->pagoService->getDevolucionByVenta($venta_id);
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
} catch (Read) {}
|
||||
try {
|
||||
$formaPago->cuotasAbono = $this->cuotaRepository->fetchByVenta($venta_id);
|
||||
} catch (Implement\Exception\EmptyResult) {}
|
||||
@ -66,7 +68,7 @@ class FormaPago extends Ideal\Service
|
||||
$method = 'add' . str_replace(' ', '', ucwords(str_replace('_', ' ', $name)));
|
||||
$obj = $this->{$method}($data);
|
||||
$forma_pago->{$name} = $obj;
|
||||
} catch (\Error $error) {
|
||||
} catch (Error $error) {
|
||||
$this->logger->critical($error);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user