diff --git a/app/Models/Barrio.php b/app/Models/Barrio.php index f8cd602..1d73b2b 100644 --- a/app/Models/Barrio.php +++ b/app/Models/Barrio.php @@ -44,7 +44,6 @@ function pedidosConfirmados() { private function calcularTotalConfirmados(Closure $closure = null) : float { if (!$closure) $closure = fn($p) => $p->totalChismosa(); - return $this->pedidosConfirmados()->sum($closure); } @@ -53,7 +52,9 @@ function totalARecaudar() : float { } function totalNoBarriales() : float { - return $this->calcularTotalConfirmados(fn($p) => $p->total($p->productosNoBarriales())); + return $this->calcularTotalConfirmados( + fn($p) => $p->total($p->productosNoBarriales()) + ); } function totalTransporte() : float {