mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en la vista
This commit is contained in:
@ -541,6 +541,15 @@ $routes->group('cosidotapablanda', ['namespace' => 'App\Controllers\Presupuestos
|
||||
});
|
||||
$routes->resource('cosidotapablanda', ['namespace' => 'App\Controllers\Presupuestos', 'controller' => 'Cosidotapablanda', 'except' => 'show,new,create,update']);
|
||||
|
||||
$routes->group('presupuestocliente', ['namespace' => 'App\Controllers\Presupuestos'], function ($routes) {
|
||||
$routes->get('list/(:num)', 'Presupuestocliente::list/$1', ['as' => 'listarPresupuestoCliente']); // HOMOGENIZAR CON ARGS DINAMICOS!!!
|
||||
$routes->get('add', 'Presupuestocliente::add', ['as' => 'nuevoPresupuestoCliente']);
|
||||
$routes->post('add', 'Presupuestocliente::add', ['as' => 'crearPresupuestoCliente']);
|
||||
$routes->post('edit/(:num)', 'Presupuestocliente::edit/$1', ['as' => 'editarPresupuestoCliente']);
|
||||
$routes->post('datatable', 'Cosidotapablanda::datatable', ['as' => 'tablaPresupuestosCliente']);
|
||||
});
|
||||
$routes->resource('presupuestocliente', ['namespace' => 'App\Controllers\Presupuestos', 'controller' => 'Presupuestocliente', 'except' => 'show,new,create,update']);
|
||||
|
||||
$routes->group('serviciosacabados', ['namespace' => 'App\Controllers\Presupuestos'], function ($routes) {
|
||||
$routes->post('datatable', 'Presupuestoacabados::datatable', ['as' => 'dataTableOfPresupuestoAcabados']);
|
||||
$routes->post('edit/(:num)', 'Presupuestoacabados::edit/$1', ['as' => 'updatePresupuestoacabados']);
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Presupuestos;
|
||||
use App\Controllers\BaseController;
|
||||
|
||||
|
||||
class PresupuestoInterfazCliente extends BaseController
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
$data['title'] = [
|
||||
'module' => lang("App.settings_title"),
|
||||
'page' => lang("App.settings_subtitle"),
|
||||
'icon' => 'fas fa-sliders-h'
|
||||
];
|
||||
|
||||
$data['breadcrumb'] = [
|
||||
['title' => lang("App.menu_presupuesto"), 'route' => site_url('presupuesto'), 'active' => true]
|
||||
];
|
||||
|
||||
echo view(getenv('theme.path').'form/presupuestos/index', $data);
|
||||
}
|
||||
|
||||
public function tapa_blanda_encolada()
|
||||
{
|
||||
|
||||
$data['title'] = [
|
||||
'module' => lang("App.settings_title"),
|
||||
'page' => lang("App.settings_subtitle"),
|
||||
'icon' => 'fas fa-sliders-h'
|
||||
];
|
||||
|
||||
$data['breadcrumb'] = [
|
||||
['title' => lang("App.menu_presupuesto"), 'route' => site_url('presupuesto'), 'active' => false],
|
||||
['title' => lang("App.menu_presupuesto"), 'route' => site_url('presupuesto/tapa_blanda_encolada'), 'active' => true]
|
||||
];
|
||||
|
||||
echo view(getenv('theme.path').'form/presupuestos/tapa-blanda-encolada', $data);
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
555
ci4/app/Controllers/Presupuestos/Presupuestocliente.php
Executable file
555
ci4/app/Controllers/Presupuestos/Presupuestocliente.php
Executable file
@ -0,0 +1,555 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Presupuestos;
|
||||
|
||||
use App\Models\Collection;
|
||||
|
||||
use App\Entities\Presupuestos\PresupuestoEntity;
|
||||
use App\Models\Presupuestos\PresupuestoDireccionesModel;
|
||||
use App\Models\Presupuestos\PresupuestoModel;
|
||||
|
||||
use App\Models\Configuracion\TipoPresupuestoModel;
|
||||
|
||||
use App\Models\Presupuestos\PresupuestoLineaModel;
|
||||
|
||||
use App\Models\Presupuestos\PresupuestoEncuadernacionesModel;
|
||||
use App\Models\Presupuestos\PresupuestoAcabadosModel;
|
||||
use App\Models\Presupuestos\PresupuestoManipuladosModel;
|
||||
use App\Models\Presupuestos\PresupuestoPreimpresionesModel;
|
||||
use App\Models\Presupuestos\PresupuestoServiciosExtraModel;
|
||||
|
||||
use App\Services\PresupuestoService;
|
||||
use App\Models\Configuracion\PapelGenericoModel;
|
||||
use App\Models\Configuracion\PapelImpresionModel;
|
||||
use App\Models\Configuracion\MaquinaModel;
|
||||
|
||||
use Exception;
|
||||
|
||||
class Presupuestocliente extends \App\Controllers\GoBaseResourceController
|
||||
{
|
||||
protected $modelName = "PresupuestoModel";
|
||||
protected $format = 'json';
|
||||
|
||||
protected static $singularObjectName = 'Presupuesto';
|
||||
protected static $singularObjectNameCc = 'Presupuestocliente';
|
||||
protected static $pluralObjectName = 'Presupuesto';
|
||||
protected static $pluralObjectNameCc = 'Presupuestoscliente';
|
||||
|
||||
protected static $controllerSlug = 'presupuestocliente';
|
||||
|
||||
protected static $viewPath = 'themes/backend/vuexy/form/presupuestos/cliente/';
|
||||
|
||||
protected $indexRoute = 'cosidotapablandaList';
|
||||
|
||||
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
|
||||
{
|
||||
|
||||
$this->viewData['usingSweetAlert'] = true;
|
||||
|
||||
// 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;
|
||||
|
||||
$this->viewData = ['usingServerSideDataTable' => true]; // JJO
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->model = new PresupuestoModel();
|
||||
}
|
||||
|
||||
|
||||
public function list($tipo_impresion_id = 4)
|
||||
{
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Presupuestos.presupuesto')]),
|
||||
'presupuestoEntity' => new PresupuestoEntity(),
|
||||
'usingServerSideDataTable' => true,
|
||||
'tipo_impresion_id' => $tipo_impresion_id
|
||||
];
|
||||
|
||||
$viewData = array_merge($viewData, $this->getStringsFromTipoImpresion($tipo_impresion_id));
|
||||
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
|
||||
|
||||
return view(static::$viewPath . 'viewCosidotapablandaList', $viewData);
|
||||
}
|
||||
|
||||
|
||||
public function add()
|
||||
{
|
||||
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_created_id'] = $session->id_user;
|
||||
|
||||
if (!isset($sanitizedData['papel_formato_id']) || $sanitizedData['papel_formato_id'] == null) {
|
||||
$sanitizedData['papel_formato_id'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($sanitizedData['is_duplicado']) || $sanitizedData['is_duplicado'] == null) {
|
||||
$sanitizedData['is_duplicado'] = 0;
|
||||
}
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate($this->model->validationRulesAdd, $this->model->validationMessagesAdd)) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
if ($this->canValidate($this->model->validationRulesAdd, $this->model->validationMessagesAdd)) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->save($sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else :
|
||||
$this->viewData['errorMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Presupuestos.presupuesto'))]);
|
||||
$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();
|
||||
|
||||
$message = lang('Basic.global.saveSuccess', [lang('Basic.global.record')]) . '.';
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
//return redirect()->to(route_to( $this->indexRoute ) )->with('sweet-success', $message);
|
||||
return redirect()->to(site_url('presupuestos/cliente/edit/' . $id))->with('sweet-success', $message);
|
||||
else :
|
||||
return $this->redirect2listView('sweet-success', $message);
|
||||
endif;
|
||||
else :
|
||||
$this->session->setFlashData('sweet-success', $message);
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
// Se obtiene el cliente ID a partir del usuario de la sesion
|
||||
$clienteId = 999; // Fijo hasta desarollar clientes usuarios
|
||||
|
||||
|
||||
$presupuestoEntity = isset($sanitizedData) ? new PresupuestoEntity($sanitizedData) : new PresupuestoEntity();
|
||||
$presupuestoEntity->POD = model('App\Models\Configuracion\ConfiguracionSistemaModel')->getPOD();
|
||||
$presupuestoEntity->clienteId = $clienteId;
|
||||
|
||||
$this->viewData['formAction'] = route_to('crearPresupuestoCliente');
|
||||
|
||||
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . $this->viewData['pageTitle'] . ' ' . lang('Basic.global.addNewSuffix');
|
||||
|
||||
return $this->displayForm(__METHOD__);
|
||||
} // end function add()
|
||||
|
||||
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
endif;
|
||||
$id = filter_var($requestedId, FILTER_SANITIZE_URL);
|
||||
$presupuestoEntity = $this->model->find($id);
|
||||
|
||||
if ($presupuestoEntity == false) :
|
||||
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Presupuestos.presupuesto')), $id]);
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
if ($requestMethod === 'post') :
|
||||
|
||||
$nullIfEmpty = true; // !(phpversion() >= '8.1');
|
||||
|
||||
$postData = $this->request->getPost();
|
||||
|
||||
$postData['updated_at'] = gmdate('Y-m-d H:m:s', time());
|
||||
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
// JJO
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
|
||||
if ($this->request->getPost('is_duplicado') == null) {
|
||||
$sanitizedData['is_duplicado'] = 0;
|
||||
}
|
||||
|
||||
if ($this->request->getPost('retractilado') == null) {
|
||||
$sanitizedData['retractilado'] = false;
|
||||
}
|
||||
if ($this->request->getPost('retractilado5') == null) {
|
||||
$sanitizedData['retractilado5'] = false;
|
||||
}
|
||||
if ($this->request->getPost('ferro') == null) {
|
||||
$sanitizedData['ferro'] = false;
|
||||
}
|
||||
if ($this->request->getPost('ferro_digital') == null) {
|
||||
$sanitizedData['ferro_digital'] = false;
|
||||
}
|
||||
if ($this->request->getPost('prototipo') == null) {
|
||||
$sanitizedData['prototipo'] = false;
|
||||
}
|
||||
if ($this->request->getPost('marcapaginas') == null) {
|
||||
$sanitizedData['marcapaginas'] = false;
|
||||
}
|
||||
if ($this->request->getPost('faja_color') == null) {
|
||||
$sanitizedData['faja_color'] = false;
|
||||
}
|
||||
if ($this->request->getPost('papel_formato_personalizado') == null) {
|
||||
$sanitizedData['papel_formato_personalizado'] = false;
|
||||
}
|
||||
|
||||
if ($this->request->getPost('papel_formato_id') == null) {
|
||||
$sanitizedData['papel_formato_id'] = 0;
|
||||
}
|
||||
|
||||
if ($this->request->getPost('solapas') == null) {
|
||||
$sanitizedData['solapas'] = 0;
|
||||
}
|
||||
if ($this->request->getPost('solapas_sobrecubierta') == null) {
|
||||
$sanitizedData['solapas_sobrecubierta'] = 0;
|
||||
}
|
||||
|
||||
$noException = true;
|
||||
if (
|
||||
$sanitizedData['papel_formato_id'] == null && $sanitizedData['papel_formato_ancho'] == null
|
||||
&& $sanitizedData['papel_formato_alto'] == null
|
||||
) {
|
||||
if ($this->request->isAJAX()) {
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'errorMensaje' => lang('Presupuestos.errores.formato_papel'),
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
$this->session->setFlashData('errorMessage', lang('Presupuestos.errores.formato_papel'));
|
||||
}
|
||||
$successfulResult = false;
|
||||
} else {
|
||||
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) )
|
||||
|
||||
if ($this->canValidate()) :
|
||||
try {
|
||||
$successfulResult = $this->model->skipValidation(true)->update($id, $sanitizedData);
|
||||
} catch (\Exception $e) {
|
||||
$noException = false;
|
||||
$this->dealWithException($e);
|
||||
}
|
||||
else :
|
||||
$this->viewData['warningMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Presupuestos.presupuesto'))]);
|
||||
$this->session->setFlashdata('formErrors', $this->model->errors());
|
||||
|
||||
endif;
|
||||
|
||||
$presupuestoEntity->fill($sanitizedData);
|
||||
|
||||
$thenRedirect = false;
|
||||
endif;
|
||||
}
|
||||
|
||||
if ($noException && $successfulResult) :
|
||||
$id = $presupuestoEntity->id ?? $id;
|
||||
$message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('Presupuestos.presupuesto'))]) . '.';
|
||||
|
||||
if ($thenRedirect) :
|
||||
if (!empty($this->indexRoute)) :
|
||||
return redirect()->to(route_to($this->indexRoute))->with('sweet-success', $message);
|
||||
else :
|
||||
if ($this->request->isAJAX()) {
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'mensaje' => $message,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
return $this->redirect2listView('sweet-success', $message);
|
||||
}
|
||||
|
||||
endif;
|
||||
else :
|
||||
if ($this->request->isAJAX()) {
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'mensaje' => $message,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
return $this->respond($data);
|
||||
} else {
|
||||
$this->session->setFlashData('sweet-success', $message);
|
||||
}
|
||||
endif;
|
||||
|
||||
endif; // $noException && $successfulResult
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
/*
|
||||
$this->viewData['presupuestoId'] = $id;
|
||||
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
||||
$this->viewData['isCosido'] = (new TipoPresupuestoModel())->get_isCosido($presupuestoEntity->tipo_impresion_id);
|
||||
$this->viewData['isTapaDura'] = (new TipoPresupuestoModel())->get_isTapaDura($presupuestoEntity->tipo_impresion_id);
|
||||
|
||||
if (!is_null($presupuestoEntity->comparador_json_data))
|
||||
$this->viewData['comp_data'] = json_decode($presupuestoEntity->comparador_json_data);
|
||||
else
|
||||
$this->viewData['comp_data'] = "";
|
||||
|
||||
$this->viewData['clienteList'] = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
|
||||
$this->viewData['paisList'] = $this->getPaisListItems();
|
||||
$this->viewData['ccaaList'] = $this->getCcaaListItems();
|
||||
|
||||
$this->viewData['clienteList'] = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
|
||||
$this->viewData['incReiList'] = array('incidencia' => lang('Presupuestos.incidencia'), 'reimpresion' => lang('Presupuestos.reimpresion'), 'sin_cargo' => lang('Presupuestos.sinCargo'));
|
||||
$this->viewData['papelFormatoList'] = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null);
|
||||
$this->viewData['papelGenericoNegroList'] = $this->getPapelGenericoNegro();
|
||||
$this->viewData['papelGenericoNegroHQList'] = $this->getPapelGenericoNegroHQ();
|
||||
$this->viewData['papelGenericoColorList'] = $this->getPapelGenericoColor();
|
||||
$this->viewData['papelGenericoColorHQList'] = $this->getPapelGenericoColorHQ();
|
||||
$this->viewData['papelGenericoCubiertaList'] = $this->getPapelGenericoCubierta();
|
||||
$this->viewData['papelGenericoGuardasList'] = $this->getPapelGenericoGuardas();
|
||||
$this->viewData['papelGenericoSobrecubiertaList'] = $this->getPapelGenericoSobreCubierta();
|
||||
$this->viewData['papelGenericoRotativaNegroList'] = $this->getPapelGenericoRotativaNegro();
|
||||
$this->viewData['papelGenericoRotativaColorList'] = $this->getPapelGenericoRotativaColor();
|
||||
|
||||
// Acabados exteriores
|
||||
$this->viewData['acabadosCubierta'] = $this->getAcabadosCubierta();
|
||||
$this->viewData['acabadosSobrecubierta'] = $this->getAcabadosSobrecubierta();
|
||||
|
||||
// Lineas Presupuesto
|
||||
[$cambios_lineas, $this->viewData['lineasPresupuesto']] = $this->getLineasPresupuesto($presupuestoEntity);
|
||||
$this->viewData['presupuestoEntity']->cambios_lineas=$cambios_lineas;
|
||||
|
||||
// Servicios
|
||||
$this->viewData['serviciosPreimpresion'] = $this->getServiciosPreimpresion();
|
||||
$this->viewData['serviciosEncuadernacion'] = $this->getServiciosEncuadernacion();
|
||||
$this->viewData['serviciosManipulado'] = $this->getServiciosManipulado();
|
||||
$this->viewData['serviciosAcabado'] = $this->getServiciosAcabado();
|
||||
$this->viewData['serviciosExtra'] = $this->getServiciosExtra();
|
||||
|
||||
[$cambios_en_servicios, $servicios] = $this->getLineasServicios($presupuestoEntity);
|
||||
$this->viewData['presupuestoEntity']->cambios_servicios=$cambios_en_servicios;
|
||||
|
||||
$this->viewData['serviciosEncuadernacionList'] = $servicios->serviciosEncuadernacion;
|
||||
$this->viewData['serviciosAcabadosList'] = $servicios->serviciosAcabado;
|
||||
$this->viewData['serviciosManipuladoList'] = $servicios->serviciosManipulado;
|
||||
$this->viewData['serviciosPreimpresionList'] = $servicios->serviciosPreimpresion;
|
||||
$this->viewData['serviciosExtraList'] = $servicios->serviciosExtra;
|
||||
|
||||
// Direciones presupuesto
|
||||
[$cambios_en_direcciones, $this->viewData['direccionesList']] = $this->getLineasDirecciones($presupuestoEntity);
|
||||
$this->viewData['presupuestoEntity']->cambios_direcciones=$cambios_en_direcciones;
|
||||
|
||||
$this->viewData['POD'] = $this->getPOD();
|
||||
|
||||
$this->viewData['serviciosAutomaticos'] = [
|
||||
'retractilado' => 3,
|
||||
'retractilado5' => 5,
|
||||
'ferro' => 24,
|
||||
'prototipo' => 9,
|
||||
'fajaColor' => 16,
|
||||
'plegadoGuardas' => 62,
|
||||
];
|
||||
|
||||
$this->viewData['tipo_impresion_id'] = $presupuestoEntity->tipo_impresion_id; // Cosido tapa blanda JJO
|
||||
|
||||
$this->viewData = array_merge($this->viewData, $this->getStringsFromTipoImpresion($presupuestoEntity->tipo_impresion_id));
|
||||
|
||||
$this->viewData['formAction'] = route_to('updateCosidotapablanda', $id);
|
||||
|
||||
// Si se ha llamado a esta funcion porque se ha duplicado el presupuesto
|
||||
// se actualiza la bbdd para que sólo ejecute algunas funciones una vez
|
||||
if($presupuestoEntity->is_duplicado){
|
||||
$this->model->removeIsDuplicado($presupuestoEntity->id);
|
||||
}
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . $this->viewData['pageTitle'] . ' ' . lang('Basic.global.edit3');
|
||||
*/
|
||||
return $this->displayForm(__METHOD__, $id);
|
||||
} // end function edit(...)
|
||||
|
||||
|
||||
/**
|
||||
* Delete the designated resource object from the model.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return array an array
|
||||
*/
|
||||
public function delete($id = null)
|
||||
{
|
||||
if (!empty(static::$pluralObjectNameCc) && !empty(static::$singularObjectNameCc)) {
|
||||
$objName = mb_strtolower(lang(ucfirst(static::$pluralObjectNameCc).'.'.static::$singularObjectNameCc));
|
||||
} else {
|
||||
$objName = lang('Basic.global.record');
|
||||
}
|
||||
|
||||
if (!$this->soft_delete){
|
||||
|
||||
if (!$this->model->delete($id)) {
|
||||
return $this->failNotFound(lang('Basic.global.deleteError', [$objName]));
|
||||
}
|
||||
}
|
||||
else{
|
||||
$datetime = (new \CodeIgniter\I18n\Time("now"));
|
||||
$rawResult = $this->model->where('id',$id)
|
||||
->set(['deleted_at' => $datetime->format('Y-m-d H:i:s'),
|
||||
'is_deleted' => $this->delete_flag])
|
||||
->update();
|
||||
if (!$rawResult) {
|
||||
return $this->failNotFound(lang('Basic.global.deleteError', [$objName]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Se borran las lineas de presupuesto
|
||||
$model = new PresupuestoLineaModel();
|
||||
$model->where("presupuesto_id", $id)->delete();
|
||||
|
||||
// Se borran las direcciones de presupuesto
|
||||
$model = new PresupuestoDireccionesModel();
|
||||
$model->where("presupuesto_id", $id)->delete();
|
||||
|
||||
// Se borran los servicios de acabado
|
||||
$model = new PresupuestoAcabadosModel();
|
||||
$model->where("presupuesto_id", $id)->delete();
|
||||
|
||||
// Se borran los servicios de preimpresion
|
||||
$model = new PresupuestoPreimpresionesModel();
|
||||
$model->where("presupuesto_id", $id)->delete();
|
||||
|
||||
// Se borran los servicios de encuadernacion
|
||||
$model = new PresupuestoEncuadernacionesModel();
|
||||
$model->where("presupuesto_id", $id)->delete();
|
||||
|
||||
// Se borran los servicios de manipulado
|
||||
$model = new PresupuestoManipuladosModel();
|
||||
$model->where("presupuesto_id", $id)->delete();
|
||||
|
||||
// Se borran los servicios extra
|
||||
$model = new PresupuestoServiciosExtraModel();
|
||||
$model->where("presupuesto_id", $id)->delete();
|
||||
|
||||
// $message = lang('Basic.global.deleteSuccess', [$objName]); IMN commented
|
||||
$message = lang('Basic.global.deleteSuccess', [lang('Basic.global.record')]);
|
||||
$response = $this->respondDeleted(['id' => $id, 'msg' => $message]);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
if ($this->request->isAJAX()) {
|
||||
$reqData = $this->request->getPost();
|
||||
|
||||
$type = $reqData['type'] ?? null;
|
||||
|
||||
if (is_null($type)) {
|
||||
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;
|
||||
}
|
||||
$search = $reqData['search']['value'];
|
||||
}
|
||||
$start = $reqData['start'] ?? 0;
|
||||
$length = $reqData['length'] ?? 5;
|
||||
|
||||
$requestedOrder1 = $reqData['order']['0']['column'] ?? 0;
|
||||
$order1 = PresupuestoModel::SORTABLE[$requestedOrder1 >= 0 ? $requestedOrder1 : 0];
|
||||
$dir1 = $reqData['order']['0']['dir'] ?? 'asc';
|
||||
$requestedOrder2 = $reqData['order']['1']['column'] ?? 0;
|
||||
$order2 = PresupuestoModel::SORTABLE[$requestedOrder2 >= 0 ? $requestedOrder1 : 0];
|
||||
$dir2 = $reqData['order']['0']['dir'] ?? 'asc';
|
||||
$requestedOrder3 = $reqData['order']['2']['column'] ?? 0;
|
||||
$order3 = PresupuestoModel::SORTABLE[$requestedOrder3 >= 0 ? $requestedOrder1 : 0];
|
||||
$dir3 = $reqData['order']['0']['dir'] ?? 'asc';
|
||||
|
||||
// por defecto, se deja cosido tapa blanda por ahora JJO
|
||||
$tipo_impresion_id = $reqData['tipo_impresion_id'] ?? 4;
|
||||
|
||||
|
||||
|
||||
$searchValues = get_filter_datatables_columns($reqData);
|
||||
|
||||
$resourceData = $this->model->getResource($searchValues, $tipo_impresion_id)->orderBy($order1, $dir1)->orderBy($order2, $dir2)
|
||||
->orderBy($order3, $dir3)->limit($length, $start)->get()->getResultObject();
|
||||
foreach ($resourceData as $item) :
|
||||
if (isset($item->comentarios_pdf) && strlen($item->comentarios_pdf) > 100) :
|
||||
$item->comentarios_pdf = character_limiter($item->comentarios_pdf, 100);
|
||||
endif;
|
||||
if (isset($item->causa_cancelacion) && strlen($item->causa_cancelacion) > 100) :
|
||||
$item->causa_cancelacion = character_limiter($item->causa_cancelacion, 100);
|
||||
endif;
|
||||
if (isset($item->comentarios_cliente) && strlen($item->comentarios_cliente) > 100) :
|
||||
$item->comentarios_cliente = character_limiter($item->comentarios_cliente, 100);
|
||||
endif;
|
||||
if (isset($item->comentarios_safekat) && strlen($item->comentarios_safekat) > 100) :
|
||||
$item->comentarios_safekat = character_limiter($item->comentarios_safekat, 100);
|
||||
endif;
|
||||
if (isset($item->comentarios_tarifa) && strlen($item->comentarios_tarifa) > 100) :
|
||||
$item->comentarios_tarifa = character_limiter($item->comentarios_tarifa, 100);
|
||||
endif;
|
||||
if (isset($item->comentarios_produccion) && strlen($item->comentarios_produccion) > 100) :
|
||||
$item->comentarios_produccion = character_limiter($item->comentarios_produccion, 100);
|
||||
endif;
|
||||
if (isset($item->tirada_alternativa_json_data) && strlen($item->tirada_alternativa_json_data) > 100) :
|
||||
$item->tirada_alternativa_json_data = character_limiter($item->tirada_alternativa_json_data, 100);
|
||||
endif;
|
||||
if (isset($item->titulo) && strlen($item->titulo) > 100) :
|
||||
$item->titulo = character_limiter($item->titulo, 100);
|
||||
endif;
|
||||
if (isset($item->paginas_color_posicion) && strlen($item->paginas_color_posicion) > 100) :
|
||||
$item->paginas_color_posicion = character_limiter($item->paginas_color_posicion, 100);
|
||||
endif;
|
||||
if (isset($item->aprobado_json_data) && strlen($item->aprobado_json_data) > 100) :
|
||||
$item->aprobado_json_data = character_limiter($item->aprobado_json_data, 100);
|
||||
endif;
|
||||
if (isset($item->comparador_json_data) && strlen($item->comparador_json_data) > 100) :
|
||||
$item->comparador_json_data = character_limiter($item->comparador_json_data, 100);
|
||||
endif;
|
||||
if (isset($item->ws_externo_json_data) && strlen($item->ws_externo_json_data) > 100) :
|
||||
$item->ws_externo_json_data = character_limiter($item->ws_externo_json_data, 100);
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
|
||||
|
||||
return $this->respond(Collection::datatable(
|
||||
$resourceData,
|
||||
$this->model->getResource("", $tipo_impresion_id)->countAllResults(),
|
||||
$this->model->getResource($search, $tipo_impresion_id)->countAllResults()
|
||||
));
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,237 @@
|
||||
/**
|
||||
* Cliente presupuesto Wizard
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
(function () {
|
||||
|
||||
|
||||
// Init custom option check
|
||||
//window.Helpers.initCustomOptionCheck();
|
||||
// Vertical Wizard
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
const clientePresupuestoWizard = document.querySelector('#wizard-presupuesto-cliente');
|
||||
if (typeof clientePresupuestoWizard !== undefined && clientePresupuestoWizard !== null) {
|
||||
// Wizard form
|
||||
const clientePresupuestoWizardForm = clientePresupuestoWizard.querySelector('#presupuesto-cliente-form');
|
||||
// Wizard steps
|
||||
const clientePresupuestoWizardFormStep1 = clientePresupuestoWizardForm.querySelector('#datos-generales');
|
||||
const clientePresupuestoWizardFormStep2 = clientePresupuestoWizardForm.querySelector('#disenio-libro');
|
||||
const clientePresupuestoWizardFormStep3 = clientePresupuestoWizardForm.querySelector('#direcciones-libro');
|
||||
const clientePresupuestoWizardFormStep4 = clientePresupuestoWizardForm.querySelector('#resumen-libro');
|
||||
// Wizard next prev button
|
||||
const clientePresupuestoWizardNext = [].slice.call(clientePresupuestoWizardForm.querySelectorAll('.btn-next'));
|
||||
const clientePresupuestoWizardPrev = [].slice.call(clientePresupuestoWizardForm.querySelectorAll('.btn-prev'));
|
||||
|
||||
let validationStepper = new Stepper(clientePresupuestoWizard, {
|
||||
linear: true
|
||||
});
|
||||
|
||||
// Deal Type
|
||||
const FormValidation1 = FormValidation.formValidation(clientePresupuestoWizardFormStep1, {
|
||||
fields: {
|
||||
dealAmount: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Please enter amount'
|
||||
},
|
||||
numeric: {
|
||||
message: 'The amount must be a number'
|
||||
}
|
||||
}
|
||||
},
|
||||
dealRegion: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Please select region'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
plugins: {
|
||||
trigger: new FormValidation.plugins.Trigger(),
|
||||
bootstrap5: new FormValidation.plugins.Bootstrap5({
|
||||
// Use this for enabling/changing valid/invalid class
|
||||
// eleInvalidClass: '',
|
||||
eleValidClass: '',
|
||||
rowSelector: '.col-sm-6'
|
||||
}),
|
||||
autoFocus: new FormValidation.plugins.AutoFocus(),
|
||||
submitButton: new FormValidation.plugins.SubmitButton()
|
||||
}
|
||||
}).on('core.form.valid', function () {
|
||||
// Jump to the next step when all fields in the current step are valid
|
||||
validationStepper.next();
|
||||
});
|
||||
|
||||
// select2 (Region)
|
||||
const dealRegion = $('#dealRegion');
|
||||
if (dealRegion.length) {
|
||||
dealRegion.wrap('<div class="position-relative"></div>');
|
||||
dealRegion
|
||||
.select2({
|
||||
placeholder: 'Select an region',
|
||||
dropdownParent: dealRegion.parent()
|
||||
})
|
||||
.on('change.select2', function () {
|
||||
// Revalidate the region field when an option is chosen
|
||||
FormValidation1.revalidateField('dealRegion');
|
||||
});
|
||||
}
|
||||
|
||||
// Deal Details
|
||||
const FormValidation2 = FormValidation.formValidation(clientePresupuestoWizardFormStep2, {
|
||||
fields: {
|
||||
// * Validate the fields here based on your requirements
|
||||
dealTitle: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Please enter deal title'
|
||||
}
|
||||
}
|
||||
},
|
||||
dealCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Please enter deal code'
|
||||
},
|
||||
stringLength: {
|
||||
min: 4,
|
||||
max: 10,
|
||||
message: 'The deal code must be more than 4 and less than 10 characters long'
|
||||
},
|
||||
regexp: {
|
||||
regexp: /^[A-Z0-9]+$/,
|
||||
message: 'The deal code can only consist of capital alphabetical and number'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
trigger: new FormValidation.plugins.Trigger(),
|
||||
bootstrap5: new FormValidation.plugins.Bootstrap5({
|
||||
// Use this for enabling/changing valid/invalid class
|
||||
// eleInvalidClass: '',
|
||||
eleValidClass: '',
|
||||
rowSelector: '.col-sm-6'
|
||||
}),
|
||||
autoFocus: new FormValidation.plugins.AutoFocus(),
|
||||
submitButton: new FormValidation.plugins.SubmitButton()
|
||||
}
|
||||
}).on('core.form.valid', function () {
|
||||
// Jump to the next step when all fields in the current step are valid
|
||||
validationStepper.next();
|
||||
});
|
||||
|
||||
// select2 (Offered Item)
|
||||
const dealOfferedItem = $('#dealOfferedItem');
|
||||
if (dealOfferedItem.length) {
|
||||
dealOfferedItem.wrap('<div class="position-relative"></div>');
|
||||
dealOfferedItem
|
||||
.select2({
|
||||
placeholder: 'Select an offered item',
|
||||
dropdownParent: dealOfferedItem.parent()
|
||||
})
|
||||
.on('change.select2', function () {
|
||||
// Revalidate the field if needed when an option is chosen
|
||||
// FormValidation2.revalidateField('dealOfferedItem');
|
||||
});
|
||||
}
|
||||
|
||||
// Deal Usage
|
||||
const FormValidation3 = FormValidation.formValidation(clientePresupuestoWizardFormStep3, {
|
||||
fields: {
|
||||
// * Validate the fields here based on your requirements
|
||||
},
|
||||
plugins: {
|
||||
trigger: new FormValidation.plugins.Trigger(),
|
||||
bootstrap5: new FormValidation.plugins.Bootstrap5({
|
||||
// Use this for enabling/changing valid/invalid class
|
||||
// eleInvalidClass: '',
|
||||
eleValidClass: '',
|
||||
rowSelector: '.col-sm-6'
|
||||
}),
|
||||
autoFocus: new FormValidation.plugins.AutoFocus(),
|
||||
submitButton: new FormValidation.plugins.SubmitButton()
|
||||
}
|
||||
}).on('core.form.valid', function () {
|
||||
validationStepper.next();
|
||||
});
|
||||
|
||||
// Deal Usage
|
||||
const FormValidation4 = FormValidation.formValidation(clientePresupuestoWizardFormStep4, {
|
||||
fields: {
|
||||
// * Validate the fields here based on your requirements
|
||||
},
|
||||
plugins: {
|
||||
trigger: new FormValidation.plugins.Trigger(),
|
||||
bootstrap5: new FormValidation.plugins.Bootstrap5({
|
||||
// Use this for enabling/changing valid/invalid class
|
||||
// eleInvalidClass: '',
|
||||
eleValidClass: '',
|
||||
rowSelector: '.col-md-12'
|
||||
}),
|
||||
autoFocus: new FormValidation.plugins.AutoFocus(),
|
||||
submitButton: new FormValidation.plugins.SubmitButton()
|
||||
}
|
||||
}).on('core.form.valid', function () {
|
||||
// You can submit the form
|
||||
// clientePresupuestoWizardForm.submit()
|
||||
// or send the form data to server via an Ajax request
|
||||
// To make the demo simple, I just placed an alert
|
||||
alert('Submitted..!!');
|
||||
});
|
||||
|
||||
clientePresupuestoWizardNext.forEach(item => {
|
||||
item.addEventListener('click', event => {
|
||||
// When click the Next button, we will validate the current step
|
||||
switch (validationStepper._currentIndex) {
|
||||
case 0:
|
||||
FormValidation1.validate();
|
||||
break;
|
||||
|
||||
case 1:
|
||||
FormValidation2.validate();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
FormValidation3.validate();
|
||||
break;
|
||||
|
||||
case 3:
|
||||
FormValidation4.validate();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
clientePresupuestoWizardPrev.forEach(item => {
|
||||
item.addEventListener('click', event => {
|
||||
switch (validationStepper._currentIndex) {
|
||||
case 3:
|
||||
validationStepper.previous();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
validationStepper.previous();
|
||||
break;
|
||||
|
||||
case 1:
|
||||
validationStepper.previous();
|
||||
break;
|
||||
|
||||
case 0:
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
})();
|
||||
@ -0,0 +1,351 @@
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
|
||||
<?= $this->section("content") ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
<form id="presupuestoForm" class="card-body" method="post" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
|
||||
<!-- Create Deal Wizard -->
|
||||
<div id="wizard-presupuesto-cliente" class="bs-stepper vertical mt-2 linear">
|
||||
<div class="bs-stepper-header">
|
||||
<div class="step active" data-target="#datos-generales">
|
||||
<button type="button" class="step-trigger" aria-selected="true">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-users ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Datos generales</span>
|
||||
<span class="bs-stepper-subtitle">Información del libro</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="step" data-target="#disenio-libro">
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-id ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Diseño del libro</span>
|
||||
<span class="bs-stepper-subtitle">Detalles técnicos del libro</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="step" data-target="#direcciones-libro">
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-credit-card ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Direcciones</span>
|
||||
<span class="bs-stepper-subtitle">Dirección envío, facturación</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="step" data-target="#resumen-libro">
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-checkbox ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Resumen del presupuesto</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bs-stepper-content">
|
||||
<form id="presupuesto-cliente-form" onsubmit="return false">
|
||||
|
||||
<!-- Datos Generales -->
|
||||
<div id="datos-generales" class="content active dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-label-secondary btn-prev waves-effect">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none">Previous</span>
|
||||
</button>
|
||||
<button class="btn btn-primary btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Next</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Deal Details -->
|
||||
<div id="disenio-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
<div class="col-sm-6 fv-plugins-icon-container">
|
||||
<label class="form-label" for="dealTitle">Deal Title</label>
|
||||
<input type="text" id="dealTitle" name="dealTitle" class="form-control" placeholder="Black friday sale, 25% off">
|
||||
<div class="fv-plugins-message-container invalid-feedback"></div></div>
|
||||
<div class="col-sm-6 fv-plugins-icon-container">
|
||||
<label class="form-label" for="dealCode">Deal Code</label>
|
||||
<input type="text" id="dealCode" name="dealCode" class="form-control" placeholder="25PEROFF">
|
||||
<div class="fv-plugins-message-container invalid-feedback"></div></div>
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label" for="dealDescription">Deal Description</label>
|
||||
<textarea id="dealDescription" name="dealDescription" class="form-control" rows="5" placeholder="To sell or distribute something as a business deal"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
<label class="form-label" for="dealOfferedItem">Offered Items</label>
|
||||
<div class="position-relative">
|
||||
<select class="select2 select2-hidden-accessible" id="dealOfferedItem" name="dealOfferedItem" multiple="" data-select2-id="dealOfferedItem" tabindex="-1" aria-hidden="true">
|
||||
<option disabled="" value="">Select offered item</option>
|
||||
<option value="65328">Apple iPhone 12 Pro Max (256GB)</option>
|
||||
<option value="25612">Apple iPhone 12 Pro (512GB)</option>
|
||||
<option value="65454">Apple iPhone 12 Mini (256GB)</option>
|
||||
<option value="12365">Apple iPhone 11 Pro Max (256GB)</option>
|
||||
<option value="85466">Apple iPhone 11 (64GB)</option>
|
||||
<option value="98564">OnePlus Nord CE 5G (128GB)</option>
|
||||
</select><span class="select2 select2-container select2-container--default" dir="ltr" data-select2-id="2" style="width: auto;"><span class="selection"><span class="select2-selection select2-selection--multiple" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="-1" aria-disabled="false"><ul class="select2-selection__rendered"><li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="0" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" placeholder="Select an offered item" style="width: 0px;"></li></ul></span></span><span class="dropdown-wrapper" aria-hidden="true"></span></span></div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label class="form-label" for="dealCartCondition">Cart condition</label>
|
||||
<select class="form-select" id="dealCartCondition" name="dealCartCondition">
|
||||
<option disabled="" value="">Select cart condition</option>
|
||||
<option value="all">Cart must contain all selected Downloads</option>
|
||||
<option value="any">Cart needs one or more of the selected Downloads</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label for="dealDuration" class="form-label">Deal Duration</label>
|
||||
<input type="text" id="dealDuration" name="dealDuration" class="form-control flatpickr-input" placeholder="YYYY-MM-DD to YYYY-MM-DD" readonly="readonly">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label">Notify Users</label>
|
||||
<div class="row">
|
||||
<div class="col mt-2">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="dealNotifyEmail" name="dealNotifyEmail" value="email">
|
||||
<label class="form-check-label" for="dealNotifyEmail">Email</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="dealNotifySMS" name="dealNotifySMS" value="sms">
|
||||
<label class="form-check-label" for="dealNotifySMS">SMS</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="dealNotifyPush" name="dealNotifyPush" value="push">
|
||||
<label class="form-check-label" for="dealNotifyPush">Push Notification</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-label-secondary btn-prev waves-effect">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none">Previous</span>
|
||||
</button>
|
||||
<button class="btn btn-primary btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Next</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Deal Usage -->
|
||||
<div id="direcciones-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label" for="dealUserType">User Type</label>
|
||||
<select id="dealUserType" name="dealUserType" class="form-select">
|
||||
<option selected="" disabled="" value="">Select user type</option>
|
||||
<option value="all">All</option>
|
||||
<option value="registered">Registered</option>
|
||||
<option value="unregistered">Unregistered</option>
|
||||
<option value="prime-members">Prime members</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label" for="dealMaxUsers">Max Users</label>
|
||||
<input type="number" id="dealMaxUsers" name="dealMaxUsers" class="form-control" placeholder="500">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label" for="dealMinimumCartAmount">Minimum Cart Amount</label>
|
||||
<input type="number" id="dealMinimumCartAmount" name="dealMinimumCartAmount" class="form-control" placeholder="$99">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label" for="dealPromotionalFee">Promotional Fee</label>
|
||||
<input type="number" id="dealPromotionalFee" name="dealPromotionalFee" class="form-control" placeholder="$9">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label" for="dealPaymentMethod">Payment Method</label>
|
||||
<select id="dealPaymentMethod" name="dealPaymentMethod" class="form-select">
|
||||
<option selected="" disabled="" value="">Select payment method</option>
|
||||
<option value="any">Any</option>
|
||||
<option value="credit-card">Credit Card</option>
|
||||
<option value="net-banking">Net Banking</option>
|
||||
<option value="wallet">Wallet</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label" for="dealStatus">Deal Status</label>
|
||||
<select id="dealStatus" name="dealStatus" class="form-select">
|
||||
<option selected="" disabled="" value="">Select status</option>
|
||||
<option value="active">Active</option>
|
||||
<option value="inactive">Inactive</option>
|
||||
<option value="suspend">Suspend</option>
|
||||
<option value="abandon">Abandone</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<label class="switch">
|
||||
<input type="checkbox" class="switch-input" id="dealLimitUser" name="dealLimitUser">
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on"></span>
|
||||
<span class="switch-off"></span>
|
||||
</span>
|
||||
<span class="switch-label"> Limit this discount to a single-use per customer?</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-label-secondary btn-prev waves-effect">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none">Previous</span>
|
||||
</button>
|
||||
<button class="btn btn-primary btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Next</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Review & Complete -->
|
||||
<div id="resumen-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
<div class="col-lg-6">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-0">
|
||||
<h3>Almost done! 🚀</h3>
|
||||
<p>Confirm your deal details information and submit to create it.</p>
|
||||
</div>
|
||||
<div class="col-12 mb-0">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Deal Type</strong></td>
|
||||
<td class="px-0 py-1">Percentage</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Amount</strong></td>
|
||||
<td class="px-0 py-1">25%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Deal Code</strong></td>
|
||||
<td class="px-0 py-1">
|
||||
<div class="badge bg-label-warning">25PEROFF</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Deal Title</strong></td>
|
||||
<td class="px-0 py-1">Black friday sale, 25% OFF</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="ps-0 align-top text-nowrap py-1"><strong>Deal Duration</strong></td>
|
||||
<td class="px-0 py-1">
|
||||
<span class="fw-semibold">2021-07-14</span> to
|
||||
<span class="fw-semibold">2021-07-30</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-6 col-lg-5 d-flex justify-content-center border rounded pt-3">
|
||||
<img class="img-fluid" src="../../assets/img/illustrations/wizard-create-deal-confirm.png" alt="deal image cap">
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label class="switch">
|
||||
<input type="checkbox" class="switch-input" id="dealConfirmed" name="dealConfirmed">
|
||||
<span class="switch-toggle-slider">
|
||||
<span class="switch-on"></span>
|
||||
<span class="switch-off"></span>
|
||||
</span>
|
||||
<span class="switch-label"> I have confirmed the deal details.</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-label-secondary btn-prev waves-effect">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none">Previous</span>
|
||||
</button>
|
||||
<button class="btn btn-success btn-submit btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Submit</span><i class="ti ti-check ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Create Deal Wizard -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="pt-4">
|
||||
<input type="submit"
|
||||
class="btn btn-primary float-start me-sm-3 me-1"
|
||||
name="save"
|
||||
id="saveForm"
|
||||
value="<?= lang("Basic.global.Save") ?>"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= view("themes/_commonPartialsBs/_modalConfirmDialog") ?>
|
||||
<?= view("themes/_commonPartialsBs/_modalMessageDialog") ?>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<?php
|
||||
/*
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.dataTables.min.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/sk-datatables.css') ?>">
|
||||
*/
|
||||
?>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/bs-stepper/bs-stepper.css') ?>" />
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/bs-stepper/bs-stepper.js") ?>"></script>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/dataTables.buttons.min.js") ?>"></script>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.html5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.print.min.js") ?>"></script>
|
||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/select/dataTables.select.min.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/js/datatables-editor/dataTables.editor.min.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/autosize/autosize.js') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/translate_js/Presupuestos') ?>"></script>
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,616 +0,0 @@
|
||||
<?php $menus = getMenuControl(); ?>
|
||||
|
||||
<!-- Menu -->
|
||||
<aside id="layout-menu" class="layout-menu menu-vertical menu bg-menu-theme">
|
||||
<div class="app-brand">
|
||||
<a href="<?= site_url('home') ?>" class="app-brand-link">
|
||||
<span class="app-brand-logo">
|
||||
<img src="<?= site_url('themes/vuexy/img/branding/logo.png') ?>" width="150px">
|
||||
</span>
|
||||
</a>
|
||||
<a href="javascript:void(0);" class="layout-menu-toggle menu-link text-large ms-auto">
|
||||
<i class="ti menu-toggle-icon d-none d-xl-block ti-sm align-middle"></i>
|
||||
<i class="ti ti-x d-block d-xl-none ti-sm align-middle"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="menu-inner-shadow"></div>
|
||||
|
||||
<ul class="menu-inner py-1">
|
||||
|
||||
<li class="menu-item active">
|
||||
<a href="<?= site_url("") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-smart-home"></i>
|
||||
<div data-i18n="<?= lang("App.menu_dashboard") ?>"><?= lang("App.menu_dashboard") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php if (allowMenuSection($menus, ['Cliente', 'Tarifacliente'], 'index')): ?>
|
||||
<!-- Clientes -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-users"></i>
|
||||
<div data-i18n="<?= lang("App.menu_clientes") ?>"><?= lang("App.menu_clientes") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Cliente')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("clientes/cliente") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_clientes") ?>"><?= lang("App.menu_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("clientes/clienteplantillaprecios") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_plantillas_tarifas_clientes") ?>"><?= lang("App.menu_plantillas_tarifas_clientes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifacliente')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("clientes/tarifacliente") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifacliente") ?>"><?= lang("App.menu_tarifacliente") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (allowMenuSection($menus,
|
||||
['Calendario', 'Correo', 'Formaspago', 'Imposiciones', 'Tipologias',
|
||||
'Maquina', 'Papelesgenerico', 'Papelesimpresion', 'Seriefactura', 'Serviciocliente',
|
||||
'Tamanioformatos', 'Tamaniolibros', 'Tareaservicio', 'Tiposimpresion', 'Trabajo'
|
||||
],
|
||||
'index')): ?>
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-users"></i>
|
||||
<div data-i18n="<?= lang("App.menu_configuration") ?>"><?= lang("App.menu_configuration") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Calendario')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/calendario") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_calendario") ?>"><?= lang("App.menu_calendario") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Correo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/correo") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_correo") ?>"><?= lang("App.menu_correo") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Formaspago')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/formaspago") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_formaspago") ?>"><?= lang("App.menu_formaspago") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Imposiciones')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/imposiciones") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_imposiciones") ?>"><?= lang("App.menu_imposiciones") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tipologias')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/tipologias") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tipologias") ?>"><?= lang("App.menu_tipologias") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Maquina')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/maquina") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_maquina") ?>"><?= lang("App.menu_maquina") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Papelesgenericos')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/papelesgenericos") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_papelgenerico") ?>"><?= lang("App.menu_papelgenerico") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Papelesimpresion')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/papelesimpresion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_papelimpresion") ?>"><?= lang("App.menu_papelimpresion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Seriefactura')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/seriefactura") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_seriefactura") ?>"><?= lang("App.menu_seriefactura") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Serviciocliente')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/serviciocliente") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_serviciocliente") ?>"><?= lang("App.menu_serviciocliente") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tamanioformatos')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/tamanioformatos") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tamanioformatos") ?>"><?= lang("App.menu_tamanioformatos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tamaniolibros')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/tamaniolibros") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tamaniolibros") ?>"><?= lang("App.menu_tamaniolibros") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tareasservicio')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/tareasservicio") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tareasservicio") ?>"><?= lang("App.menu_tareasservicio") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tiposimpresion')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/tiposimpresion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tiposimpresion") ?>"><?= lang("App.menu_tiposimpresion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Trabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("configuracion/trabajo") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_trabajo") ?>"><?= lang("App.menu_trabajo") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU DIGITALIZACIÓN
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Digitalizacion')) > 0): ?>
|
||||
<!-- Digitalization -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("serviciosdigitalizacion/digitalizacion") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_digitalizacion") ?>"><?= lang("App.menu_digitalizacion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU LOGISTICA
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Logistica')) > 0): ?>
|
||||
<!-- Logistic -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("envioslogistica/logistica") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div class="<?= lang("App.menu_logistica") ?>"><?= lang("App.menu_logistica") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU FACTURACION
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Albaran', 'Factura'], 'index')): ?>
|
||||
<!-- Invoicing -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_facturación") ?>"><?= lang("App.menu_facturación") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Albaran')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/albaran") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_albaran") ?>"><?= lang("App.menu_albaran") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Factura')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturacion/factura") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_facturas") ?>"><?= lang("App.menu_facturas") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU INFORMES
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Informe')) > 0): ?>
|
||||
<!-- Informs -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("informes/informe") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_informes") ?>"><?= lang("App.menu_informes") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU PEDIDO
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Pedido')) > 0): ?>
|
||||
<!-- Orders -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_pedidos") ?>"><?= lang("App.menu_pedidos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU PRESUPUESTO
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Presupuesto', 'Presupuestomaquetacion'], 'index')): ?>
|
||||
<!-- Budgets -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_presupuestos") ?>"><?= lang("App.menu_presupuestos") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Albaran')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuesto") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestos") ?>"><?= lang("App.menu_presupuestos") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Factura')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("presupuestos/presupuestomaquetacion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_presupuestomaquetacion") ?>"><?= lang("App.menu_presupuestomaquetacion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU PRODUCCION
|
||||
*/
|
||||
if
|
||||
(allowMenuSection($menus, ['Ordenmaquina', 'Ordentrabajo', 'Ordentrabajomaquetacion', 'Pedidoproduccion'], 'index')): ?>
|
||||
<!-- Production -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_produccion") ?>"><?= lang("App.menu_produccion") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordenmaquina')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordenmaquina") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_ordenmaquina") ?>"><?= lang("App.menu_ordenmaquina") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajo')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajo") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_ordentrabajo") ?>"><?= lang("App.menu_ordentrabajo") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Ordentrabajomaquetacion')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/ordentrabajomaquetacion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_ordentrabajomaquetacion") ?>"><?= lang("App.menu_ordentrabajomaquetacion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Pedidoproduccion')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("produccion/pedidoproduccion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_pedidoproduccion") ?>"><?= lang("App.menu_pedidoproduccion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU PROVEEDORES
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Proveedores')) > 0): ?>
|
||||
<!-- Providers -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("compras/proveedores") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_proveedores") ?>"><?= lang("App.menu_proveedores") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU TARIFAS
|
||||
*/
|
||||
if (allowMenuSection($menus,
|
||||
['Tarifaacabado', 'Tarifasenvios', 'Tarifaimpresion', 'Tarifamanipulado', 'Tarifaencuadernacion',
|
||||
'Tarifapapelcompra', 'Tarifapapeldefecto', 'Tarifapreimpresion', 'Tarifaextra'
|
||||
], 'index')): ?>
|
||||
<!-- Prices -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_tarifas") ?>"><?= lang("App.menu_tarifas") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifaacabado')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifaacabado") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifaacabado") ?>"><?= lang("App.menu_tarifaacabado") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifasenvios')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifasenvios") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifaenvio") ?>"><?= lang("App.menu_tarifaenvio") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifaimpresion')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifaimpresion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifaimpresion") ?>"><?= lang("App.menu_tarifaimpresion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifamanipulado')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifamanipulado") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifamanipulado") ?>"><?= lang("App.menu_tarifamanipulado") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifaencuadernacion')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifaencuadernacion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifaencuadernacion") ?>"><?= lang("App.menu_tarifaencuadernacion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifapapelcompra')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifapapelcompra") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifapapelcompra") ?>"><?= lang("App.menu_tarifapapelcompra") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifapapeldefecto')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifapapeldefecto") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifapapeldefecto") ?>"><?= lang("App.menu_tarifapapeldefecto") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifapreimpresion')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifapreimpresion") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifapreimpresion") ?>"><?= lang("App.menu_tarifapreimpresion") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Tarifaextra')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("tarifas/tarifaextra") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_tarifaextra") ?>"><?= lang("App.menu_tarifaextra") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU USUARIOS
|
||||
*/
|
||||
if (allowMenuSection($menus, ['Users', 'Group'], 'index')): ?>
|
||||
<!-- Users -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-dollar"></i>
|
||||
<div data-i18n="<?= lang("App.menu_users") ?>"><?= lang("App.menu_users") ?></div>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Users')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("usuarios/users") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_users") ?>"><?= lang("App.menu_users") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if (count($temp = getArrayItem($menus, 'name', 'Group')) > 0): ?>
|
||||
<?php if (count(getArrayItem($temp, 'methods', 'index', true)) > 0): ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("usuarios/group") ?>" class="menu-link">
|
||||
<div data-i18n="<?= lang("App.menu_permission_group") ?>"><?= lang("App.menu_permission_group") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU ACTIVIDAD
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Activity')) > 0): ?>
|
||||
<!-- Activity -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("activity") ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-article""></i>
|
||||
<div data-i18n="<?= lang("App.menu_activity") ?>"><?= lang("App.menu_activity") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* MENU AJUSTES
|
||||
*/
|
||||
if (count(getArrayItem($menus, 'name', 'Settings')) > 0): ?>
|
||||
<!-- Settings -->
|
||||
<li class="menu-header small text-uppercase">
|
||||
<span class="menu-header-text">Ajustes del Sistema</span>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("settings")?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-settings""></i>
|
||||
<div data-i18n="<?= lang("App.menu_settings") ?>"><?= lang("App.menu_settings") ?></div>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</ul>
|
||||
</aside>
|
||||
<!-- / Menu -->
|
||||
|
||||
<?php /*
|
||||
|
||||
|
||||
<!--Sidebar-->
|
||||
<div class="quixnav">
|
||||
<div class="quixnav-scroll">
|
||||
<ul class="metismenu" id="menu">
|
||||
|
||||
<!---
|
||||
<?php if (count(getArrayItem($menus,'name','Notification')) > 0): ?>
|
||||
<li><a class="has-arrow" href="Javascript:void()" aria-expanded="false"><i class="fas fa-bell"></i><span class="nav-text"><?= lang("App.menu_notification") ?></span></a>
|
||||
<ul aria-expanded="false">
|
||||
<?php if (count(getArrayItem($menus,'methods','index',true)) > 0): ?>
|
||||
<li><a href="<?= site_url("notification")?>"><?= lang("App.menu_list") ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($menus,'methods','add',true)) > 0): ?>
|
||||
<li><a href="<?= site_url("notification/add")?>"><?= lang("App.menu_add") ?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (count(getArrayItem($menus,'name','Settings')) > 0): ?>
|
||||
<li class="nav-label"><?= lang("App.menu_settings") ?></li>
|
||||
<?php if (count(getArrayItem($menus,'methods','index',true)) > 0): ?>
|
||||
<li><a href="<?= site_url("settings")?>" aria-expanded="false"><i class="fas fa-sliders-h"></i><span class="nav-text"><?= lang("App.menu_general") ?></span></a></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count(getArrayItem($menus,'methods','template',true)) > 0): ?>
|
||||
<li><a href="<?= site_url("settings/template")?>" aria-expanded="false"><i class="fas fa-mail-bulk"></i><span class="nav-text"><?= lang("App.menu_template") ?></span></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<li class="nav-label"></li>
|
||||
--->
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
*/
|
||||
?>
|
||||
@ -813,6 +813,21 @@
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<!---
|
||||
/**
|
||||
* JJO
|
||||
*/
|
||||
--->
|
||||
<li class="menu-header small text-uppercase">
|
||||
<span class="menu-header-text">Test JJO</span>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('nuevoPresupuestoCliente' ) ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-settings"></i>
|
||||
<div data-i18n="Test">Test</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
6492
xdebug.log
6492
xdebug.log
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user