From df05b31b86abf94e96142aa740bebf6c11dea5b0 Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 25 Nov 2024 21:46:40 -0300 Subject: [PATCH] =?UTF-8?q?Eliminado=20m=C3=A9todo=20viejo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/GrupoDeCompra.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/app/GrupoDeCompra.php b/app/GrupoDeCompra.php index 31cdfb0..fd5de50 100644 --- a/app/GrupoDeCompra.php +++ b/app/GrupoDeCompra.php @@ -224,22 +224,6 @@ class GrupoDeCompra extends Model return array($records, $i, $cantidad); } - public static function exportarTodosLosPedidosEnCSV(){ - $gdcs = GrupoDeCompra::all()->filter(function ($grupoDeCompra) { - return !$grupoDeCompra->pedidosAprobados()->isEmpty(); - }); - $planilla = GrupoDeCompra::obtenerTemplateDeFilasVacias($gdcs->count()); - $planilla = self::getPlanilla($gdcs, $planilla); - - // Guardar en un archivo .csv - try { - $writer = Writer::createFromPath(resource_path('csv/exports/total-pedidos.csv'), 'w'); - $writer->insertAll($planilla); - } catch (CannotInsertRecord $e) { - var_export($e->getRecords()); - } - } - public static function exportarProductosConNotasEnCSV() { $gdcs = GrupoDeCompra::all(); foreach ($gdcs as $i => $gdc) {