Eliminado método viejo

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

View File

@ -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) {