Cambio nombre

This commit is contained in:
Alejandro Tasistro 2025-06-29 20:05:10 -03:00
parent e521b4521f
commit f961601184
2 changed files with 6 additions and 6 deletions

View file

@ -171,7 +171,7 @@ class GrupoDeCompra extends Model
*/ */
public static function exportarPedidosBarrialesAPdf() public static function exportarPedidosBarrialesAPdf()
{ {
$barrios = GrupoDeCompra::barriosMenosPruebaConPedidosAprobados()->get(); $barrios = GrupoDeCompra::barriosMenosPrueba()->get();
$fecha = now()->format('Y-m-d'); $fecha = now()->format('Y-m-d');
$filepath = 'pedidos_por_barrio-' . $fecha . '.pdf'; $filepath = 'pedidos_por_barrio-' . $fecha . '.pdf';
PdfHelper::exportarPedidos($filepath, $barrios); PdfHelper::exportarPedidos($filepath, $barrios);
@ -292,7 +292,7 @@ class GrupoDeCompra extends Model
return array($records, $i, $cantidad); return array($records, $i, $cantidad);
} }
public static function barriosMenosPruebaConPedidosAprobados(): Builder public static function barriosMenosPrueba(): Builder
{ {
return self::where('nombre', '<>', 'PRUEBA') return self::where('nombre', '<>', 'PRUEBA')
->orderBy('region') ->orderBy('region')
@ -302,7 +302,7 @@ class GrupoDeCompra extends Model
public static function transportePorBarrio(): array public static function transportePorBarrio(): array
{ {
$result = []; $result = [];
$barrios = GrupoDeCompra::barriosMenosPruebaConPedidosAprobados()->get(); $barrios = GrupoDeCompra::barriosMenosPrueba()->get();
foreach ($barrios as $barrio) { foreach ($barrios as $barrio) {
$result[] = $barrio->cantidadTransporte(); $result[] = $barrio->cantidadTransporte();

View file

@ -59,7 +59,7 @@ class Producto extends Model
static public function cantidadesPorBarrio(): Collection static public function cantidadesPorBarrio(): Collection
{ {
$barrios = GrupoDeCompra::barriosMenosPruebaConPedidosAprobados() $barrios = GrupoDeCompra::barriosMenosPrueba()
->pluck('id', 'nombre'); ->pluck('id', 'nombre');
$columnasBarrios = $barrios->map(function ($id, $nombre) { $columnasBarrios = $barrios->map(function ($id, $nombre) {
@ -93,7 +93,7 @@ class Producto extends Model
static public function planillaTotales() static public function planillaTotales()
{ {
$headers = ['Producto']; $headers = ['Producto'];
$barrios = GrupoDeCompra::barriosMenosPruebaConPedidosAprobados()->pluck('nombre')->toArray(); $barrios = GrupoDeCompra::barriosMenosPrueba()->pluck('nombre')->toArray();
$headers = array_merge($headers, $barrios); $headers = array_merge($headers, $barrios);
$cantidadesPorBarrio = self::cantidadesPorBarrio(); $cantidadesPorBarrio = self::cantidadesPorBarrio();
@ -152,7 +152,7 @@ class Producto extends Model
*/ */
static public function planillaNotas() { static public function planillaNotas() {
$headers = ['Producto']; $headers = ['Producto'];
$barrios = GrupoDeCompra::barriosMenosPruebaConPedidosAprobados() $barrios = GrupoDeCompra::barriosMenosPrueba()
->pluck('nombre')->toArray(); ->pluck('nombre')->toArray();
$headers = array_merge($headers, $barrios); $headers = array_merge($headers, $barrios);