mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'dev/api_il_2'
create migration to add check_presupuesto_cliente column to tarifas tables... See merge request jjimenez/safekat!556
This commit is contained in:
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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) ) :
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -32,4 +32,29 @@ class Intranet extends Controller
|
||||
|
||||
}
|
||||
|
||||
function tickets($resource_name)
|
||||
{
|
||||
helper('file');
|
||||
|
||||
$resource_path = WRITEPATH . 'uploads/tickets/' . $resource_name;
|
||||
|
||||
if (file_exists($resource_path)) {
|
||||
// Get the mime type of the file
|
||||
$mime_type = mime_content_type($resource_path);
|
||||
|
||||
// Get an instance of the Response class
|
||||
$response = service('response');
|
||||
|
||||
// Set the content type
|
||||
$response->setContentType($mime_type);
|
||||
|
||||
// Set the output
|
||||
$response->setBody(file_get_contents($resource_path));
|
||||
|
||||
// Send the response to the browser
|
||||
$response->send();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
429
ci4/app/Controllers/Soporte/Ticketcontroller.php
Normal file
429
ci4/app/Controllers/Soporte/Ticketcontroller.php
Normal file
@ -0,0 +1,429 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Soporte;
|
||||
|
||||
use App\Models\Sistema\SettingsModel;
|
||||
use App\Models\Soporte\TicketModel;
|
||||
use App\Models\CategoriaModel;
|
||||
use App\Models\EstadoModel;
|
||||
use CodeIgniter\Controller;
|
||||
use App\Entities\Soporte\TicketEntity;
|
||||
use App\Models\Soporte\ticketFileModel;
|
||||
|
||||
|
||||
use App\Models\Collection;
|
||||
|
||||
class Ticketcontroller extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
|
||||
protected $modelName = TicketModel::class;
|
||||
protected $format = 'json';
|
||||
|
||||
protected static $singularObjectNameCc = 'ticket';
|
||||
protected static $singularObjectName = 'Ticket';
|
||||
protected static $pluralObjectName = 'Tickets';
|
||||
protected static $controllerSlug = 'ticket';
|
||||
|
||||
protected static $viewPath = 'themes/vuexy/form/soporte/';
|
||||
|
||||
protected $indexRoute = 'TicketIndex';
|
||||
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
|
||||
{
|
||||
$this->viewData['pageTitle'] = lang('Tickets.moduleTitle');
|
||||
|
||||
// Breadcrumbs
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_soporte"), 'route' => "javascript:void(0);", 'active' => false],
|
||||
['title' => lang("App.menu_soporte_ticket_list"), 'route' => route_to('TicketIndex'), 'active' => true]
|
||||
];
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
//checkPermission('tickets.menu');
|
||||
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Tickets.tickets')]),
|
||||
'usingServerSideDataTable' => true,
|
||||
'userType' => auth()->user()->can('tickets.edit') ? 1 : 0,
|
||||
];
|
||||
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
|
||||
return view(static::$viewPath . 'viewTicketList', $viewData);
|
||||
}
|
||||
|
||||
private function sendMail($subject, $body, $recipient)
|
||||
{
|
||||
$settings_model = new SettingsModel();
|
||||
$config = $settings_model->first()->toArray();
|
||||
$gateway = $config['email_gateway'];
|
||||
$body = html_entity_decode($body);
|
||||
|
||||
if ($gateway == 'smtp') {
|
||||
try {
|
||||
//https://codeigniter.com/user_guide/libraries/email.html
|
||||
$email = \Config\Services::email();
|
||||
$config['protocol'] = $config['email_gateway'];
|
||||
$config['SMTPHost'] = $config['email_smtp'];
|
||||
$config['SMTPUser'] = $config['email_address'];
|
||||
$config['SMTPPass'] = $config['email_pass'];
|
||||
$config['SMTPPort'] = intval($config['email_port']);
|
||||
$config['SMTPCrypto'] = $config['email_cert'] == 'none' ? '' : $config['email_cert'];
|
||||
$config['SMTPTimeout'] = 15;
|
||||
$config['mailType'] = 'html';
|
||||
$config['wordWrap'] = true;
|
||||
|
||||
$email->initialize($config);
|
||||
|
||||
$email->setFrom($config['email_address'], $config['email_name']);
|
||||
$email->setTo($recipient);
|
||||
|
||||
$email->setSubject($subject);
|
||||
$email->setMessage($body);
|
||||
|
||||
if (!$email->send()) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} catch (\Exception $ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
|
||||
//checkPermission('tickets.create', $this->indexRoute);
|
||||
|
||||
if ($this->request->getPost()):
|
||||
|
||||
$nullIfEmpty = false; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
|
||||
// get user id
|
||||
$postData['usuario_id'] = auth()->user()->id;
|
||||
$postData['user_soporte_id'] = model('App\Models\Configuracion\ConfigVariableModel')->getVariable('default_soporte_user_id')->value;
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()): // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
|
||||
if ($this->canValidate()):
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->save($sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['errorMessage'] = lang('Basic.global.formErr1', [lang('Basic.global.record')]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
endif;
|
||||
|
||||
$thenRedirect = true; // Change this to false if you want your user to stay on the form after submission
|
||||
endif;
|
||||
if ($noException && $successfulResult):
|
||||
|
||||
$id = $this->model->db->insertID();
|
||||
|
||||
$this->saveImages($id, $this->request->getFiles());
|
||||
|
||||
$message = lang('Basic.global.saveSuccess', [lang('Basic.global.record')]) . '.';
|
||||
|
||||
$userModel = new \App\Models\UserModel();
|
||||
|
||||
$this->sendMail(lang('Tickets.newTicket'), lang('Tickets.newTicketBody') . base_url(route_to('editTicket', $id)), $userModel->find($sanitizedData['user_soporte_id'])->email);
|
||||
|
||||
if ($thenRedirect):
|
||||
if (!empty($this->indexRoute)):
|
||||
return redirect()->to(route_to($this->indexRoute))->with('successMessage', $message);
|
||||
else:
|
||||
return $this->redirect2listView('successMessage', $message);
|
||||
endif;
|
||||
else:
|
||||
$this->session->setFlashData('sweet-success', $message);
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['ticket'] = isset($sanitizedData) ? new TicketEntity($sanitizedData) : new TicketEntity();
|
||||
|
||||
$this->viewData['formAction'] = route_to('NewTicket');
|
||||
|
||||
$this->viewData['categorias'] = $this->model->getCategorias();
|
||||
$this->viewData['estados'] = $this->model->getEstados();
|
||||
$this->viewData['secciones'] = $this->model->getSecciones();
|
||||
|
||||
$this->viewData['supportUsers'] = $this->getSupportUsers();
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('Tickets.ticket') . ' ' . lang('Basic.global.addNewSuffix');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__);
|
||||
} // end function add()
|
||||
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
$modelRespuesta = new \App\Models\Soporte\TicketRespuestaModel();
|
||||
|
||||
if ($requestedId == null):
|
||||
return $this->redirect2listView();
|
||||
endif;
|
||||
$id = filter_var($requestedId, FILTER_SANITIZE_URL);
|
||||
$ticket = $this->model->find($id);
|
||||
|
||||
if ($ticket == false):
|
||||
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Tickets.ticket')), $id]);
|
||||
return $this->redirect2listView('errorMessage', $message);
|
||||
endif;
|
||||
|
||||
if (!auth()->user()->can('Tickets.edit') && auth()->user()->id != $ticket->usuario_id) {
|
||||
return redirect()->to(route_to('TicketIndex'))->with('errorMessage', lang('Basic.global.noPermission'));
|
||||
}
|
||||
|
||||
if ($this->request->getPost()):
|
||||
|
||||
$oldUserSupport = $ticket->user_soporte_id;
|
||||
$oldState = $ticket->estado_id;
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
$sanitizedData = $this->sanitized($postData, false);
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()): // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
if ($this->canValidate()):
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->update($id, $sanitizedData);
|
||||
|
||||
$this->saveImages($id, $this->request->getFiles());
|
||||
|
||||
if (auth()->user()->can('Tickets.edit')) {
|
||||
|
||||
$respuesta = $modelRespuesta->where('ticket_id', $id)->first();
|
||||
if ($respuesta == null) {
|
||||
$modelRespuesta->insert([
|
||||
'ticket_id' => $id,
|
||||
'usuario_id' => auth()->user()->id,
|
||||
'mensaje' => $sanitizedData['respuesta_mensaje']
|
||||
]);
|
||||
} else {
|
||||
$modelRespuesta->update($respuesta->id, [
|
||||
'mensaje' => $sanitizedData['respuesta_mensaje'],
|
||||
'usuario_id' => auth()->user()->id,
|
||||
]);
|
||||
}
|
||||
|
||||
// envio de correos
|
||||
$userModel = new \App\Models\UserModel();
|
||||
if ($oldUserSupport != $sanitizedData['user_soporte_id']) {
|
||||
$this->sendMail(lang('Tickets.asgignToChanged'), lang('Tickets.asgignToChangedBody') . base_url(route_to('editTicket', $id)), $userModel->find($sanitizedData['user_soporte_id'])->email);
|
||||
}
|
||||
|
||||
if ($oldState != $sanitizedData['estado_id']) {
|
||||
$this->sendMail(lang('Tickets.stateChange'), lang('Tickets.stateChangeBody') . base_url(route_to('editTicket', $id)), $userModel->find($ticket->usuario_id)->email);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else:
|
||||
$this->viewData['warningMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Tickets.ticket'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
|
||||
endif;
|
||||
|
||||
$ticket->fill($sanitizedData);
|
||||
|
||||
$thenRedirect = false;
|
||||
endif;
|
||||
if ($noException && $successfulResult):
|
||||
$id = $ticket->id ?? $id;
|
||||
$message = lang('Basic.global.updateSuccess', [lang('Basic.global.record')]) . '.';
|
||||
|
||||
if ($thenRedirect):
|
||||
if (!empty($this->indexRoute)):
|
||||
return redirect()->to(route_to($this->indexRoute))->with('successMessage', $message);
|
||||
else:
|
||||
return $this->redirect2listView('successMessage', $message);
|
||||
endif;
|
||||
else:
|
||||
return redirect()->to(route_to("editTicket", $id))->with('successMessage', $message);
|
||||
//$this->session->setFlashData('sweet-success', $message);
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
$this->viewData['ticket'] = $ticket;
|
||||
$this->viewData['respuesta'] = $modelRespuesta->where('ticket_id', $id)->first();
|
||||
|
||||
$this->viewData['formAction'] = route_to('updateTicket', $id);
|
||||
|
||||
$this->viewData['categorias'] = $this->model->getCategorias();
|
||||
$this->viewData['estados'] = $this->model->getEstados();
|
||||
$this->viewData['secciones'] = $this->model->getSecciones();
|
||||
$this->viewData['supportUsers'] = $this->getSupportUsers();
|
||||
|
||||
$this->viewData['imagesTicket'] = $this->getImages('ticket', $id);
|
||||
$this->viewData['imagesRespuesta'] = $this->getImages('respuesta', $id);
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('Tickets.ticket') . ' ' . lang('Basic.global.edit3');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__, $id);
|
||||
} // end function edit(...)
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
if ($this->request->isAJAX()) {
|
||||
$reqData = $this->request->getPost();
|
||||
if (!isset($reqData['draw']) || !isset($reqData['columns'])) {
|
||||
$errstr = 'No data available in response to this specific request.';
|
||||
$response = $this->respond(Collection::datatable([], 0, 0, $errstr), 400, $errstr);
|
||||
return $response;
|
||||
}
|
||||
$start = $reqData['start'] ?? 0;
|
||||
$length = $reqData['length'] ?? 5;
|
||||
|
||||
$requestedOrder = $reqData['order'] ?? [];
|
||||
|
||||
$searchValues = get_filter_datatables_columns($reqData);
|
||||
|
||||
if (auth()->user()->can('tickets.edit')) {
|
||||
$user_id = null;
|
||||
} else {
|
||||
$user_id = auth()->user()->id;
|
||||
}
|
||||
|
||||
$resourceData = $this->model->getResource($searchValues, $user_id);
|
||||
foreach ($requestedOrder as $order) {
|
||||
$column = $order['column'] ?? 0;
|
||||
$dir = $order['dir'] ?? 'asc';
|
||||
$orderColumn = $this->model::SORTABLE[$column] ?? null;
|
||||
if ($orderColumn) {
|
||||
$resourceData->orderBy($orderColumn, $dir);
|
||||
}
|
||||
}
|
||||
$resourceData = $resourceData->limit($length, $start)->get()->getResultObject();
|
||||
|
||||
return $this->respond(Collection::datatable(
|
||||
$resourceData,
|
||||
$this->model->getResource($searchValues)->countAllResults(),
|
||||
$this->model->getResource($searchValues)->countAllResults()
|
||||
));
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
public function image($imageName)
|
||||
{
|
||||
$filePath = WRITEPATH . "uploads/tickets/" . $imageName;
|
||||
|
||||
if (!file_exists($filePath)) {
|
||||
return $this->response->setStatusCode(404, 'Imagen no encontrada');
|
||||
}
|
||||
|
||||
$mimeType = mime_content_type($filePath);
|
||||
|
||||
return $this->response
|
||||
->setHeader('Content-Type', $mimeType)
|
||||
->setBody(file_get_contents($filePath));
|
||||
}
|
||||
|
||||
private function saveImages($ticket_id, $files = [])
|
||||
{
|
||||
$uploadPath = WRITEPATH . 'uploads/tickets/';
|
||||
|
||||
$fileModel = new ticketFileModel();
|
||||
|
||||
if ($files && isset($files['files'])) {
|
||||
foreach ($files['files'] as $file) {
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$originalName = $file->getClientName();
|
||||
$fileExt = $file->getExtension();
|
||||
|
||||
// Generar hash SHA-256 basado en el contenido del archivo
|
||||
$fileHash = hash_file("sha256", $file->getTempName());
|
||||
$newFileName = $fileHash . '.' . $fileExt;
|
||||
|
||||
// Mover el archivo con el nombre basado en el hash
|
||||
$file->move($uploadPath, $newFileName);
|
||||
|
||||
// Guardar en la base de datos
|
||||
$fileModel->insert([
|
||||
'nombre' => $originalName,
|
||||
'ticket_id' => $ticket_id,
|
||||
'hash' => $fileHash,
|
||||
'path' => 'uploads/tickets/' . $newFileName
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function getImages($tipo = 'ticket', $id = null)
|
||||
{
|
||||
$images = [];
|
||||
|
||||
$model = new ticketFileModel();
|
||||
if ($tipo == 'ticket') {
|
||||
$files = $model->where('ticket_id', $id)->findAll();
|
||||
foreach ($files as $file) {
|
||||
$ext = pathinfo($file['nombre'], PATHINFO_EXTENSION);
|
||||
array_push($images, array(
|
||||
"path" => '/soporte/image/' . $file['hash'] . "." . $ext,
|
||||
"name" => $file['nombre']
|
||||
));
|
||||
}
|
||||
} else {
|
||||
$files = $model->where('respuesta_id', $id)->findAll();
|
||||
foreach ($files as $file) {
|
||||
$ext = pathinfo($file['nombre'], PATHINFO_EXTENSION);
|
||||
array_push($images, array(
|
||||
"path" => '/soporte/image/' . $file['hash'] . "." . $ext,
|
||||
"name" => $file['nombre']
|
||||
));
|
||||
}
|
||||
}
|
||||
return $images;
|
||||
}
|
||||
|
||||
private function getSupportUsers()
|
||||
{
|
||||
$defatulSoporteUserId = model('App\Models\Configuracion\ConfigVariableModel')->getVariable('default_soporte_user_id')->value;
|
||||
$supportUsers = array(
|
||||
array(
|
||||
'id' => $defatulSoporteUserId,
|
||||
'name' => model('App\Models\UserModel')->getFullName($defatulSoporteUserId)
|
||||
),
|
||||
array(
|
||||
'id' => 2,
|
||||
'name' => model('App\Models\UserModel')->getFullName(2)
|
||||
),
|
||||
array(
|
||||
'id' => 1,
|
||||
'name' => model('App\Models\UserModel')->getFullName(1)
|
||||
),
|
||||
);
|
||||
|
||||
return $supportUsers;
|
||||
}
|
||||
}
|
||||
@ -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()) :
|
||||
|
||||
@ -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()) :
|
||||
|
||||
Reference in New Issue
Block a user