diff --git a/ci4/app/Controllers/GoBaseController.php b/ci4/app/Controllers/GoBaseController.php index 04a9709c..4871358b 100644 --- a/ci4/app/Controllers/GoBaseController.php +++ b/ci4/app/Controllers/GoBaseController.php @@ -323,12 +323,15 @@ abstract class GoBaseController extends Controller { if (!isset($error)) : try { - if ($deletePermanently) : + if ($deletePermanently && !$isDelete) : if (is_numeric($id)) : $rawResult = $this->primaryModel->delete($id); else: $rawResult = $this->primaryModel->where($this->primaryModel->getPrimaryKeyName(), $id)->delete(); endif; + elseif ($isDelete): + + else: $rawResult = $this->primaryModel->update($id, ['deleted' => true]); endif; diff --git a/ci4/app/Controllers/Tarifas/Tarifaacabado.php b/ci4/app/Controllers/Tarifas/Tarifaacabado.php index 3f5e3940..ca9dca1f 100644 --- a/ci4/app/Controllers/Tarifas/Tarifaacabado.php +++ b/ci4/app/Controllers/Tarifas/Tarifaacabado.php @@ -21,6 +21,7 @@ class Tarifaacabado extends \App\Controllers\GoBaseController { public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) { $this->viewData['pageTitle'] = lang('Tarifaacabado.moduleTitle'); + $this->isDelete = true; parent::initController($request, $response, $logger); }