Merge branch 'main' into 'feat/soporte'

create migration to add check_presupuesto_cliente column to tarifas tables...

See merge request jjimenez/safekat!554
This commit is contained in:
2025-02-20 08:59:47 +00:00
45 changed files with 384 additions and 63 deletions

View File

@ -766,4 +766,11 @@ class ChatController extends BaseController
$this->chatModel->setAsUnviewedChatUserNotifications($chat_id, auth()->user()->id);
return $this->response->setJSON(["message" => "ok", "status" => true]);
}
public function store_chat_error_message()
{
$bodyData = $this->request->getPost();
$messageService = service('messages');
$r = $messageService->createErrorMessagePresupuesto("Error",$bodyData['presupuesto_id']);
return $this->response->setJSON(["message" => "ok","data" => $r]);
}
}

View File

@ -156,6 +156,9 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
if ($this->request->getPost('show_in_client') == null) {
$sanitizedData['show_in_client'] = false;
}
if ($this->request->getPost('activo') == null) {
$sanitizedData['activo'] = false;
}
if ($this->request->getPost('show_in_client_special') == null) {
$sanitizedData['show_in_client_special'] = false;
}
@ -163,6 +166,9 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
if ($sanitizedData['show_in_client_special']) {
$sanitizedData['show_in_client'] = true;
}
if ($sanitizedData['activo']) {
$sanitizedData['activo'] = true;
}
$noException = true;
if ($successfulResult = $this->canValidate()): // if ($successfulResult = $this->validate($this->formValidationRules) ) :

View File

@ -18,6 +18,7 @@ use App\Models\Presupuestos\PresupuestoModel;
use App\Models\Presupuestos\PresupuestoPreimpresionesModel;
use App\Models\Presupuestos\PresupuestoServiciosExtraModel;
use App\Models\Presupuestos\ErrorPresupuesto;
use App\Services\MessageService;
use App\Services\PresupuestoClienteService;
use App\Services\PresupuestoService;
use Exception;
@ -42,7 +43,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
protected $indexRoute = 'listaPresupuestos';
protected MessageService $messageService;
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
{
@ -61,6 +62,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
['title' => lang("App.menu_presupuestos"), 'route' => "javascript:void(0);", 'active' => false],
['title' => "Listado", 'route' => site_url('presupuestocliente/list'), 'active' => true]
];
$this->messageService = service('messages');
parent::initController($request, $response, $logger);
$this->model = new PresupuestoModel();

View File

@ -65,7 +65,9 @@ class Tarifaextra extends \App\Controllers\GoBaseController
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
$sanitizedData['mostrar_en_presupuesto'] = false;
}
if ($this->request->getPost('mostrar_en_presupuesto_cliente') == null) {
$sanitizedData['mostrar_en_presupuesto_cliente'] = false;
}
$noException = true;
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
@ -142,7 +144,9 @@ class Tarifaextra extends \App\Controllers\GoBaseController
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
$sanitizedData['mostrar_en_presupuesto'] = false;
}
if ($this->request->getPost('mostrar_en_presupuesto_cliente') == null) {
$sanitizedData['mostrar_en_presupuesto_cliente'] = false;
}
$noException = true;
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
if ($this->canValidate()) :

View File

@ -63,7 +63,9 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
$sanitizedData['mostrar_en_presupuesto'] = false;
}
if ($this->request->getPost('mostrar_en_presupuesto_cliente') == null) {
$sanitizedData['mostrar_en_presupuesto_cliente'] = false;
}
$noException = true;
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
@ -144,7 +146,9 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
$sanitizedData['mostrar_en_presupuesto'] = false;
}
if ($this->request->getPost('mostrar_en_presupuesto_cliente') == null) {
$sanitizedData['mostrar_en_presupuesto_cliente'] = false;
}
$noException = true;
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
if ($this->canValidate()) :