diff --git a/app/Service/Informe/Contabilidad/Resumen.php b/app/Service/Informe/Contabilidad/Resumen.php index 4a80b78..729bdc5 100644 --- a/app/Service/Informe/Contabilidad/Resumen.php +++ b/app/Service/Informe/Contabilidad/Resumen.php @@ -32,7 +32,14 @@ class Resumen protected function getVentas($id_proyecto) { $proyecto = model(Proyecto::class)->findOne($id_proyecto); - return array_unique($proyecto->ventas()); + $ventas = $proyecto->ventas(); + $output = []; + foreach ($ventas as $venta) { + if (!in_array($venta, $output)) { + $output []= $venta; + } + } + return $output; } protected function startOfYear(DateTimeInterface $up_to) {