funcion/arreglar-planilla-totales #38

Merged
atasistro merged 23 commits from funcion/arreglar-planilla-totales into master 2024-12-21 11:06:25 -03:00
Showing only changes of commit cef38cf69c - Show all commits

View file

@ -92,7 +92,6 @@ class Producto extends Model
$cantidadesPorBarrio = self::cantidadesPorBarrio(); $cantidadesPorBarrio = self::cantidadesPorBarrio();
$planilla = []; $planilla = [];
$ultimaFila = 1; $ultimaFila = 1;
$filaTransporte = self::filaTransporte();
foreach ($cantidadesPorBarrio as $productoCantidades) { foreach ($cantidadesPorBarrio as $productoCantidades) {
$fila = $productoCantidades->fila; $fila = $productoCantidades->fila;
@ -159,17 +158,4 @@ class Producto extends Model
var_export($e->getRecords()); var_export($e->getRecords());
} }
} }
private static function filaTransporte()
{
$csv = Reader::createFromPath(resource_path('csv/productos.csv'), 'r');
$csv->setDelimiter("|");
$csv->setEnclosure("'");
$registros = $csv->getRecords();
foreach ($registros as $key => $registro)
if ($registro[0] == 'T') return $key;
throw new Exception('No hay bono de transporte');
}
} }