tarifas acabado/manipulado/preimpresion terminadas. Faltan envios

This commit is contained in:
Jaime Jimenez
2023-05-17 20:38:05 +02:00
parent 39598b697d
commit 5788d392d9
16 changed files with 154 additions and 71 deletions

View File

@ -228,7 +228,7 @@ abstract class GoBaseController extends Controller {
if (isset($this->primaryModel) && isset(static::$singularObjectNameCc) && !empty(static::$singularObjectNameCc) && !isset($this->viewData[(static::$singularObjectNameCc) . 'List'])) {
//JJO
if ($this->soft_delete):
$this->viewData[(static::$singularObjectNameCc) . 'List'] = $this->primaryModel->asObject()->where('is_deletedadad', 0)->findAll();
$this->viewData[(static::$singularObjectNameCc) . 'List'] = $this->primaryModel->asObject()->where('is_deleted', 0)->findAll();
else:
$this->viewData[(static::$singularObjectNameCc) . 'List'] = $this->primaryModel->asObject()->findAll();
endif;
@ -347,7 +347,7 @@ abstract class GoBaseController extends Controller {
if (!isset($error)) :
try {
if ($deletePermanently && !$this->soft_delete) :
if (is_numeric($id)) :
if (is_numeric($id)) :
$rawResult = $this->primaryModel->delete($id);
else:
$rawResult = $this->primaryModel->where($this->primaryModel->getPrimaryKeyName(), $id)->delete();

View File

@ -105,6 +105,7 @@ class Tarifaacabado extends \App\Controllers\GoBaseController {
public function edit($requestedId = null) {
// JJO
$session = session();
if ($requestedId == null) :
@ -127,7 +128,11 @@ class Tarifaacabado extends \App\Controllers\GoBaseController {
$postData = $this->request->getPost();
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
$sanitizedData['user_update_id'] = $session->id_user;
// JJO
if(isset($this->model->user_update_id)){
$sanitizedData['user_update_id'] = $session->id_user;
}
$noException = true;
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :

View File

@ -22,6 +22,10 @@ class Tarifamanipulado extends \App\Controllers\GoBaseController {
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) {
$this->viewData['pageTitle'] = lang('Tarifamanipulado.moduleTitle');
// Se indica que este controlador trabaja con soft_delete
$this->soft_delete = true;
// Se indica el flag para los ficheros borrados
$this->delete_flag = 1;
parent::initController($request, $response, $logger);
}
@ -101,6 +105,9 @@ class Tarifamanipulado extends \App\Controllers\GoBaseController {
public function edit($requestedId = null) {
// JJO
$session = session();
if ($requestedId == null) :
return $this->redirect2listView();
endif;
@ -119,9 +126,12 @@ class Tarifamanipulado extends \App\Controllers\GoBaseController {
$nullIfEmpty = true; // !(phpversion() >= '8.1');
$postData = $this->request->getPost();
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
// JJO
if(isset($this->model->user_update_id)){
$sanitizedData['user_update_id'] = $session->id_user;
}
$noException = true;
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :

View File

@ -22,6 +22,10 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController {
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) {
$this->viewData['pageTitle'] = lang('Preimpresions.moduleTitle');
// Se indica que este controlador trabaja con soft_delete
$this->soft_delete = true;
// Se indica el flag para los ficheros borrados
$this->delete_flag = 1;
parent::initController($request, $response, $logger);
}
@ -100,7 +104,10 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController {
} // end function add()
public function edit($requestedId = null) {
// JJO
$session = session();
if ($requestedId == null) :
return $this->redirect2listView();
endif;
@ -119,9 +126,12 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController {
$nullIfEmpty = true; // !(phpversion() >= '8.1');
$postData = $this->request->getPost();
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
// JJO
if(isset($this->model->user_update_id)){
$sanitizedData['user_update_id'] = $session->id_user;
}
$noException = true;
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :

View File

@ -17,6 +17,8 @@ class TarifamanipuladoEntity extends \CodeIgniter\Entity\Entity
"formula_price" => null,
"user_created_id" => 1,
"user_update_id" => 1,
"deleted_at" => null,
"is_deleted" => 0,
"created_at" => null,
"updated_at" => null,
];

View File

@ -11,6 +11,8 @@ class TarifapreimpresionEntity extends \CodeIgniter\Entity\Entity
"precio" => null,
"user_created_id" => 1,
"user_update_id" => 1,
"deleted_at" => null,
"is_deleted" => 0,
"created_at" => null,
"updated_at" => null,
];

View File

@ -32,7 +32,7 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel
];
protected $returnType = "App\Entities\Tarifas\TarifaacabadoEntity";
public static $labelField = "Select a field...";
public static $labelField = "nombre";
protected $validationRules = [
"ajuste" => [

View File

@ -21,6 +21,8 @@ class TarifamanipuladoModel extends \App\Models\GoBaseModel
"ajuste",
"ajuste_total_pedido",
"formula_price",
"deleted_at",
"is_deleted",
"user_created_id",
"user_update_id",
];
@ -28,10 +30,9 @@ class TarifamanipuladoModel extends \App\Models\GoBaseModel
protected $useTimestamps = true;
protected $useSoftDeletes = false;
protected $createdField = "created_at";
protected $updatedField = "updated_at";
protected $deletedField = 'deleted_at';
public static $labelField = "nombre";
@ -68,14 +69,6 @@ class TarifamanipuladoModel extends \App\Models\GoBaseModel
"label" => "Manipuladoes.tiradaMin",
"rules" => "required|integer",
],
"user_created_id" => [
"label" => "Manipuladoes.userCreatedId",
"rules" => "required|integer",
],
"user_update_id" => [
"label" => "Manipuladoes.userUpdateId",
"rules" => "required|integer",
],
];
protected $validationMessages = [
@ -110,14 +103,6 @@ class TarifamanipuladoModel extends \App\Models\GoBaseModel
"tirada_min" => [
"integer" => "Manipuladoes.validation.tirada_min.integer",
"required" => "Manipuladoes.validation.tirada_min.required",
],
"user_created_id" => [
"integer" => "Manipuladoes.validation.user_created_id.integer",
"required" => "Manipuladoes.validation.user_created_id.required",
],
"user_update_id" => [
"integer" => "Manipuladoes.validation.user_update_id.integer",
"required" => "Manipuladoes.validation.user_update_id.required",
],
]
];
}

View File

@ -12,15 +12,21 @@ class TarifapreimpresionModel extends \App\Models\GoBaseModel
*/
protected $useAutoIncrement = true;
protected $allowedFields = ["nombre", "precio", "user_created_id", "user_update_id"];
protected $allowedFields = [
"nombre",
"precio",
"deleted_at",
"is_deleted",
"user_created_id",
"user_update_id"];
protected $returnType = "App\Entities\Tarifas\TarifapreimpresionEntity";
protected $useTimestamps = true;
protected $useSoftDeletes = false;
protected $createdField = "created_at";
protected $updatedField = "updated_at";
protected $deletedField = 'deleted_at';
public static $labelField = "nombre";
@ -32,15 +38,7 @@ class TarifapreimpresionModel extends \App\Models\GoBaseModel
"precio" => [
"label" => "Tarifapreimpresion.precio",
"rules" => "required|decimal",
],
"user_created_id" => [
"label" => "Tarifapreimpresion.userCreatedId",
"rules" => "required|integer",
],
"user_update_id" => [
"label" => "Tarifapreimpresion.userUpdateId",
"rules" => "required|integer",
],
]
];
protected $validationMessages = [
@ -52,13 +50,5 @@ class TarifapreimpresionModel extends \App\Models\GoBaseModel
"decimal" => "Tarifapreimpresion.validation.precio.decimal",
"required" => "Tarifapreimpresion.validation.precio.required",
],
"user_created_id" => [
"integer" => "Tarifapreimpresion.validation.user_created_id.integer",
"required" => "Tarifapreimpresion.validation.user_created_id.required",
],
"user_update_id" => [
"integer" => "Tarifapreimpresion.validation.user_update_id.integer",
"required" => "Tarifapreimpresion.validation.user_update_id.required",
],
];
}

View File

@ -14,13 +14,6 @@
<input type="number" id="tiradaMin" name="tirada_min" required placeholder="0" maxLength="11" class="form-control" value="<?=old('tirada_min', $tarifaacabado_->tirada_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="precioMin" class="form-label">
<?=lang('Tarifaacabado.precioMin') ?>*
</label>
<input type="number" id="precioMin" name="precio_min" required placeholder="0" maxLength="31" step="0.01" class="form-control" value="<?=old('precio_min', $tarifaacabado_->precio_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="tiradaMax" class="form-label">
<?=lang('Tarifaacabado.tiradaMax') ?>*
@ -28,6 +21,13 @@
<input type="number" id="tiradaMax" name="tirada_max" required placeholder="0" maxLength="11" class="form-control" value="<?=old('tirada_max', $tarifaacabado_->tirada_max) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="precioMin" class="form-label">
<?=lang('Tarifaacabado.precioMin') ?>*
</label>
<input type="number" id="precioMin" name="precio_min" required placeholder="0" maxLength="31" step="0.01" class="form-control" value="<?=old('precio_min', $tarifaacabado_->precio_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="precioMax" class="form-label">
<?=lang('Tarifaacabado.precioMax') ?>*

View File

@ -16,28 +16,36 @@
<table id="tableOfTarifasacabado" class="table table-striped table-hover using-exportable-data-table" style="width: 100%;">
<thead>
<tr>
<?php /*
<th><?= lang('Tarifaacabado.id') ?></th>
*/ ?>
<th><?= lang('Tarifaacabado.nombre') ?></th>
<th><?= lang('Tarifaacabado.tiradaMin') ?></th>
<th><?= lang('Tarifaacabado.precioMin') ?></th>
<th><?= lang('Tarifaacabado.tiradaMax') ?></th>
<th><?= lang('Tarifaacabado.precioMin') ?></th>
<th><?= lang('Tarifaacabado.precioMax') ?></th>
<th><?= lang('Tarifaacabado.ajuste') ?></th>
<th><?= lang('Tarifaacabado.formulaPrice') ?></th>
<?php /*
<th><?= lang('Tarifaacabado.userCreatedId') ?></th>
<th><?= lang('Tarifaacabado.userUpdateId') ?></th>
<th><?= lang('Tarifaacabado.deletedAt') ?></th>
<th><?= lang('Tarifaacabado.createdAt') ?></th>
<th><?= lang('Tarifaacabado.updatedAt') ?></th>
*/ ?>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($tarifaacabadoList as $item ) : ?>
<tr>
<?php /*
<td class="align-middle text-center">
<?=$item->id ?>
</td>
*/ ?>
<td class="align-middle">
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
</td>
@ -45,10 +53,10 @@
<?= esc($item->tirada_min) ?>
</td>
<td class="align-middle">
<?= esc($item->precio_min) ?>
<?= esc($item->tirada_max) ?>
</td>
<td class="align-middle">
<?= esc($item->tirada_max) ?>
<?= esc($item->precio_min) ?>
</td>
<td class="align-middle">
<?= esc($item->precio_max) ?>
@ -59,6 +67,7 @@
<td class="align-middle">
<?= empty($item->formula_price) || strlen($item->formula_price) < 51 ? esc($item->formula_price) : character_limiter(esc($item->formula_price), 50) ?>
</td>
<?php /*
<td class="align-middle">
<?= esc($item->user_created_id) ?>
</td>
@ -74,6 +83,7 @@
<td class="align-middle text-nowrap">
<?= empty($item->updated_at) ? '' : date('d/m/Y H:m:s', strtotime($item->updated_at)) ?>
</td>
*/ ?>
<td class="align-middle text-center text-nowrap">
<?=anchor(route_to('editTarifaacabado', $item->id), lang('Basic.global.edit'), ['class'=>'btn btn-sm btn-warning btn-edit me-1', 'data-id'=>$item->id,]); ?>
<?=anchor('#confirm2delete', lang('Basic.global.Delete'), ['class'=>'btn btn-sm btn-danger btn-delete ms-1', 'data-href'=>route_to('deleteTarifaacabado', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>

View File

@ -14,13 +14,6 @@
<input type="number" id="tiradaMin" name="tirada_min" required placeholder="0" maxLength="11" class="form-control" value="<?=old('tirada_min', $tarifamanipuladoEntity->tirada_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="precioMin" class="form-label">
<?=lang('Tarifamanipulado.precioMin') ?>*
</label>
<input type="number" id="precioMin" name="precio_min" required placeholder="0" maxLength="31" step="0.01" class="form-control" value="<?=old('precio_min', $tarifamanipuladoEntity->precio_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="tiradaMax" class="form-label">
<?=lang('Tarifamanipulado.tiradaMax') ?>*
@ -28,6 +21,13 @@
<input type="number" id="tiradaMax" name="tirada_max" required placeholder="0" maxLength="11" class="form-control" value="<?=old('tirada_max', $tarifamanipuladoEntity->tirada_max) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="precioMin" class="form-label">
<?=lang('Tarifamanipulado.precioMin') ?>*
</label>
<input type="number" id="precioMin" name="precio_min" required placeholder="0" maxLength="31" step="0.01" class="form-control" value="<?=old('precio_min', $tarifamanipuladoEntity->precio_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="precioMax" class="form-label">
<?=lang('Tarifamanipulado.precioMax') ?>*
@ -57,7 +57,7 @@
</label>
<textarea rows="3" id="formulaPrice" name="formula_price" required style="height: 10em;" class="form-control"><?=old('formula_price', $tarifamanipuladoEntity->formula_price) ?></textarea>
</div><!--//.mb-3 -->
<?php /*
<div class="mb-3">
<label for="userCreatedId" class="form-label">
<?=lang('Tarifamanipulado.userCreatedId') ?>*
@ -71,7 +71,7 @@
</label>
<input type="number" id="userUpdateId" name="user_update_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_update_id', $tarifamanipuladoEntity->user_update_id) ?>">
</div><!--//.mb-3 -->
*/ ?>
</div><!--//.col -->
</div><!-- //.row -->

View File

@ -15,28 +15,34 @@
<table id="tableOfTarifasmanipulado" class="table table-striped table-hover using-exportable-data-table" style="width: 100%;">
<thead>
<tr>
<?php /*
<th><?= lang('Tarifamanipulado.id') ?></th>
*/ ?>
<th><?= lang('Tarifamanipulado.nombre') ?></th>
<th><?= lang('Tarifamanipulado.tiradaMin') ?></th>
<th><?= lang('Tarifamanipulado.precioMin') ?></th>
<th><?= lang('Tarifamanipulado.tiradaMax') ?></th>
<th><?= lang('Tarifamanipulado.precioMin') ?></th>
<th><?= lang('Tarifamanipulado.precioMax') ?></th>
<th><?= lang('Tarifamanipulado.ajuste') ?></th>
<th><?= lang('Tarifamanipulado.ajusteTotalPedido') ?></th>
<th><?= lang('Tarifamanipulado.formulaPrice') ?></th>
<?php /*
<th><?= lang('Tarifamanipulado.userCreatedId') ?></th>
<th><?= lang('Tarifamanipulado.userUpdateId') ?></th>
<th><?= lang('Tarifamanipulado.createdAt') ?></th>
<th><?= lang('Tarifamanipulado.updatedAt') ?></th>
*/ ?>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($tarifamanipuladoList as $item ) : ?>
<tr>
<?php /*
<td class="align-middle text-center">
<?=$item->id ?>
</td>
*/ ?>
<td class="align-middle">
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
</td>
@ -44,10 +50,10 @@
<?= esc($item->tirada_min) ?>
</td>
<td class="align-middle">
<?= esc($item->precio_min) ?>
<?= esc($item->tirada_max) ?>
</td>
<td class="align-middle">
<?= esc($item->tirada_max) ?>
<?= esc($item->precio_min) ?>
</td>
<td class="align-middle">
<?= esc($item->precio_max) ?>
@ -61,6 +67,7 @@
<td class="align-middle">
<?= empty($item->formula_price) || strlen($item->formula_price) < 51 ? esc($item->formula_price) : character_limiter(esc($item->formula_price), 50) ?>
</td>
<?php /*
<td class="align-middle">
<?= esc($item->user_created_id) ?>
</td>
@ -73,6 +80,7 @@
<td class="align-middle text-nowrap">
<?= empty($item->updated_at) ? '' : date('d/m/Y H:m:s', strtotime($item->updated_at)) ?>
</td>
*/ ?>
<td class="align-middle text-center text-nowrap">
<?=anchor(route_to('editTarifamanipulado', $item->id), lang('Basic.global.edit'), ['class'=>'btn btn-sm btn-warning btn-edit me-1', 'data-id'=>$item->id,]); ?>
<?=anchor('#confirm2delete', lang('Basic.global.Delete'), ['class'=>'btn btn-sm btn-danger btn-delete ms-1', 'data-href'=>route_to('deleteTarifamanipulado', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>

View File

@ -13,7 +13,7 @@
</label>
<input type="number" id="precio" name="precio" required maxLength="31" step="0.01" class="form-control" value="<?=old('precio', $tarifapreimpresionEntity->precio) ?>">
</div><!--//.mb-3 -->
<?php /*
<div class="mb-3">
<label for="userCreatedId" class="form-label">
<?=lang('Tarifapreimpresion.userCreatedId') ?>*
@ -27,7 +27,7 @@
</label>
<input type="number" id="userUpdateId" name="user_update_id" required placeholder="1" maxLength="10" class="form-control" value="<?=old('user_update_id', $tarifapreimpresionEntity->user_update_id) ?>">
</div><!--//.mb-3 -->
*/ ?>
</div><!--//.col -->
</div><!-- //.row -->

View File

@ -15,28 +15,35 @@
<table id="tableOfTarifaspreimpresion" class="table table-striped table-hover using-exportable-data-table" style="width: 100%;">
<thead>
<tr>
<?php /*
<th><?= lang('Tarifapreimpresion.id') ?></th>
*/ ?>
<th><?= lang('Tarifapreimpresion.nombre') ?></th>
<th><?= lang('Tarifapreimpresion.precio') ?></th>
<?php /*
<th><?= lang('Tarifapreimpresion.userCreatedId') ?></th>
<th><?= lang('Tarifapreimpresion.userUpdateId') ?></th>
<th><?= lang('Tarifapreimpresion.createdAt') ?></th>
<th><?= lang('Tarifapreimpresion.updatedAt') ?></th>
*/ ?>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($tarifapreimpresionList as $item ) : ?>
<tr>
<?php /*
<td class="align-middle text-center">
<?=$item->id ?>
</td>
*/ ?>
<td class="align-middle">
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
</td>
<td class="align-middle">
<?= esc($item->precio) ?>
</td>
<?php /*
<td class="align-middle">
<?= esc($item->user_created_id) ?>
</td>
@ -49,6 +56,7 @@
<td class="align-middle text-nowrap">
<?= empty($item->updated_at) ? '' : date('d/m/Y H:m:s', strtotime($item->updated_at)) ?>
</td>
*/ ?>
<td class="align-middle text-center text-nowrap">
<?=anchor(route_to('editTarifapreimpresion', $item->id), lang('Basic.global.edit'), ['class'=>'btn btn-sm btn-warning btn-edit me-1', 'data-id'=>$item->id,]); ?>
<?=anchor('#confirm2delete', lang('Basic.global.Delete'), ['class'=>'btn btn-sm btn-danger btn-delete ms-1', 'data-href'=>route_to('deleteTarifapreimpresion', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>

53
from mac to app.txt Normal file
View File

@ -0,0 +1,53 @@
Pasos para usar ficheros del mac
1.- Copiar controlador, modelo, vistas y entidad
2.- Copiar los ficheros de idioma. Le pone nombre raro (por ejemplo: Manipuladoes.php en lugar de Tarifamanipulado.php). Buscar y reemplazar en todos los ficheros. En este ejemplo: lang('Manipuladoes -> lang('Tarifamanipulado)
3.- Editar los idiomas
4.- En las vistas (formulario y lista) cambiar la segunda linea
Esto: <?= $this->extend("Themes/" . config("Basics")->theme["name"] . "/AdminLayout/defaultLayout") ?>
por esto: <?=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
5.- En las vistas cambiar Themes por themes
6.- Quitar de la tabla la primera columna para que no se repitan los botones. Es decir:
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
<td class="align-middle text-center text-nowrap">
<?=anchor(route_to('editTarifamanipulado', $item->id), lang('Basic.global.edit'), ['class'=>'btn btn-sm btn-warning btn-edit me-1', 'data-id'=>$item->id,]); ?>
<?=anchor('#confirm2delete', lang('Basic.global.Delete'), ['class'=>'btn btn-sm btn-danger btn-delete ms-1', 'data-href'=>route_to('deleteTarifamanipulado', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
</td>
7.- Modificar las fechas de esto: date('mm/dd/YYYY H:i' a esto date('d/m/Y H:m:s'
8.- Cambiar los botones de exportar de sitio: "dom": 'lfrtipB' por "dom": 'lfBrtip'
9.- Poner el botón de añadir debajo del h3 del card header en lugar del footer
10.- Copiar las nuevas rutas
Pasos para añadir el soft delete a una tabla
1.- En la bbdd añadir la columna is_deleted (TINYINT, 4 bits, sin signo, valor predeterminado '0')
2.- En la bbdd añadir la columna deleted_at (TIMESTAMP, permitir NULL, valor predeterminado NULL)
3.- En la entidad añadir a los atributos:
"deleted_at" => null,
"is_deleted" => 0,
4.- En el modelo. Añadir en allowedFields:
"deleted_at",
"is_deleted",
También añadir la variable protected $deletedField = 'deleted_at';
5.- En el controlador:
En el index añadir debajo de $this->view..
// Se indica que este controlador trabaja con soft_delete
$this->soft_delete = true;
// Se indica el flag para los ficheros borrados
$this->delete_flag = 1;
En el edit: justo al principio
// JJO
$session = session();
debajo de $sanitizedData = $this->sanitized($postData, $nullIfEmpty);
// JJO
if(isset($this->model->user_update_id)){
$sanitizedData['user_update_id'] = $session->id_user;
}