Saldos #46

Merged
atasistro merged 34 commits from funcion/saldos into funcion/refactor-general 2025-06-19 21:09:28 -03:00
Showing only changes of commit 670bb39e75 - Show all commits

View file

@ -26,7 +26,8 @@ class CanastaHelper
$log = CanastaLog::where('descripcion', self::CANASTA_CARGADA) $log = CanastaLog::where('descripcion', self::CANASTA_CARGADA)
->orderBy('created_at', 'desc') ->orderBy('created_at', 'desc')
->first(); ->first();
$nombre = str_replace("csv/canastas/", "", $log->path); $nombre = str_replace(storage_path(), "", $log->path);
$nombre = str_replace("/csv/canastas/", "", $nombre);
$result["nombre"] = str_replace(".csv", "", $nombre); $result["nombre"] = str_replace(".csv", "", $nombre);
$result["fecha"] = $log->created_at; $result["fecha"] = $log->created_at;
return $result; return $result;
@ -39,9 +40,10 @@ class CanastaHelper
$nombre = $data->getClientOriginalName(); $nombre = $data->getClientOriginalName();
$data->move(storage_path($path), $nombre); $storage_path = storage_path($path);
$data->move($storage_path, $nombre);
self::log($path . $nombre, self::ARCHIVO_SUBIDO); self::log($storage_path . $nombre, self::ARCHIVO_SUBIDO);
return $nombre; return $nombre;
} }