Cleanup por recomendaciones
This commit is contained in:
@ -58,6 +58,12 @@ class Credito extends Ideal\Repository
|
||||
->where('pago = ?');
|
||||
return $this->fetchOne($query, [$pago_id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $venta_id
|
||||
* @return Model\Venta\Credito
|
||||
* @throws Implement\Exception\EmptyResult
|
||||
*/
|
||||
public function fetchByVenta(int $venta_id): Model\Venta\Credito
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
|
@ -114,6 +114,12 @@ WHERE venta_id = ?";
|
||||
->where('valor = ? OR ROUND(valor/uf, 3) = ?');
|
||||
return $this->fetchMany($query, [$value, $value]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $venta_id
|
||||
* @return Model\Venta\Pago
|
||||
* @throws Implement\Exception\EmptyResult
|
||||
*/
|
||||
public function fetchDevolucionByVenta(int $venta_id): Model\Venta\Pago
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
|
@ -83,6 +83,12 @@ class Pie extends Ideal\Repository
|
||||
->where('reajuste = ?');
|
||||
return $this->fetchOne($query, [$reajuste_id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $venta_id
|
||||
* @return Model\Venta\Pie
|
||||
* @throws Implement\Exception\EmptyResult
|
||||
*/
|
||||
public function fetchByVenta(int $venta_id): Model\Venta\Pie
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
|
@ -14,7 +14,7 @@ class Mes extends Banco
|
||||
}
|
||||
try {
|
||||
$reader = PhpSpreadsheet\IOFactory::createReader('Xlsx');
|
||||
} catch (PhpSpreadsheet\Reader\Exception $exception) {
|
||||
} catch (PhpSpreadsheet\Reader\Exception) {
|
||||
return false;
|
||||
}
|
||||
$xlsx = $reader->load($filename);
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace Incoviba\Service\Contabilidad\Informe\Tesoreria\Input\Excel;
|
||||
|
||||
use stdClass;
|
||||
use PhpOffice\PhpSpreadsheet;
|
||||
|
||||
class DAPyFFMM extends Sheet
|
||||
|
@ -2,7 +2,6 @@
|
||||
namespace Incoviba\Service;
|
||||
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResponse;
|
||||
use Incoviba\Model;
|
||||
use Incoviba\Repository;
|
||||
|
||||
|
@ -3,7 +3,6 @@ namespace Incoviba\Service;
|
||||
|
||||
use Exception;
|
||||
use DateTimeImmutable;
|
||||
use DateInterval;
|
||||
use DateMalformedStringException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Incoviba\Common\Ideal\Service;
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace Incoviba\Service\Venta;
|
||||
|
||||
use Exception;
|
||||
use DateTimeInterface;
|
||||
use DateTimeImmutable;
|
||||
use DateMalformedStringException;
|
||||
|
@ -2,7 +2,6 @@
|
||||
namespace Incoviba\Service\Venta;
|
||||
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Common\Implement\Repository\Factory;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Model;
|
||||
|
@ -1,10 +1,8 @@
|
||||
<?php
|
||||
namespace Incoviba\Service\Venta;
|
||||
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
use Incoviba\Model;
|
||||
|
||||
class PropiedadUnidad
|
||||
|
@ -2,6 +2,7 @@
|
||||
namespace Incoviba\Service\Venta;
|
||||
|
||||
use DateTimeImmutable;
|
||||
use DateMalformedStringException;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
use Incoviba\Repository;
|
||||
@ -34,12 +35,12 @@ class Subsidio
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function add(array $data): Model\Venta\Subsidio
|
||||
{
|
||||
$fecha = new DateTimeImmutable($data['fecha']);
|
||||
$fecha = new DateTimeImmutable();
|
||||
try {
|
||||
$fecha = new DateTimeImmutable($data['fecha']);
|
||||
} catch (DateMalformedStringException) {}
|
||||
$uf = $data['uf'] ?? $this->moneyService->getUF($fecha);
|
||||
$tipoPago = $this->tipoPagoRepository->fetchByDescripcion('vale vista');
|
||||
$ahorro = $this->pagoService->add(['fecha' => $fecha->format('Y-m-d'), 'valor' => $this->valorService->clean($data['ahorro']) * $uf, 'uf' => $uf, 'tipo' => $tipoPago->id]);
|
||||
|
@ -5,7 +5,6 @@ use Incoviba\Exception\ServiceAction\Read;
|
||||
use PDOException;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
use Incoviba\Model;
|
||||
|
||||
class Unidad
|
||||
|
Reference in New Issue
Block a user