Eliminado método viejo

This commit is contained in:
Alejandro Tasistro 2024-11-25 21:46:40 -03:00
parent 1c5b8ecb29
commit 6dae6afe95
1 changed files with 0 additions and 16 deletions

View File

@ -224,22 +224,6 @@ class GrupoDeCompra extends Model
return array($records, $i, $cantidad); 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() { public static function exportarProductosConNotasEnCSV() {
$gdcs = GrupoDeCompra::all(); $gdcs = GrupoDeCompra::all();
foreach ($gdcs as $i => $gdc) { foreach ($gdcs as $i => $gdc) {