From 2cac0df34fe2f008aa5afa96365f4dbd90078bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Tue, 16 May 2023 14:30:32 +0200 Subject: [PATCH] Arreglado el idioma en tablas tarifas acabado, manp y preimp --- ci4/app/Controllers/GoBaseController.php | 5 ++++- ci4/app/Controllers/Tarifas/Tarifaacabado.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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); }