mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'mod/iskn2' into 'main'
Eliminado contexto libro por defecto See merge request jjimenez/safekat!840
This commit is contained in:
@ -12,7 +12,6 @@ use App\Models\Presupuestos\ImportadorModel;
|
||||
use App\Models\Presupuestos\PresupuestoModel;
|
||||
use App\Models\Usuarios\GroupModel;
|
||||
use App\Models\Catalogo\CatalogoLibroModel;
|
||||
use App\Models\Catalogo\IdentificadorIsknModel;
|
||||
use App\Services\PresupuestoService;
|
||||
use CodeIgniter\Shield\Entities\User;
|
||||
|
||||
@ -32,22 +31,7 @@ class Test extends BaseController
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
|
||||
/*$modelCL = new CatalogoLibroModel();
|
||||
$modelISKN = new IdentificadorIsknModel();
|
||||
|
||||
// Obtener todos los registros sin iskn
|
||||
$registros = $modelCL->where('iskn', null)->findAll();
|
||||
|
||||
$i = 0;
|
||||
foreach ($registros as $registro) {
|
||||
$iskn = $modelISKN->newIskn();
|
||||
|
||||
$modelCL->update($registro->id, ['iskn' => $iskn]);
|
||||
|
||||
echo "[" . $i++ . "]Asignado ISKN {$iskn} a ID {$registro->id}<br>";
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ class IdentificadorIsknModel extends Model
|
||||
/**
|
||||
* Crea un nuevo registro con un ISKN único y lo devuelve.
|
||||
*/
|
||||
public function newIskn(string $contexto = 'libro'): string
|
||||
public function newIskn(string $contexto = ''): string
|
||||
{
|
||||
$iskn = $this->generarIsknUnico($contexto);
|
||||
$this->insert(['iskn' => $iskn]);
|
||||
|
||||
Reference in New Issue
Block a user