From 3340de941b3878a6776b7017c98d84c94a5c110f Mon Sep 17 00:00:00 2001 From: ale Date: Thu, 5 Sep 2024 17:11:53 -0300 Subject: [PATCH] =?UTF-8?q?Revert=20"Mejoras=20en=20c=C3=A1lculo=20de=20ca?= =?UTF-8?q?ntidad=20de=20bonos=20de=20transporte"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 3770d728c31b41d34b8d4a3608e0cbe5b00443c4. --- app/GrupoDeCompra.php | 2 +- app/Subpedido.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/GrupoDeCompra.php b/app/GrupoDeCompra.php index 1e6a60b..8ab1f9c 100644 --- a/app/GrupoDeCompra.php +++ b/app/GrupoDeCompra.php @@ -97,7 +97,7 @@ class GrupoDeCompra extends Model foreach ($this->pedidosAprobados() as $pedido) { $total += $pedido->totalParaTransporte(); } - return $total ? floor($total / 500) + 1 : 0; + return ceil($total / 500); } public function totalBonosBarriales() { diff --git a/app/Subpedido.php b/app/Subpedido.php index bc3d7bf..136716f 100644 --- a/app/Subpedido.php +++ b/app/Subpedido.php @@ -53,7 +53,7 @@ class Subpedido extends Model $total += $producto->precio * $producto->pivot->cantidad; } } - return $total ? floor($total) + 1 : 0; + return ceil($total); } //Cantidad de bonos de transporte