From 095a65a64364762c2d223dd490ee6e2de9104aad Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Mon, 3 Mar 2025 16:37:40 -0300 Subject: [PATCH] Cleanup por recomendaciones --- app/src/Repository/Venta/Credito.php | 6 ++++++ app/src/Repository/Venta/Pago.php | 6 ++++++ app/src/Repository/Venta/Pie.php | 6 ++++++ app/src/Service/Contabilidad/Cartola/BCI/Mes.php | 2 +- .../Informe/Tesoreria/Input/Excel/DAPyFFMM.php | 1 - app/src/Service/Search.php | 1 - app/src/Service/Venta.php | 1 - app/src/Service/Venta/Pago.php | 1 - app/src/Service/Venta/Pie.php | 1 - app/src/Service/Venta/PropiedadUnidad.php | 2 -- app/src/Service/Venta/Subsidio.php | 9 +++++---- app/src/Service/Venta/Unidad.php | 1 - 12 files changed, 24 insertions(+), 13 deletions(-) diff --git a/app/src/Repository/Venta/Credito.php b/app/src/Repository/Venta/Credito.php index 8100342..d70e59b 100644 --- a/app/src/Repository/Venta/Credito.php +++ b/app/src/Repository/Venta/Credito.php @@ -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() diff --git a/app/src/Repository/Venta/Pago.php b/app/src/Repository/Venta/Pago.php index c28bb0d..cd639d9 100644 --- a/app/src/Repository/Venta/Pago.php +++ b/app/src/Repository/Venta/Pago.php @@ -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() diff --git a/app/src/Repository/Venta/Pie.php b/app/src/Repository/Venta/Pie.php index ffe8244..fe6c392 100644 --- a/app/src/Repository/Venta/Pie.php +++ b/app/src/Repository/Venta/Pie.php @@ -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() diff --git a/app/src/Service/Contabilidad/Cartola/BCI/Mes.php b/app/src/Service/Contabilidad/Cartola/BCI/Mes.php index 9fc71b9..d4a0f0a 100644 --- a/app/src/Service/Contabilidad/Cartola/BCI/Mes.php +++ b/app/src/Service/Contabilidad/Cartola/BCI/Mes.php @@ -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); diff --git a/app/src/Service/Contabilidad/Informe/Tesoreria/Input/Excel/DAPyFFMM.php b/app/src/Service/Contabilidad/Informe/Tesoreria/Input/Excel/DAPyFFMM.php index c6623a0..bdc6f29 100644 --- a/app/src/Service/Contabilidad/Informe/Tesoreria/Input/Excel/DAPyFFMM.php +++ b/app/src/Service/Contabilidad/Informe/Tesoreria/Input/Excel/DAPyFFMM.php @@ -1,7 +1,6 @@ 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]); diff --git a/app/src/Service/Venta/Unidad.php b/app/src/Service/Venta/Unidad.php index 76593ad..414741d 100644 --- a/app/src/Service/Venta/Unidad.php +++ b/app/src/Service/Venta/Unidad.php @@ -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