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