mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into dev/chat
This commit is contained in:
@ -21,6 +21,164 @@ const SK_PERMISSION_MATRIX = [
|
||||
"presupuesto-cliente.edit",
|
||||
"presupuesto-cliente.delete",
|
||||
"presupuesto-cliente.menu",
|
||||
"tarifa-preimpresion.create",
|
||||
"tarifa-preimpresion.edit",
|
||||
"tarifa-preimpresion.delete",
|
||||
"tarifa-preimpresion.menu",
|
||||
"tarifa-manipulado.create",
|
||||
"tarifa-manipulado.edit",
|
||||
"tarifa-manipulado.delete",
|
||||
"tarifa-manipulado.menu",
|
||||
"tarifa-acabado.create",
|
||||
"tarifa-acabado.edit",
|
||||
"tarifa-acabado.delete",
|
||||
"tarifa-acabado.menu",
|
||||
"tarifa-encuadernacion.create",
|
||||
"tarifa-encuadernacion.edit",
|
||||
"tarifa-encuadernacion.delete",
|
||||
"tarifa-encuadernacion.menu",
|
||||
"tarifa-envio.create",
|
||||
"tarifa-envio.edit",
|
||||
"tarifa-envio.delete",
|
||||
"tarifa-envio.menu",
|
||||
"tarifa-extra.create",
|
||||
"tarifa-extra.edit",
|
||||
"tarifa-extra.delete",
|
||||
"tarifa-extra.menu",
|
||||
"proveedores.create",
|
||||
"proveedores.edit",
|
||||
"proveedores.delete",
|
||||
"proveedores.menu",
|
||||
"ajustes.create",
|
||||
"ajustes.edit",
|
||||
"ajustes.delete",
|
||||
"ajustes.menu",
|
||||
"actividad.create",
|
||||
"actividad.edit",
|
||||
"actividad.delete",
|
||||
"actividad.menu",
|
||||
"paises.create",
|
||||
"paises.edit",
|
||||
"paises.delete",
|
||||
"paises.menu",
|
||||
"formas-pago.create",
|
||||
"formas-pago.edit",
|
||||
"formas-pago.delete",
|
||||
"formas-pago.menu",
|
||||
"maquinas.create",
|
||||
"maquinas.edit",
|
||||
"maquinas.delete",
|
||||
"maquinas.menu",
|
||||
"maquinas-defecto.create",
|
||||
"maquinas-defecto.edit",
|
||||
"maquinas-defecto.delete",
|
||||
"maquinas-defecto.menu",
|
||||
"papel-generico.create",
|
||||
"papel-generico.edit",
|
||||
"papel-generico.delete",
|
||||
"papel-generico.menu",
|
||||
"papel-impresion.create",
|
||||
"papel-impresion.edit",
|
||||
"papel-impresion.delete",
|
||||
"papel-impresion.menu",
|
||||
"usuarios.create",
|
||||
"usuarios.edit",
|
||||
"usuarios.delete",
|
||||
"usuarios.menu",
|
||||
"roles-permisos.create",
|
||||
"roles-permisos.edit",
|
||||
"roles-permisos.delete",
|
||||
"roles-permisos.menu",
|
||||
"ubicaciones.create",
|
||||
"ubicaciones.edit",
|
||||
"ubicaciones.delete",
|
||||
"ubicaciones.menu",
|
||||
"series-facturas.create",
|
||||
"series-facturas.edit",
|
||||
"series-facturas.delete",
|
||||
"series-facturas.menu",
|
||||
],
|
||||
"cliente-admin" => [
|
||||
"perfil.edit",
|
||||
"perfil.menu",
|
||||
"direcciones.create",
|
||||
"direcciones.edit",
|
||||
"direcciones.delete",
|
||||
"direcciones.menu",
|
||||
"presupuesto-cliente.create",
|
||||
"presupuesto-cliente.edit",
|
||||
"presupuesto-cliente.delete",
|
||||
"presupuesto-cliente.menu",
|
||||
],
|
||||
"cliente-editor" => [
|
||||
"perfil.create",
|
||||
"perfil.edit",
|
||||
"perfil.delete",
|
||||
"perfil.menu",
|
||||
"direcciones.create",
|
||||
"direcciones.edit",
|
||||
"direcciones.delete",
|
||||
"direcciones.menu",
|
||||
"presupuesto-cliente.create",
|
||||
"presupuesto-cliente.edit",
|
||||
"presupuesto-cliente.delete",
|
||||
"presupuesto-cliente.menu",
|
||||
],
|
||||
"comercial" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"produccion" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"maquina" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"maquetador" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"director" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"contabilidad" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"editor" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
"Profile.index",
|
||||
"Profile.menu",
|
||||
],
|
||||
"beta" => [
|
||||
"clientes.create",
|
||||
"clientes.edit",
|
||||
"clientes.delete",
|
||||
"clientes.menu",
|
||||
"plantilla-tarifa.create",
|
||||
"plantilla-tarifa.edit",
|
||||
"plantilla-tarifa.delete",
|
||||
"plantilla-tarifa.menu",
|
||||
"perfil.create",
|
||||
"perfil.edit",
|
||||
"perfil.delete",
|
||||
"perfil.menu",
|
||||
"presupuesto.create",
|
||||
"presupuesto.edit",
|
||||
"presupuesto.delete",
|
||||
"presupuesto.menu",
|
||||
"presupuesto-cliente.create",
|
||||
"presupuesto-cliente.edit",
|
||||
"presupuesto-cliente.delete",
|
||||
"presupuesto-cliente.menu",
|
||||
"tarifa-preimpresion.create",
|
||||
"tarifa-preimpresion.edit",
|
||||
"tarifa-preimpresion.delete",
|
||||
"tarifa-preimpresion.menu",
|
||||
"tarifa-manipulado.create",
|
||||
"tarifa-manipulado.edit",
|
||||
"tarifa-manipulado.delete",
|
||||
@ -90,94 +248,4 @@ const SK_PERMISSION_MATRIX = [
|
||||
"series-facturas.delete",
|
||||
"series-facturas.menu",
|
||||
],
|
||||
"cliente-admin" => [
|
||||
"perfil.edit",
|
||||
"perfil.menu",
|
||||
"presupuesto-cliente.create",
|
||||
"presupuesto-cliente.edit",
|
||||
"presupuesto-cliente.delete",
|
||||
"presupuesto-cliente.menu",
|
||||
],
|
||||
"cliente-editor" => [
|
||||
"presupuesto-cliente.create",
|
||||
"presupuesto-cliente.edit",
|
||||
"presupuesto-cliente.delete",
|
||||
"presupuesto-cliente.menu",
|
||||
],
|
||||
"comercial" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"produccion" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"maquina" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"maquetador" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"director" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"contabilidad" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
],
|
||||
"editor" => [
|
||||
"token.token",
|
||||
"token.menu",
|
||||
"Profile.index",
|
||||
"Profile.menu",
|
||||
],
|
||||
"beta" => [
|
||||
"clientes.create",
|
||||
"clientes.edit",
|
||||
"clientes.delete",
|
||||
"clientes.menu",
|
||||
"plantilla-tarifa.create",
|
||||
"plantilla-tarifa.edit",
|
||||
"plantilla-tarifa.delete",
|
||||
"plantilla-tarifa.menu",
|
||||
"presupuesto.create",
|
||||
"presupuesto.edit",
|
||||
"presupuesto.delete",
|
||||
"presupuesto.menu",
|
||||
"tarifa-preimpresion.create",
|
||||
"tarifa-preimpresion.edit",
|
||||
"tarifa-preimpresion.delete",
|
||||
"tarifa-preimpresion.menu",
|
||||
"tarifa-manipulado.create",
|
||||
"tarifa-manipulado.edit",
|
||||
"tarifa-manipulado.delete",
|
||||
"tarifa-manipulado.menu",
|
||||
"tarifa-acabado.create",
|
||||
"tarifa-acabado.edit",
|
||||
"tarifa-acabado.delete",
|
||||
"tarifa-acabado.menu",
|
||||
"tarifa-encuadernacion.create",
|
||||
"tarifa-encuadernacion.edit",
|
||||
"tarifa-encuadernacion.delete",
|
||||
"tarifa-encuadernacion.menu",
|
||||
"tarifa-envio.create",
|
||||
"tarifa-envio.edit",
|
||||
"tarifa-envio.delete",
|
||||
"tarifa-envio.menu",
|
||||
"proveedores.create",
|
||||
"proveedores.edit",
|
||||
"proveedores.delete",
|
||||
"proveedores.menu",
|
||||
"ajustes.create",
|
||||
"ajustes.edit",
|
||||
"ajustes.delete",
|
||||
"ajustes.menu",
|
||||
"actividad.create",
|
||||
"actividad.edit",
|
||||
"actividad.delete",
|
||||
"actividad.menu",
|
||||
],
|
||||
];
|
||||
|
||||
@ -13,6 +13,10 @@ const SK_PERMISSIONS = [
|
||||
'perfil.edit' => 'Can edit',
|
||||
'perfil.delete' => 'Can delete',
|
||||
'perfil.menu' => 'Menu shall be visualize',
|
||||
'direcciones.create' => 'Can create',
|
||||
'direcciones.edit' => 'Can edit',
|
||||
'direcciones.delete' => 'Can delete',
|
||||
'direcciones.menu' => 'Menu shall be visualize',
|
||||
'presupuesto.create' => 'Can create',
|
||||
'presupuesto.edit' => 'Can edit',
|
||||
'presupuesto.delete' => 'Can delete',
|
||||
@ -61,6 +65,10 @@ const SK_PERMISSIONS = [
|
||||
'paises.edit' => 'Can edit',
|
||||
'paises.delete' => 'Can delete',
|
||||
'paises.menu' => 'Menu shall be visualize',
|
||||
'formas-pago.create' => 'Can create',
|
||||
'formas-pago.edit' => 'Can edit',
|
||||
'formas-pago.delete' => 'Can delete',
|
||||
'formas-pago.menu' => 'Menu shall be visualize',
|
||||
'maquinas.create' => 'Can create',
|
||||
'maquinas.edit' => 'Can edit',
|
||||
'maquinas.delete' => 'Can delete',
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
const SK_ROLES = [
|
||||
'admin' => [
|
||||
'title' => 'Administrador',
|
||||
'description' => '',
|
||||
'description' => 'Administrador del ERP',
|
||||
],
|
||||
'cliente-admin' => [
|
||||
'title' => 'Cliente administrador',
|
||||
|
||||
@ -365,30 +365,9 @@ $routes->group('clientes', ['namespace' => 'App\Controllers\Clientes'], function
|
||||
$routes->post('menuitems', 'Cliente::menuItems', ['as' => 'menuItemsOfClientes']);
|
||||
});
|
||||
|
||||
/* Precios */
|
||||
/*$routes->group('precios', ['namespace' => 'App\Controllers\Clientes'], function ($routes) {
|
||||
$routes->post('datatable', 'ClientePrecios::datatable', ['as' => 'clientePreciosDT']);
|
||||
$routes->post('datatable_editor', 'ClientePrecios::datatable_editor', ['as' => 'clientePreciosDTE']);
|
||||
});*/
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
/*$routes->group('cliente', ['namespace' => 'App\Controllers\Clientes'], function ($routes) {
|
||||
$routes->get('', 'Cliente::index', ['as' => 'clienteList']);
|
||||
$routes->get('add', 'Cliente::add', ['as' => 'newCliente']);
|
||||
$routes->post('add', 'Cliente::add', ['as' => 'createCliente']);
|
||||
$routes->post('create', 'Cliente::create', ['as' => 'ajaxCreateCliente']);
|
||||
$routes->put('(:num)/update', 'Cliente::update/$1', ['as' => 'ajaxUpdateCliente']);
|
||||
$routes->post('edit/(:num)', 'Cliente::edit/$1', ['as' => 'updateCliente']);
|
||||
$routes->get('delete/(:num)', 'Cliente::delete/$1', ['as' => 'deleteCliente']);
|
||||
$routes->post('datatable', 'Cliente::datatable', ['as' => 'dataTableOfClientes']);
|
||||
$routes->post('allmenuitems', 'Cliente::allItemsSelect', ['as' => 'select2ItemsOfClientes']);
|
||||
|
||||
});
|
||||
$routes->resource('cliente', ['namespace' => 'App\Controllers\Clientes', 'controller' => 'Cliente', 'except' => 'show,new,create,update']);*/
|
||||
|
||||
$routes->group('clienteprecios', ['namespace' => 'App\Controllers\Clientes'], function ($routes) {
|
||||
$routes->post('datatable', 'ClientePrecios::datatable', ['as' => 'dataTableOfClienteprecios']);
|
||||
$routes->post('datatable_editor', 'ClientePrecios::datatable_editor', ['as' => 'editorOfClienteprecios']);
|
||||
@ -419,6 +398,11 @@ $routes->group('clienteusuarios', ['namespace' => 'App\Controllers\Clientes'], f
|
||||
});
|
||||
|
||||
|
||||
$routes->group('misdirecciones', ['namespace' => 'App\Controllers\Clientes'], function ($routes) {
|
||||
$routes->get('', 'Clientedirecciones::index', ['as' => 'clientedireccionesIndex']);
|
||||
});
|
||||
|
||||
|
||||
$routes->group('formas-pagos', ['namespace' => 'App\Controllers\Configuracion'], function ($routes) {
|
||||
$routes->get('', 'Formaspagos::index', ['as' => 'formaDePagoList']);
|
||||
$routes->get('add', 'Formaspagos::add', ['as' => 'newFormaDePago']);
|
||||
|
||||
@ -6,6 +6,8 @@ use App\Entities\Clientes\ClienteDireccionesEntity;
|
||||
|
||||
use App\Models\Clientes\ClienteDireccionesModel;
|
||||
|
||||
use App\Models\Usuarios\UserModel;
|
||||
|
||||
use DataTables\Editor;
|
||||
use DataTables\Editor\Field;
|
||||
use DataTables\Editor\Validate;
|
||||
@ -22,6 +24,53 @@ class Clientedirecciones extends \App\Controllers\BaseResourceController
|
||||
|
||||
protected static $controllerSlug = 'clientedirecciones';
|
||||
|
||||
protected static $viewPath = 'themes/vuexy/form/clientes/direcciones/';
|
||||
|
||||
protected $indexRoute = 'clienteDireccionesList';
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
|
||||
{
|
||||
$this->viewData['pageTitle'] = lang('Clientes.direccionesEnvio');
|
||||
$this->viewData['usingSweetAlert'] = true;
|
||||
|
||||
$this->viewData = ['usingServerSideDataTable' => true]; // JJO
|
||||
|
||||
// Breadcrumbs (IMN)
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("Clientes.direccionesEnvio"), 'route' => "javascript:void(0);", 'active' => false],
|
||||
|
||||
];
|
||||
|
||||
$this->viewData['comunidadAutonomaList'] = $this->getComunidadAutonomaListItems($clienteEntity->comunidad_autonoma_id ?? null);
|
||||
$this->viewData['provinciaList'] = $this->getProvinciaListItems($clienteEntity->provincia_id ?? null);
|
||||
$this->viewData['paisList'] = $this->getPaisListItems($clienteEntity->pais_id ?? null);
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
$id = auth()->user()->id;
|
||||
$user_model = new UserModel();
|
||||
$user = $user_model->find($id);
|
||||
$cliente_id = $user->cliente_id;
|
||||
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Clientes.cliente')]),
|
||||
'cliente_id' => $cliente_id,
|
||||
"user_id" => $id,
|
||||
'usingServerSideDataTable' => true,
|
||||
|
||||
];
|
||||
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
|
||||
return view(static::$viewPath . 'viewClienteDireccionesList', $viewData);
|
||||
}
|
||||
|
||||
public function add(){
|
||||
if ($this->request->isAJAX()) {
|
||||
|
||||
@ -226,4 +275,42 @@ class Clientedirecciones extends \App\Controllers\BaseResourceController
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function getPaisListItems($selId = null)
|
||||
{
|
||||
$paisModel = model('App\Models\Configuracion\PaisModel');
|
||||
$onlyActiveOnes = true;
|
||||
$data = $paisModel->getAllForMenu('id, nombre', 'nombre', $onlyActiveOnes);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function getComunidadAutonomaListItems($selId = null)
|
||||
{
|
||||
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('ComunidadesAutonomas.comunidadAutonoma'))])];
|
||||
if (!is_null($selId)) :
|
||||
$comunidadAutonomaModel = model('App\Models\Configuracion\ComunidadAutonomaModel');
|
||||
|
||||
$selOption = $comunidadAutonomaModel->where('id', $selId)->findColumn('nombre');
|
||||
if (!empty($selOption)) :
|
||||
$data[$selId] = $selOption[0];
|
||||
endif;
|
||||
endif;
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function getProvinciaListItems($selId = null)
|
||||
{
|
||||
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Provincias.provincia'))])];
|
||||
if (!empty($selId)) :
|
||||
$provinciaModel = model('App\Models\Configuracion\ProvinciaModel');
|
||||
|
||||
$selOption = $provinciaModel->where('id', $selId)->findColumn('nombre');
|
||||
if (!empty($selOption)) :
|
||||
$data[$selId] = $selOption[0];
|
||||
endif;
|
||||
endif;
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,6 +41,17 @@ class Facturas extends \App\Controllers\BaseResourceController
|
||||
public function index()
|
||||
{
|
||||
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
// Se obtiene el cliente ID a partir del usuario de la sesion
|
||||
$model_user = model('App\Models\Usuarios\UserModel');
|
||||
$user = $model_user->find(auth()->user()->id);
|
||||
$clienteId = $user->cliente_id;
|
||||
} else {
|
||||
$clienteId = 0;
|
||||
}
|
||||
|
||||
$this->viewData['cliente_id'] = $clienteId;
|
||||
|
||||
$this->viewData['usingClientSideDataTable'] = true;
|
||||
|
||||
$this->viewData['pageSubTitle'] = lang('Basic.global.ManageAllRecords', [lang('Tarifaextra.tarifaextra')]);
|
||||
@ -64,6 +75,17 @@ class Facturas extends \App\Controllers\BaseResourceController
|
||||
['title' => lang("Facturas.facturaList"), 'route' => "javascript:void(0);", 'active' => true]
|
||||
];
|
||||
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
// Se obtiene el cliente ID a partir del usuario de la sesion
|
||||
$model_user = model('App\Models\Usuarios\UserModel');
|
||||
$user = $model_user->find(auth()->user()->id);
|
||||
$clienteId = $user->cliente_id;
|
||||
} else {
|
||||
$clienteId = 0;
|
||||
}
|
||||
|
||||
$viewData['cliente_id'] = $clienteId;
|
||||
|
||||
return view(static::$viewPath . 'viewFacturasList', $viewData);
|
||||
}
|
||||
|
||||
@ -105,6 +127,10 @@ class Facturas extends \App\Controllers\BaseResourceController
|
||||
|
||||
$sanitizedData['user_updated_id'] = auth()->user()->id;
|
||||
$sanitizedData['user_created_id'] = auth()->user()->id;
|
||||
|
||||
if(!$sanitizedData['creditoAsegurado']){
|
||||
$sanitizedData['creditoAsegurado'] = 0;
|
||||
}
|
||||
|
||||
if ($allData && $successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
@ -205,13 +231,14 @@ class Facturas extends \App\Controllers\BaseResourceController
|
||||
$requestedOrder = $reqData['order']['0']['column'] ?? 0;
|
||||
$order = FacturaModel::SORTABLE[$requestedOrder >= 0 ? $requestedOrder : 0];
|
||||
$dir = $reqData['order']['0']['dir'] ?? 'asc';
|
||||
$cliente_id = $reqData['cliente_id'] ?? -1;
|
||||
|
||||
$resourceData = $this->model->getResource($search)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject();
|
||||
$resourceData = $this->model->getResource($search, $cliente_id)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject();
|
||||
|
||||
return $this->respond(Collection::datatable(
|
||||
$resourceData,
|
||||
$this->model->getResource("")->countAllResults(),
|
||||
$this->model->getResource($search)->countAllResults()
|
||||
$this->model->getResource("", $cliente_id)->countAllResults(),
|
||||
$this->model->getResource($search, $cliente_id)->countAllResults()
|
||||
));
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
|
||||
@ -40,6 +40,17 @@ class Pedido extends \App\Controllers\BaseResourceController
|
||||
public function index()
|
||||
{
|
||||
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
// Se obtiene el cliente ID a partir del usuario de la sesion
|
||||
$model_user = model('App\Models\Usuarios\UserModel');
|
||||
$user = $model_user->find(auth()->user()->id);
|
||||
$clienteId = $user->cliente_id;
|
||||
} else {
|
||||
$clienteId = -1;
|
||||
}
|
||||
|
||||
$this->viewData['cliente_id'] = $clienteId;
|
||||
|
||||
$this->viewData['usingClientSideDataTable'] = true;
|
||||
|
||||
$this->viewData['pageSubTitle'] = lang('Basic.global.ManageAllRecords', [lang('Tarifaextra.tarifaextra')]);
|
||||
@ -52,13 +63,24 @@ class Pedido extends \App\Controllers\BaseResourceController
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Pedidos.pedido')]),
|
||||
'presupuestoEntity' => new PedidoEntity(),
|
||||
'pedidoEntity' => new PedidoEntity(),
|
||||
'usingServerSideDataTable' => true,
|
||||
'pageTitle' => lang('Pedidos.Pedidos'),
|
||||
'estadoPedidos' => 'activo',
|
||||
['title' => lang("App.menu_pedidos"), 'route' => site_url('pedidos/todos'), 'active' => true]
|
||||
];
|
||||
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
// Se obtiene el cliente ID a partir del usuario de la sesion
|
||||
$model_user = model('App\Models\Usuarios\UserModel');
|
||||
$user = $model_user->find(auth()->user()->id);
|
||||
$clienteId = $user->cliente_id;
|
||||
} else {
|
||||
$clienteId = -1;
|
||||
}
|
||||
|
||||
$viewData['cliente_id'] = $clienteId;
|
||||
|
||||
return view(static::$viewPath . 'viewPedidosList', $viewData);
|
||||
}
|
||||
|
||||
@ -67,13 +89,24 @@ class Pedido extends \App\Controllers\BaseResourceController
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Pedidos.pedido')]),
|
||||
'presupuestoEntity' => new PedidoEntity(),
|
||||
'pedidoEntity' => new PedidoEntity(),
|
||||
'usingServerSideDataTable' => true,
|
||||
'pageTitle' => lang('Pedidos.Pedidos'),
|
||||
'estadoPedidos' => 'finalizado',
|
||||
['title' => lang("App.menu_pedidos"), 'route' => site_url('pedidos/todos'), 'active' => true]
|
||||
];
|
||||
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
// Se obtiene el cliente ID a partir del usuario de la sesion
|
||||
$model_user = model('App\Models\Usuarios\UserModel');
|
||||
$user = $model_user->find(auth()->user()->id);
|
||||
$clienteId = $user->cliente_id;
|
||||
} else {
|
||||
$clienteId = -1;
|
||||
}
|
||||
|
||||
$viewData['cliente_id'] = $clienteId;
|
||||
|
||||
return view(static::$viewPath . 'viewPedidosList', $viewData);
|
||||
}
|
||||
|
||||
@ -82,13 +115,24 @@ class Pedido extends \App\Controllers\BaseResourceController
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Pedidos.pedido')]),
|
||||
'presupuestoEntity' => new PedidoEntity(),
|
||||
'pedidoEntity' => new PedidoEntity(),
|
||||
'usingServerSideDataTable' => true,
|
||||
'pageTitle' => lang('Pedidos.Pedidos'),
|
||||
'estadoPedidos' => 'cancelado',
|
||||
['title' => lang("App.menu_pedidos"), 'route' => site_url('pedidos/todos'), 'active' => true]
|
||||
];
|
||||
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
// Se obtiene el cliente ID a partir del usuario de la sesion
|
||||
$model_user = model('App\Models\Usuarios\UserModel');
|
||||
$user = $model_user->find(auth()->user()->id);
|
||||
$clienteId = $user->cliente_id;
|
||||
} else {
|
||||
$clienteId = -1;
|
||||
}
|
||||
|
||||
$viewData['cliente_id'] = $clienteId;
|
||||
|
||||
return view(static::$viewPath . 'viewPedidosList', $viewData);
|
||||
}
|
||||
|
||||
@ -98,13 +142,24 @@ class Pedido extends \App\Controllers\BaseResourceController
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Pedidos.pedido')]),
|
||||
'presupuestoEntity' => new PedidoEntity(),
|
||||
'pedidoEntity' => new PedidoEntity(),
|
||||
'usingServerSideDataTable' => true,
|
||||
'pageTitle' => lang('Pedidos.Pedidos'),
|
||||
'estadoPedidos' => 'todos',
|
||||
['title' => lang("App.menu_pedidos"), 'route' => site_url('pedidos/todos'), 'active' => true]
|
||||
];
|
||||
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
// Se obtiene el cliente ID a partir del usuario de la sesion
|
||||
$model_user = model('App\Models\Usuarios\UserModel');
|
||||
$user = $model_user->find(auth()->user()->id);
|
||||
$clienteId = $user->cliente_id;
|
||||
} else {
|
||||
$clienteId = -1;
|
||||
}
|
||||
|
||||
$viewData['cliente_id'] = $clienteId;
|
||||
|
||||
return view(static::$viewPath . 'viewPedidosList', $viewData);
|
||||
|
||||
}
|
||||
@ -242,6 +297,7 @@ class Pedido extends \App\Controllers\BaseResourceController
|
||||
$order = PedidoModel::SORTABLE_TODOS[$requestedOrder >= 0 ? $requestedOrder : 0];
|
||||
$dir = $reqData['order']['0']['dir'] ?? 'asc';
|
||||
$estado = $reqData['estado'] ?? 'todos';
|
||||
$cliente_id = $reqData['cliente_id'] ?? -1;
|
||||
if($estado == 'todos') $estado = '';
|
||||
|
||||
$showTotal = $reqData['showTotal'] ?? false;
|
||||
@ -249,9 +305,9 @@ class Pedido extends \App\Controllers\BaseResourceController
|
||||
$searchValues = get_filter_datatables_columns($reqData);
|
||||
|
||||
$model_linea = model('\App\Models\Pedidos\PedidoLineaModel');
|
||||
$resourceData = $model_linea->getResource($searchValues, $estado)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject();
|
||||
$totalTirada = $model_linea->getSumOfTirada($searchValues, $estado, $start, $length);
|
||||
$total = $model_linea->getSumOfTotalAceptado($searchValues, $estado, $start, $length);
|
||||
$resourceData = $model_linea->getResource($searchValues, $estado, $cliente_id)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject();
|
||||
$totalTirada = $model_linea->getSumOfTirada($searchValues, $estado, $cliente_id, $start, $length);
|
||||
$total = $model_linea->getSumOfTotalAceptado($searchValues, $estado, $cliente_id, $start, $length);
|
||||
$total2 = 0;
|
||||
if($showTotal){
|
||||
$total2 = $model_linea->getTotalOfTotalAceptado();
|
||||
|
||||
@ -367,7 +367,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$gramajeCubierta = $reqData['gramajeCubierta'] ?? 0;
|
||||
$carasCubierta = intval($reqData['carasCubierta'] ?? 0);
|
||||
$solapasCubierta = intval($reqData['solapasCubierta'] ?? 0);
|
||||
$acabadoCubierta = $reqData['datos_libro']['acabadoCubierta'] ?? 0;
|
||||
$acabadoCubierta = $reqData['acabadoCubierta'] ?? 0;
|
||||
|
||||
// Sobrecubierta
|
||||
$sobreCubierta = $reqData["sobrecubierta"] ?? null;
|
||||
@ -1310,7 +1310,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$acabadoCubierta = [];
|
||||
if ($tarifaAcabadoCubierta > 0) {
|
||||
$model = model('App\Models\Presupuestos\PresupuestoAcabadosModel');
|
||||
$acabadoCubierta = $model->getPrecioTarifa($tarifaAcabadoCubierta, $datosPedido->tirada, $POD);
|
||||
$acabadoCubierta = $model->getPrecioTarifa($tarifaAcabadoCubierta, $datosPedido->tirada, -1, $POD);
|
||||
}
|
||||
if (count($acabadoCubierta) > 0) {
|
||||
if ($acabadoCubierta[0]->total <= 0)
|
||||
|
||||
@ -110,7 +110,7 @@ class Presupuestoencuadernaciones extends \App\Controllers\BaseResourceControlle
|
||||
$proveedor_id = $reqData['proveedor_id'] ?? 0;
|
||||
}
|
||||
else{
|
||||
$solapas = $reqData['solapas'] ?? -1;
|
||||
$solapas = $reqData['solapas'] ?? 0;
|
||||
}
|
||||
$paginas = $reqData['paginas'] ?? 0;
|
||||
$tirada = $reqData['tirada'] ?? 0;
|
||||
|
||||
@ -54,6 +54,9 @@ return [
|
||||
'userCreatedId' => 'User Created ID',
|
||||
'userUpdateId' => 'User Update ID',
|
||||
'vencimiento' => 'Vencimiento',
|
||||
|
||||
'direccionesEnvio' => 'Shipping Addresses',
|
||||
|
||||
'validation' => [
|
||||
'ccc' => [
|
||||
'max_length' => 'The {field} field cannot exceed {param} characters in length.',
|
||||
|
||||
@ -674,6 +674,7 @@ return [
|
||||
"menu_clientes" => "Clientes",
|
||||
"menu_plantillas_tarifas_clientes" => "Plantillas Tarifas",
|
||||
"menu_perfil_clientes" => "Perfil",
|
||||
"menu_direcciones_clientes" => "Direcciones",
|
||||
"menu_cliente" => "Cliente",
|
||||
"menu_clientes_nuevo" => "Nuevo",
|
||||
"menu_tarifacliente" => "Tarifas",
|
||||
|
||||
@ -46,6 +46,9 @@ return [
|
||||
'userCreatedId' => 'User Created ID',
|
||||
'userUpdateId' => 'User Update ID',
|
||||
'vencimiento' => 'Vencimiento',
|
||||
|
||||
'direccionesEnvio' => 'Direcciones de Envío',
|
||||
|
||||
'validation' => [
|
||||
'ccc' => [
|
||||
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||
|
||||
@ -27,6 +27,7 @@ return [
|
||||
'clientesSection' => 'Clientes',
|
||||
'plantillaTarifaSection' => 'Plantilla de tarifas',
|
||||
'perfilSection' => 'Perfil',
|
||||
'direccionesSection' => 'Direcciones',
|
||||
'presupuestoSection' => 'Presupuestos',
|
||||
'presupuestoClienteSection' => 'Presupuestos',
|
||||
'tarifaPreimpresionSection' => 'Tarifas de preimpresión',
|
||||
|
||||
@ -72,7 +72,7 @@ class FacturaModel extends \App\Models\BaseModel {
|
||||
|
||||
public static $labelField = "id";
|
||||
|
||||
public function getResource(string $search = "")
|
||||
public function getResource(string $search = "", $cliente_id=-1)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
@ -90,8 +90,16 @@ class FacturaModel extends \App\Models\BaseModel {
|
||||
$builder->join("formas_pago t4", "t3.forma_pago_id = t4.id", "left");
|
||||
|
||||
$builder->where("t1.deleted_at IS NULL");
|
||||
if(auth()->user()->inGroup("cliente-admin") || auth()->user()->inGroup("cliente-editor")) {
|
||||
$builder->where("t1.estado", "validada");
|
||||
}
|
||||
|
||||
if($cliente_id != -1) {
|
||||
$builder->where("t1.cliente_id", $cliente_id);
|
||||
}
|
||||
|
||||
$builder->groupBy("t1.id"); // Agrupa por id de la factura
|
||||
|
||||
|
||||
return empty($search)
|
||||
? $builder
|
||||
: $builder
|
||||
|
||||
@ -48,7 +48,7 @@ class PedidoLineaModel extends \App\Models\BaseModel
|
||||
public static $labelField = "id";
|
||||
|
||||
|
||||
public function getResource($search = [], $estado="")
|
||||
public function getResource($search = [], $estado="", $cliente_id = -1)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
@ -75,6 +75,10 @@ class PedidoLineaModel extends \App\Models\BaseModel
|
||||
}
|
||||
}
|
||||
|
||||
if($cliente_id != -1) {
|
||||
$builder->where("t3.cliente_id", $cliente_id);
|
||||
}
|
||||
|
||||
if (empty($search))
|
||||
return $builder;
|
||||
else {
|
||||
@ -93,7 +97,7 @@ class PedidoLineaModel extends \App\Models\BaseModel
|
||||
}
|
||||
}
|
||||
|
||||
public function getSumOfTirada(array $search, $estado = '', $start = 0, $length = 5)
|
||||
public function getSumOfTirada(array $search, $estado = '', $cliente_id=-1, $start = 0, $length = 5)
|
||||
{
|
||||
|
||||
$builder = $this->db
|
||||
@ -104,6 +108,9 @@ class PedidoLineaModel extends \App\Models\BaseModel
|
||||
$builder->join("presupuestos t3", "t1.presupuesto_id = t3.id", "left");
|
||||
|
||||
|
||||
if($cliente_id != -1) {
|
||||
$builder->where("t3.cliente_id", $cliente_id);
|
||||
}
|
||||
|
||||
// Aplica los filtros de búsqueda y estado
|
||||
if (!empty($search)) {
|
||||
@ -130,7 +137,7 @@ class PedidoLineaModel extends \App\Models\BaseModel
|
||||
return $builder->get()->getRow()->total_tirada;
|
||||
}
|
||||
|
||||
public function getSumOfTotalAceptado(array $search, $estado = '', $start = 0, $length = 5)
|
||||
public function getSumOfTotalAceptado(array $search, $estado = '', $cliente_id=-1, $start = 0, $length = 5)
|
||||
{
|
||||
|
||||
$builder = $this->db
|
||||
@ -140,7 +147,9 @@ class PedidoLineaModel extends \App\Models\BaseModel
|
||||
$builder->join("pedidos t2", "t2.id = t1.pedido_id", "left");
|
||||
$builder->join("presupuestos t3", "t1.presupuesto_id = t3.id", "left");
|
||||
|
||||
|
||||
if($cliente_id != -1) {
|
||||
$builder->where("t3.cliente_id", $cliente_id);
|
||||
}
|
||||
|
||||
// Aplica los filtros de búsqueda y estado
|
||||
if (!empty($search)) {
|
||||
|
||||
@ -139,6 +139,7 @@ class BuscadorModel extends \App\Models\BaseModel
|
||||
|
||||
$builder->where("t1.is_deleted", 0);
|
||||
|
||||
|
||||
if (empty($search))
|
||||
return $builder;
|
||||
else {
|
||||
|
||||
@ -1421,7 +1421,7 @@ $('#tableOfDireccionesEnvio').on( 'click', 'tbody span.edit-add', function (e) {
|
||||
$('#add_municipio').val(data.municipio)
|
||||
$('#add_provincia').val(data.provincia)
|
||||
$('#add_cp').val(data.cp)
|
||||
$('#add_telefono').val(data.cp)
|
||||
$('#add_telefono').val(data.telefono)
|
||||
|
||||
var $newAddDialog = $("#addressForm")
|
||||
$newAddDialog.modal('show')
|
||||
|
||||
@ -0,0 +1,299 @@
|
||||
<?= $this->include('themes/_commonPartialsBs/select2bs5') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?=lang('Clientes.direccionesEnvio') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<?= view("themes/vuexy/form/clientes/cliente/_clienteDireccionesForm") ?>
|
||||
|
||||
<table id="tableOfDireccionesEnvio" class="table dt-responsive dataTable" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('ClienteDirecciones.alias') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.att') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.email') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.direccion') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.cp') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.municipio') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.provincia') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.pais') ?></th>
|
||||
<th><?= lang('ClienteDirecciones.telefono') ?></th>
|
||||
<th class="text-nowrap" style="min-width:100px;"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
/****************************************
|
||||
Direcciones cliente
|
||||
*****************************************/
|
||||
const actionBtns_add = function(data) {
|
||||
return `
|
||||
<span class="edit-add"><a href="javascript:void(0);"><i class="ti ti-pencil ti-sm btn-edit-add mx-2" data-id="${data.id}"></i></a></span>
|
||||
<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete-add mx-2" data-id="${data.id}" data-bs-toggle="modal" data-bs-target="#confirm2delete"></i></a>
|
||||
<span class="cancel"></span>
|
||||
`;
|
||||
};
|
||||
|
||||
|
||||
function saveAdd_callback(){
|
||||
if($('#addressForm').attr('action')=='create'){
|
||||
editorAddress
|
||||
.create( false )
|
||||
.set( 'cliente_id', <?= $cliente_id ?> )
|
||||
.set( 'alias', $('#add_alias').val() )
|
||||
.set( 'att', $('#add_att').val() )
|
||||
.set( 'email', $('#add_email').val() )
|
||||
.set( 'direccion', $('#add_direccion').val() )
|
||||
.set( 'pais_id', $("#add_pais_id option:selected").val())
|
||||
.set( 'municipio', $('#add_municipio').val() )
|
||||
.set( 'provincia', $('#add_provincia').val() )
|
||||
.set( 'cp', $('#add_cp').val() )
|
||||
.set( 'telefono', $('#add_telefono').val() )
|
||||
.submit();
|
||||
}
|
||||
else{ // edit
|
||||
editorAddress
|
||||
.edit( '#tableOfDireccionesEnvio tbody tr:eq('+$("#addressForm").attr('row-index')+ ')', false )
|
||||
.set( 'cliente_id', <?= $cliente_id ?> )
|
||||
.set( 'alias', $('#add_alias').val() )
|
||||
.set( 'att', $('#add_att').val() )
|
||||
.set( 'email', $('#add_email').val() )
|
||||
.set( 'direccion', $('#add_direccion').val() )
|
||||
.set( 'pais_id', $("#add_pais_id option:selected").val())
|
||||
.set( 'municipio', $('#add_municipio').val() )
|
||||
.set( 'provincia', $('#add_provincia').val() )
|
||||
.set( 'cp', $('#add_cp').val() )
|
||||
.set( 'telefono', $('#add_telefono').val() )
|
||||
.submit();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const editorAddress = new DataTable.Editor({
|
||||
ajax: {
|
||||
url: "<?= route_to('editorOfClienteDirecciones') ?>",
|
||||
headers: {
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v,
|
||||
},
|
||||
},
|
||||
table : "#tableOfDireccionesEnvio",
|
||||
idSrc: 'id',
|
||||
fields: [ {
|
||||
name: "alias"
|
||||
}, {
|
||||
name: "att"
|
||||
}, {
|
||||
name: "email"
|
||||
}, {
|
||||
name: "direccion"
|
||||
}, {
|
||||
name: "municipio"
|
||||
}, {
|
||||
name: "provincia"
|
||||
}, {
|
||||
name: "pais_id"
|
||||
}, {
|
||||
name: "cp"
|
||||
}, {
|
||||
name: "telefono"
|
||||
}, {
|
||||
"name": "cliente_id",
|
||||
"type": "hidden"
|
||||
},
|
||||
],
|
||||
template: '#direccionesForm'
|
||||
});
|
||||
|
||||
editorAddress.on( 'postSubmit', function ( e, json, data, action ) {
|
||||
|
||||
yeniden(json.<?= csrf_token() ?>);
|
||||
|
||||
$( ".error-text-form" ).remove();
|
||||
if('fieldErrors' in json){
|
||||
if(json.fieldErrors.length > 0){
|
||||
json.fieldErrors.forEach((error) => {
|
||||
$('#add_' + error.name).after(
|
||||
"<p style='font-size: 11px !important;" +
|
||||
"padding: 0 !important; " +
|
||||
"color: #b11f1f !important;' " +
|
||||
"class='error-text-form'>" + error.status + '</p>')
|
||||
})
|
||||
}
|
||||
}
|
||||
else{
|
||||
$('#addressForm').modal("hide");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
editorAddress.on( 'submitSuccess', function ( e, json, data, action ) {
|
||||
|
||||
tableDirecciones.clearPipeline();
|
||||
tableDirecciones.draw();
|
||||
});
|
||||
|
||||
editorAddress.on( 'close', function ( e, json, data, action ) {
|
||||
$('#tableOfDireccionesEnvio').DataTable().ajax.reload();
|
||||
})
|
||||
|
||||
const lastColNr2 = $('#tableOfDireccionesEnvio').find("tr:first th").length - 1;
|
||||
|
||||
var tableDirecciones = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
draw:2,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
autoWidth: true,
|
||||
responsive: true,
|
||||
order: [0, "asc" ],
|
||||
pageLength: 10,
|
||||
lengthChange: false,
|
||||
searching: false,
|
||||
paging: true,
|
||||
info: false,
|
||||
dom: '<"mt-4"><"float-end"B><"float-start"l><t><"mt-4 mb-3"p>',
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfClienteDirecciones') ?>',
|
||||
data: function ( d ) {
|
||||
d.cliente_id = <?= $cliente_id ?>;
|
||||
},
|
||||
method: 'POST',
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
columns: [
|
||||
{ 'data': 'alias' },
|
||||
{ 'data': 'att' },
|
||||
{ 'data': 'email' },
|
||||
{ 'data': 'direccion' },
|
||||
{ 'data': 'cp' },
|
||||
{ 'data': 'municipio' },
|
||||
{ 'data': 'provincia' },
|
||||
{ 'data': 'pais_id' ,
|
||||
"render": function (data, type, row, meta) {
|
||||
return row.pais;
|
||||
}},
|
||||
{ 'data': 'telefono' },
|
||||
{
|
||||
data: actionBtns_add,
|
||||
className: 'row-edit dt-center'
|
||||
}
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr2]
|
||||
},
|
||||
{"orderData": [ 0], "targets": 0 },
|
||||
|
||||
],
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
buttons: [ {
|
||||
className: 'btn btn-primary float-end me-sm-3 me-1',
|
||||
text: "<?= lang('Basic.global.addNew'); ?>",
|
||||
action: function ( e, dt, node, config ) {
|
||||
$("#addressForm").attr('action','create')
|
||||
var $newAddDialog = $("#addressForm")
|
||||
$newAddDialog.modal('show')
|
||||
}
|
||||
} ]
|
||||
} );
|
||||
|
||||
|
||||
$('#tableOfDireccionesEnvio').on( 'click', 'tbody span.edit-add', function (e) {
|
||||
|
||||
const row = $(this).closest('tr');
|
||||
const data = tableDirecciones.row(row).data()
|
||||
|
||||
$("#addressForm").attr('action','edit')
|
||||
$("#addressForm").attr('row-index',row[0]._DT_RowIndex)
|
||||
|
||||
$('#add_alias').val(data.alias)
|
||||
$('#add_att').val(data.att)
|
||||
$('#add_email').val(data.email)
|
||||
$('#add_direccion').val(data.direccion)
|
||||
$("#add_pais_id").val(data.pais_id).change()
|
||||
$('#add_municipio').val(data.municipio)
|
||||
$('#add_provincia').val(data.provincia)
|
||||
$('#add_cp').val(data.cp)
|
||||
$('#add_telefono').val(data.telefono)
|
||||
|
||||
var $newAddDialog = $("#addressForm")
|
||||
$newAddDialog.modal('show')
|
||||
})
|
||||
|
||||
$(document).on('click', '.btn-delete-add', function(e) {
|
||||
$(".btn-remove").attr('data-id', $(this).attr('data-id'));
|
||||
$(".btn-remove").attr('table-id', '#tableOfDireccionesEnvio');
|
||||
});
|
||||
|
||||
function delete_direccion_envio(dataId){
|
||||
$.ajax({
|
||||
url: `/clientes/clientedirecciones/delete/${dataId}`,
|
||||
method: 'GET',
|
||||
}).done((data, textStatus, jqXHR) => {
|
||||
$('#confirm2delete').modal('toggle');
|
||||
tableDirecciones.clearPipeline();
|
||||
tableDirecciones.ajax.reload();
|
||||
popSuccessAlert(data.msg ?? jqXHR.statusText);
|
||||
}).fail((jqXHR, textStatus, errorThrown) => {
|
||||
popErrorAlert(jqXHR.responseJSON.messages.error)
|
||||
})
|
||||
}
|
||||
|
||||
$(document).on('click', '.btn-remove', function(e) {
|
||||
|
||||
const dataId = $(this).attr('data-id');
|
||||
const tableId = $(this).attr('table-id');
|
||||
|
||||
if ($.isNumeric(dataId)) {
|
||||
if(tableId=='#tableOfDireccionesEnvio')
|
||||
delete_direccion_envio(dataId)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.bootstrap5.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/vendor/libs/datatables-bs5/datatables.bootstrap5.css") ?>">
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<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/jszip/jszip.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/pdfmake.min.js") ?>" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/vfs_fonts.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/js/datatables-editor/dataTables.editor.min.js') ?>"></script>
|
||||
<?=$this->endSection() ?>
|
||||
@ -37,6 +37,7 @@
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if(!(auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))) : ?>
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="serie_id" class="form-label">
|
||||
@ -47,6 +48,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
@ -60,6 +62,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-2 px-4">
|
||||
@ -72,6 +75,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<?php if(!(auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))) : ?>
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="cliente_id" class="form-label">
|
||||
@ -85,6 +89,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!--//.row -->
|
||||
|
||||
@ -201,6 +206,7 @@
|
||||
]
|
||||
) ?>
|
||||
|
||||
<?php if(!(auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))) : ?>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-label-primary float-start me-sm-3 me-1"
|
||||
@ -209,7 +215,7 @@
|
||||
<span class="ti-xs ti ti-copy me-1"></span>
|
||||
<?= lang("Facturas.duplicar") ?>
|
||||
</button>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -244,7 +244,7 @@ var tableLineas = $('#tableOfLineasFactura').DataTable({
|
||||
data: "descripcion",
|
||||
render: function (data, type, row, meta) {
|
||||
|
||||
if(row.pedido_linea_impresion_id != null){
|
||||
if(row.pedido_linea_impresion_id != null && <?= (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) ? 0 : 1 ?>){
|
||||
|
||||
// se convierten a float data.total_aceptado y subtotal
|
||||
var total_aceptado = parseFloat(row.total_aceptado);
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<?php if(!(auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))) : ?>
|
||||
<div id="addPagoRow" class="row">
|
||||
<div class="col-md-12 col-lg-2">
|
||||
<button
|
||||
@ -40,7 +41,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -56,12 +57,16 @@ formas_pago.forEach(function(pago) {
|
||||
});
|
||||
|
||||
const actionBtns_pagos = function(data) {
|
||||
<?php if(!(auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))) : ?>
|
||||
return `
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete-pago mx-2" data-id="${data.id}"></i></a>
|
||||
<span class="edit-pago"><a href="javascript:void(0);"><i class="ti ti-pencil ti-sm btn-edit-pago mx-2" data-id="${data.id}"></i></a></span>
|
||||
<span class="cancel-pago"></span>
|
||||
</div>`;
|
||||
<?php else: ?>
|
||||
return '';
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
var editor_pagos = new $.fn.dataTable.Editor( {
|
||||
|
||||
@ -142,6 +142,9 @@
|
||||
ajax : $.fn.dataTable.pipeline( {
|
||||
url: '<?= route_to('dataTableOfFacturas') ?>',
|
||||
method: 'POST',
|
||||
data: function(d, settings){
|
||||
d.cliente_id = "<?= $cliente_id ?>";
|
||||
},
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
}),
|
||||
@ -258,6 +261,18 @@
|
||||
]
|
||||
});
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
if(<?= $cliente_id ?> != -1){
|
||||
theTable.column(3).visible(false);
|
||||
theTable.column(7).visible(false);
|
||||
theTable.column(8).visible(false);
|
||||
theTable.column(9).visible(false);
|
||||
theTable.column(10).visible(false);
|
||||
theTable.column(11).visible(false);
|
||||
theTable.column(12).visible(false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.btn-edit', function(e) {
|
||||
var url = '<?= route_to('editarFactura', ':id') ?>';
|
||||
|
||||
@ -22,17 +22,19 @@
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="cliente" class="form-label">
|
||||
<?= lang('Pedidos.cliente') ?>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a href="<?= route_to('editarCliente', $pedidoEntity->cliente_id); ?>" target="_blank" ><i class="ti ti-file-search ti-sm btn-edit mx-2" data-id="${data.id}"></i></a>
|
||||
</div>
|
||||
</label>
|
||||
<input readonly id="cliente" name="cliente" tabindex="2" maxLength="11" class="form-control" value="<?= old('cliente', $pedidoEntity->cliente) ?>" >
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
<?php if (!(auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))) : ?>
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="cliente" class="form-label">
|
||||
<?= lang('Pedidos.cliente') ?>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a href="<?= route_to('editarCliente', $pedidoEntity->cliente_id); ?>" target="_blank" ><i class="ti ti-file-search ti-sm btn-edit mx-2" data-id="${data.id}"></i></a>
|
||||
</div>
|
||||
</label>
|
||||
<input readonly id="cliente" name="cliente" tabindex="2" maxLength="11" class="form-control" value="<?= old('cliente', $pedidoEntity->cliente) ?>" >
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
|
||||
@ -55,102 +57,104 @@
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
|
||||
<?php if (!(auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))) : ?>
|
||||
<div class="accordion accordion mt-3 accordion-without-arrow" id="FechasPedido">
|
||||
<div class="card accordion-item active mt-3 mx-2">
|
||||
<h2 class="accordion-header" id="headingFechas">
|
||||
<button type="button" class="accordion-button collapsed" data-bs-toggle="collapse" data-bs-target="#accordionIcon-1" aria-controls="accordionIcon-1">
|
||||
<i class="ti ti-businessplan ti-sm mx-2"></i><?= lang('Pedidos.totales') ?>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div class="accordion accordion mt-3 accordion-without-arrow" id="FechasPedido">
|
||||
<div class="card accordion-item active mt-3 mx-2">
|
||||
<h2 class="accordion-header" id="headingFechas">
|
||||
<button type="button" class="accordion-button collapsed" data-bs-toggle="collapse" data-bs-target="#accordionIcon-1" aria-controls="accordionIcon-1">
|
||||
<i class="ti ti-businessplan ti-sm mx-2"></i><?= lang('Pedidos.totales') ?>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="accordionFechasTip" class="accordion show" data-bs-parent="#accordioFechas">
|
||||
<div class="accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="total_precio" class="form-label">
|
||||
<?= lang('Pedidos.total_precio') ?>
|
||||
</label>
|
||||
<input readonly id="total_precio" name="total_precio" tabindex="1" maxLength="11" class="form-control" value="<?= old('total_precio', $pedidoEntity->total_precio) ?>" >
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="total_tirada" class="form-label">
|
||||
<?= lang('Pedidos.total_tirada') ?>
|
||||
</label>
|
||||
<input readonly id="total_tirada" name="total_tirada" tabindex="1" maxLength="11" class="form-control" value="<?= old('total_tirada', $pedidoEntity->total_tirada ) ?>" >
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div id="accordionFechasTip" class="accordion show" data-bs-parent="#accordioFechas">
|
||||
<div class="accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="total_precio" class="form-label">
|
||||
<?= lang('Pedidos.total_precio') ?>
|
||||
</label>
|
||||
<input readonly id="total_precio" name="total_precio" tabindex="1" maxLength="11" class="form-control" value="<?= old('total_precio', $pedidoEntity->total_precio) ?>" >
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="total_tirada" class="form-label">
|
||||
<?= lang('Pedidos.total_tirada') ?>
|
||||
</label>
|
||||
<input readonly id="total_tirada" name="total_tirada" tabindex="1" maxLength="11" class="form-control" value="<?= old('total_tirada', $pedidoEntity->total_tirada ) ?>" >
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div>
|
||||
</div> <!--//accordion-body -->
|
||||
</div> <!--//accordionFechasTip-->
|
||||
</div> <!--//card-->
|
||||
</div>
|
||||
</div> <!--//accordion-body -->
|
||||
</div> <!--//accordionFechasTip-->
|
||||
</div> <!--//card-->
|
||||
</div>
|
||||
|
||||
<div class="accordion accordion mt-3 accordion-without-arrow" id="FechasPedido">
|
||||
<div class="card accordion-item active mt-3 mx-2">
|
||||
<h2 class="accordion-header" id="headingFechas">
|
||||
<button type="button" class="accordion-button collapsed" data-bs-toggle="collapse" data-bs-target="#accordionIcon-1" aria-controls="accordionIcon-1">
|
||||
<i class="ti ti-calendar ti-sm mx-2"></i><?= lang("Pedidos.fechas") ?>
|
||||
</button>
|
||||
</h2>
|
||||
<div class="accordion accordion mt-3 accordion-without-arrow" id="FechasPedido">
|
||||
<div class="card accordion-item active mt-3 mx-2">
|
||||
<h2 class="accordion-header" id="headingFechas">
|
||||
<button type="button" class="accordion-button collapsed" data-bs-toggle="collapse" data-bs-target="#accordionIcon-1" aria-controls="accordionIcon-1">
|
||||
<i class="ti ti-calendar ti-sm mx-2"></i><?= lang("Pedidos.fechas") ?>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<div id="accordionFechasTip" class="accordion show" data-bs-parent="#accordioFechas">
|
||||
<div class="accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="fecha_entrega_real" class="fecha-pedido form-label">
|
||||
<?= lang('Pedidos.fecha_entrega_real') ?>
|
||||
</label>
|
||||
<input type="text" value="" id="fecha_entrega_real" name="fecha_entrega_real" tabindex="1" maxLength="11" class="form-control" value="<?= old('fecha_entrega_real', $pedidoEntity->fecha_entrega_real) ?>" >
|
||||
<div id="accordionFechasTip" class="accordion show" data-bs-parent="#accordioFechas">
|
||||
<div class="accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="fecha_entrega_real" class="fecha-pedido form-label">
|
||||
<?= lang('Pedidos.fecha_entrega_real') ?>
|
||||
</label>
|
||||
<input type="text" value="" id="fecha_entrega_real" name="fecha_entrega_real" tabindex="1" maxLength="11" class="form-control" value="<?= old('fecha_entrega_real', $pedidoEntity->fecha_entrega_real) ?>" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="fecha_impresion" class="form-label">
|
||||
<?= lang('Pedidos.fecha_impresion') ?>
|
||||
</label>
|
||||
<input type="text" id="fecha_impresion" name="fecha_impresion" tabindex="1" maxLength="11" class="fecha-pedido form-control" value="<?= old('fecha_impresion', $pedidoEntity->fecha_impresion) ?>" >
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="fecha_impresion" class="form-label">
|
||||
<?= lang('Pedidos.fecha_impresion') ?>
|
||||
</label>
|
||||
<input type="text" id="fecha_impresion" name="fecha_impresion" tabindex="1" maxLength="11" class="fecha-pedido form-control" value="<?= old('fecha_impresion', $pedidoEntity->fecha_impresion) ?>" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="fecha_encuadernado" class="form-label">
|
||||
<?= lang('Pedidos.fecha_encuadernado') ?>
|
||||
</label>
|
||||
<input type="text" id="fecha_encuadernado" name="fecha_encuadernado" tabindex="1" maxLength="11" class="fecha-pedido form-control" value="<?= old('fecha_encuadernado', $pedidoEntity->fecha_encuadernado) ?>" >
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="fecha_encuadernado" class="form-label">
|
||||
<?= lang('Pedidos.fecha_encuadernado') ?>
|
||||
</label>
|
||||
<input type="text" id="fecha_encuadernado" name="fecha_encuadernado" tabindex="1" maxLength="11" class="fecha-pedido form-control" value="<?= old('fecha_encuadernado', $pedidoEntity->fecha_encuadernado) ?>" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="fecha_entrega_externo" class="form-label">
|
||||
<?= lang('Pedidos.fecha_entrega_externo') ?>
|
||||
</label>
|
||||
<input type="text" id="fecha_entrega_externo" name="fecha_entrega_externo" tabindex="1" maxLength="11" class="fecha-pedido form-control" value="<?= old('fecha_entrega_externo', $pedidoEntity->fecha_entrega_externo) ?>" >
|
||||
<div class="col-md-12 col-lg-3 px-4">
|
||||
<div class="mb-1">
|
||||
<label for="fecha_entrega_externo" class="form-label">
|
||||
<?= lang('Pedidos.fecha_entrega_externo') ?>
|
||||
</label>
|
||||
<input type="text" id="fecha_entrega_externo" name="fecha_entrega_externo" tabindex="1" maxLength="11" class="fecha-pedido form-control" value="<?= old('fecha_entrega_externo', $pedidoEntity->fecha_entrega_externo) ?>" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!--//accordionFechasTip-->
|
||||
</div> <!--//card-->
|
||||
</div>
|
||||
</div> <!--//accordionFechasTip-->
|
||||
</div> <!--//card-->
|
||||
</div>
|
||||
|
||||
<?php if ($pedidoEntity->estado !== 'finalizado' && $pedidoEntity->estado !== 'cancelado'): ?>
|
||||
<div class="col-12 d-flex flex-row-reverse mt-4 gap-2">
|
||||
<div id="pedido_finalizado" class="buton-estado btn mt-3 btn-success waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1"><?= lang('Pedidos.finalizar') ?></span>
|
||||
<i class="ti ti-hourglass-empty ti-xs"></i>
|
||||
<?php if ($pedidoEntity->estado !== 'finalizado' && $pedidoEntity->estado !== 'cancelado'): ?>
|
||||
<div class="col-12 d-flex flex-row-reverse mt-4 gap-2">
|
||||
<div id="pedido_finalizado" class="buton-estado btn mt-3 btn-success waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1"><?= lang('Pedidos.finalizar') ?></span>
|
||||
<i class="ti ti-hourglass-empty ti-xs"></i>
|
||||
</div>
|
||||
<div id="pedido_cancelado" class="buton-estado btn mt-3 btn-danger waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1"><?= lang('Pedidos.cancelar') ?></span>
|
||||
<i class="ti ti-circle-x ti-xs"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pedido_cancelado" class="buton-estado btn mt-3 btn-danger waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1"><?= lang('Pedidos.cancelar') ?></span>
|
||||
<i class="ti ti-circle-x ti-xs"></i>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
@ -17,7 +17,9 @@
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/vuexy/form/pedidos/_cabeceraItems") ?>
|
||||
<?= view("themes/vuexy/form/pedidos/_lineasItems") ?>
|
||||
<?= view("themes/vuexy/form/pedidos/_albaranesItems") ?>
|
||||
<?php if (!(auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor'))) : ?>
|
||||
<?= view("themes/vuexy/form/pedidos/_albaranesItems") ?>
|
||||
<?php endif; ?>
|
||||
<?= view("themes/vuexy/form/pedidos/_facturasItems") ?>
|
||||
</div><!-- /.card-body -->
|
||||
<div class="pt-4">
|
||||
|
||||
@ -199,6 +199,7 @@ $('#tableOfPedidos thead tr:eq(1) th').each(function (i) {
|
||||
data: function(d, settings){
|
||||
d.estado= "<?= $estadoPedidos ?>";
|
||||
d.showTotal= $('#showTotal').is(':checked')? "1":"0";
|
||||
d.cliente_id = "<?= $cliente_id ?>";
|
||||
},
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
async: true,
|
||||
@ -283,6 +284,14 @@ $('#tableOfPedidos thead tr:eq(1) th').each(function (i) {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
if(<?= $cliente_id ?> != -1){
|
||||
// Se oculta la columna de cliente (3)
|
||||
theTable.column(3).visible(false);
|
||||
}
|
||||
else{
|
||||
theTable.column(3).visible(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ $(document).on('shown.bs.modal', function (e) {
|
||||
function previewEsquemaCubierta(isThumbnail = false) {
|
||||
|
||||
if($('#cosidoDiv').length){
|
||||
|
||||
|
||||
if ($('#cosidoDiv').hasClass('checked') || $("#fresadoDiv").hasClass('checked')) {
|
||||
//console.log("Cosido/Fresado");
|
||||
if ($("#tapaBlanda").is(":checked")) {
|
||||
@ -241,6 +241,7 @@ function portadaTapaBlanda(isThumbnail = false) {
|
||||
anchoSolapa = anchoSangrado * 0.163;
|
||||
lomoLibro = anchoSangrado * 0.09;
|
||||
anchoCubierta = (2 * anchoLibro) + (2 * anchoSolapa) + lomoLibro;
|
||||
offsetSolapaValor = parseFloat('3.0'); // mm
|
||||
}
|
||||
|
||||
// Clear the canvas element
|
||||
@ -377,11 +378,11 @@ function portadaTapaBlanda(isThumbnail = false) {
|
||||
previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||
// Cotas
|
||||
previewEC.makeText(pvObj.lomoLibro + " mm", origenEC.x, origenEC.y + (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.altoLibro + " mm", origenEC.x + (lomoLibro / 2) + 25, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + pvObj.offsetSolapa)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||
origenEC.x,
|
||||
origenEC.y + (altoLibro / 2) + 50,
|
||||
styleCotas);
|
||||
@ -614,8 +615,8 @@ function portadaGrapado(isThumbnail = false) {
|
||||
let altoLibro, anchoLibro, lomoLibro, anchoSolapa, anchoCubierta, altoSangrado, anchoSangrado;
|
||||
let styleCotas = {size: 12, family: 'Public Sans'};
|
||||
let sangradoTexto = "Sangrado 5 mm";
|
||||
let sangradoValor = parseFloat(5); // mm
|
||||
let offsetSolapaValor = parseFloat(0); // mm
|
||||
let sangradoValor = parseFloat('5.0'); // mm
|
||||
let offsetSolapaValor = parseFloat('0.0'); // mm
|
||||
|
||||
let divIdName = (isThumbnail) ? 'thumbnail_ec_shape' : 'pv_ec_shape';
|
||||
|
||||
@ -650,6 +651,7 @@ function portadaGrapado(isThumbnail = false) {
|
||||
anchoSolapa = anchoSangrado * 0.18;
|
||||
lomoLibro = 0; // ESTA ES LA DIFERENCIA PARA GRAPADO
|
||||
anchoCubierta = (2 * anchoLibro) + (2 * anchoSolapa) + lomoLibro;
|
||||
offsetSolapaValor = parseFloat('3.0'); // mm
|
||||
}
|
||||
|
||||
// Clear the canvas element
|
||||
@ -777,11 +779,11 @@ function portadaGrapado(isThumbnail = false) {
|
||||
previewEC.makeText(sangradoTexto, origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||
previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||
// Cotas
|
||||
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.altoLibro + " mm", origenEC.x + (lomoLibro / 2) + 25, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + pvObj.offsetSolapa)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||
origenEC.x,
|
||||
origenEC.y + (altoLibro / 2) + 50,
|
||||
styleCotas);
|
||||
@ -796,19 +798,21 @@ function getObjetoToPreview() {
|
||||
|
||||
if($('#cosidoDiv').length){
|
||||
pvObj = {
|
||||
lomoLibro: $('#lomo_cubierta').val() === '' ? parseFloat('0.0') : parseFloat($('#lomo_cubierta').val()),
|
||||
anchoSolapa: $('#solapasCubierta').is(':checked') ? parseFloat($('#anchoSolapasCubierta').val()) : parseFloat(0),
|
||||
lomoLibro: $('#lomo_cubierta').val() === '' ? parseFloat('0.0') : parseFloat(parseFloat($('#lomo_cubierta').val()).toFixed(2)),
|
||||
anchoSolapa: $('#solapasCubierta').is(':checked') ? parseFloat($('#anchoSolapasCubierta').val()) : parseFloat('0.0'),
|
||||
altoLibro: getDimensionLibro().alto,
|
||||
anchoLibro: getDimensionLibro().ancho
|
||||
anchoLibro: getDimensionLibro().ancho,
|
||||
offsetSolapa: $('#solapasCubierta').is(':checked') ? parseFloat('3.0') : parseFloat('0.0')
|
||||
};
|
||||
} else {
|
||||
let tamanio = $('#resumenTamanio').text().split(' ')[1].split('x');
|
||||
let solapas = parseInt($('#resumenSolapasCubierta').length ? $('#resumenSolapasCubierta').text().split(' ')[1].replace("mm", '') : 0);
|
||||
pvObj = {
|
||||
lomoLibro: $('#lomo_cubierta').val() === '' ? parseFloat('0.0') : parseFloat($('#lomo_cubierta').val()),
|
||||
lomoLibro: $('#lomo_cubierta').val() === '' ? parseFloat('0.0') : parseFloat(parseFloat($('#lomo_cubierta').val()).toFixed(2)),
|
||||
anchoSolapa: solapas,
|
||||
altoLibro: parseInt(tamanio[1]),
|
||||
anchoLibro: parseInt(tamanio[0])
|
||||
anchoLibro: parseInt(tamanio[0]),
|
||||
offsetSolapa: (solapas != 0) ? parseFloat('3.0') : parseFloat('0.0')
|
||||
};
|
||||
}
|
||||
//console.log($('#lomo_cubierta').val());
|
||||
|
||||
@ -174,7 +174,19 @@
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Duplicar</span>
|
||||
<i class="ti ti-copy ti-xs"></i>
|
||||
</button>
|
||||
|
||||
<?php
|
||||
// Mostrar boton de impresion solo en presupuestos guardados (no add!)
|
||||
if($formAction == "edit") {
|
||||
echo anchor(
|
||||
route_to("presupuestoToPdf", $presupuestoEntity->id),
|
||||
lang("Basic.global.Print"),
|
||||
[
|
||||
"class" => "btn btn-dark float-start me-sm-3 ml-2",
|
||||
"target" => "_blank"
|
||||
]
|
||||
);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -218,6 +230,17 @@
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Duplicar</span>
|
||||
<i class="ti ti-copy ti-xs"></i>
|
||||
</button>
|
||||
<?php
|
||||
// Si esta confirmado siempre es un presupuesto guardado
|
||||
echo anchor(
|
||||
route_to("presupuestoToPdf", $presupuestoEntity->id),
|
||||
lang("Basic.global.Print"),
|
||||
[
|
||||
"class" => "btn btn-dark float-start me-sm-3 ml-2",
|
||||
"target" => "_blank"
|
||||
]
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -273,7 +273,7 @@ function init_servicio_acabado(){
|
||||
function select_acabado_event(){
|
||||
|
||||
if(parseInt($('#tirada').val())>0){
|
||||
var tirada = parseInt($('#tirada').val()) + parseInt($('#merma').val())
|
||||
var tirada = parseInt($('#tirada').val())
|
||||
}
|
||||
else{
|
||||
var tirada = 0
|
||||
@ -778,7 +778,7 @@ function select_enc_event(){
|
||||
const dimension = getDimensionLibro();
|
||||
|
||||
if(parseInt($('#tirada').val())>0){
|
||||
var tirada = parseInt($('#tirada').val()) + parseInt($('#merma').val())
|
||||
var tirada = parseInt($('#tirada').val())
|
||||
}
|
||||
else{
|
||||
var tirada = 0
|
||||
@ -858,7 +858,7 @@ async function get_tarifas_enc(tipo=null, tarifa_id = -1){
|
||||
const dimension = getDimensionLibro();
|
||||
|
||||
if(parseInt($('#tirada').val())>0){
|
||||
var tirada = parseInt($('#tirada').val()) + parseInt($('#merma').val())
|
||||
var tirada = parseInt($('#tirada').val())
|
||||
}
|
||||
else{
|
||||
var tirada = 0
|
||||
@ -867,6 +867,9 @@ async function get_tarifas_enc(tipo=null, tarifa_id = -1){
|
||||
var datos = {
|
||||
tarifa_encuadernacion_id : tarifa_id,
|
||||
tirada: tirada,
|
||||
paginas: parseInt($('#paginas').val())>0?parseInt($('#paginas').val()):0,
|
||||
ancho: dimension.ancho,
|
||||
alto: dimension.alto,
|
||||
POD: parseInt($('#POD').val())
|
||||
};
|
||||
datos = Object.assign(datos, window.token_ajax)
|
||||
@ -923,7 +926,7 @@ async function get_tarifas_enc(tipo=null, tarifa_id = -1){
|
||||
data: function (params) {
|
||||
|
||||
if( parseInt( $('#tirada').val() )>0){
|
||||
var tirada = parseInt($('#tirada').val()) + parseInt($('#merma').val())
|
||||
var tirada = parseInt($('#tirada').val())
|
||||
}
|
||||
else{
|
||||
var tirada = 0
|
||||
|
||||
@ -89,7 +89,9 @@ function updateTotales(updateLP=true, updateServicios=true, updateEnvio=true){
|
||||
var subId = $('#tableOfServiciosEncuadernacion').DataTable().cell(currentRow,0).node().innerHTML;
|
||||
var total = parseFloat($('#precio_total_encuadernado_' + subId)[0].value)
|
||||
totalServicios += total
|
||||
margenServicios += (total*parseFloat($('#enc_margen_' + subId)[0].innerHTML)/100.0)
|
||||
var base = parseFloat($('#precio_total_encuadernado_' + subId)[0].value)/(1+parseFloat($('#enc_margen_' + subId)[0].innerHTML)/100.0);
|
||||
var margen = total - base;
|
||||
margenServicios += margen;
|
||||
})
|
||||
}
|
||||
|
||||
@ -99,7 +101,9 @@ function updateTotales(updateLP=true, updateServicios=true, updateEnvio=true){
|
||||
var subId = $('#tableOfServiciosAcabado').DataTable().cell(currentRow,0).node().innerHTML;
|
||||
var total = parseFloat($('#precio_total_acabado_' + subId)[0].value)
|
||||
totalServicios += total
|
||||
margenServicios += (total*parseFloat($('#acabado_margen_' + subId)[0].innerHTML)/100.0)
|
||||
var base = parseFloat($('#precio_total_acabado_' + subId)[0].value)/(1+parseFloat($('#acabado_margen_' + subId)[0].innerHTML)/100.0);
|
||||
var margen = total - base;
|
||||
margenServicios += margen;
|
||||
})
|
||||
}
|
||||
|
||||
@ -110,7 +114,9 @@ function updateTotales(updateLP=true, updateServicios=true, updateEnvio=true){
|
||||
var subId = $('#tableOfServiciosPreimpresion').DataTable().cell(currentRow,0).node().innerHTML;
|
||||
var total = parseFloat($('#precio_preimpresion_' + subId)[0].value)
|
||||
totalServicios += total
|
||||
margenServicios += (total*parseFloat($('#preimpresion_margen_' + subId)[0].innerHTML)/100.0)
|
||||
var base = parseFloat($('#precio_preimpresion_' + subId)[0].value)/(1+parseFloat($('#preimpresion_margen_' + subId)[0].innerHTML)/100.0);
|
||||
var margen = total - base;
|
||||
margenServicios += margen;
|
||||
})
|
||||
}
|
||||
|
||||
@ -121,7 +127,9 @@ function updateTotales(updateLP=true, updateServicios=true, updateEnvio=true){
|
||||
var subId = $('#tableOfServiciosExtra').DataTable().cell(currentRow,0).node().innerHTML;
|
||||
var total = parseFloat($('#precio_servicioextra_' + subId)[0].value)
|
||||
totalServicios += total
|
||||
margenServicios += (total*parseFloat($('#servicioextra_margen_' + subId)[0].innerHTML)/100.0)
|
||||
var base = parseFloat($('#precio_servicioextra_' + subId)[0].value)/(1+parseFloat($('#servicioextra_margen_' + subId)[0].innerHTML)/100.0);
|
||||
var margen = total - base;
|
||||
margenServicios += margen;
|
||||
})
|
||||
}
|
||||
|
||||
@ -132,7 +140,9 @@ function updateTotales(updateLP=true, updateServicios=true, updateEnvio=true){
|
||||
var subId = $('#tableOfServiciosManipulado').DataTable().cell(currentRow,0).node().innerHTML;
|
||||
var total = parseFloat($('#precio_total_manipulado_' + subId)[0].value)
|
||||
totalServicios += total
|
||||
margenServicios += (total*parseFloat($('#manipulado_margen_' + subId)[0].innerHTML)/100.0)
|
||||
var base = parseFloat($('#precio_total_manipulado_' + subId)[0].value)/(1+parseFloat($('#manipulado_margen_' + subId)[0].innerHTML)/100.0);
|
||||
var margen = total - base;
|
||||
margenServicios += margen;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -343,7 +343,6 @@ function portadaTapaBlanda(lpTagName, isCosido, isTapaDura) {
|
||||
let styleCotas = {size: 12, family: 'Public Sans'};
|
||||
let sangradoTexto = "Sangrado 5 mm";
|
||||
let sangradoValor = parseFloat(5); // mm
|
||||
let offsetSolapaValor = parseFloat(0); // mm
|
||||
|
||||
// Get the preview Object parameters
|
||||
getObjetoLP(lpTagName, isCosido, isTapaDura);
|
||||
@ -498,11 +497,11 @@ function portadaTapaBlanda(lpTagName, isCosido, isTapaDura) {
|
||||
previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||
// Cotas
|
||||
previewEC.makeText(pvObj.lomoLibro + " mm", origenEC.x, origenEC.y + (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.altoLibro + " mm", origenEC.x + (lomoLibro / 2) + 25, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + pvObj.offsetSolapa)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||
origenEC.x,
|
||||
origenEC.y + (altoLibro / 2) + 50,
|
||||
styleCotas);
|
||||
@ -717,7 +716,6 @@ function portadaGrapado(lpTagName, isCosido, isTapaDura) {
|
||||
let styleCotas = {size: 12, family: 'Public Sans'};
|
||||
let sangradoTexto = "Sangrado 5 mm";
|
||||
let sangradoValor = parseFloat(5); // mm
|
||||
let offsetSolapaValor = parseFloat(0); // mm
|
||||
|
||||
// Get the preview Object parameters
|
||||
getObjetoLP(lpTagName, isCosido, isTapaDura);
|
||||
@ -863,11 +861,11 @@ function portadaGrapado(lpTagName, isCosido, isTapaDura) {
|
||||
previewEC.makeText(sangradoTexto, origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||
previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||
// Cotas
|
||||
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||
previewEC.makeText(pvObj.altoLibro + " mm", origenEC.x + (lomoLibro / 2) + 25, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + pvObj.offsetSolapa)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||
origenEC.x,
|
||||
origenEC.y + (altoLibro / 2) + 50,
|
||||
styleCotas);
|
||||
@ -935,7 +933,8 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) {
|
||||
altoImpresion: parseFloat(rowData.maquina_impresion_alto),
|
||||
anchoImpresion: parseFloat(rowData.maquina_impresion_ancho),
|
||||
altoLibro: getDimensionLibro().alto,
|
||||
anchoLibro: getDimensionLibro().ancho
|
||||
anchoLibro: getDimensionLibro().ancho,
|
||||
offsetSolapa: 0
|
||||
};
|
||||
|
||||
//console.log(pvObj);
|
||||
@ -962,11 +961,8 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) {
|
||||
|
||||
if (pvObj.anchoSolapa != 0) {
|
||||
$('.pv-solapas').show();
|
||||
offsetSolapaValor = parseFloat(3); // 3mm
|
||||
pvObj.offsetSolapa = parseFloat(3); // 3mm
|
||||
|
||||
} else {
|
||||
$('.pv-solapas').hide();
|
||||
offsetSolapaValor = parseFloat(0); // No offset
|
||||
}
|
||||
|
||||
// Custom overwrites
|
||||
@ -983,13 +979,13 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) {
|
||||
// Fresado TB y Cosido TB
|
||||
else if (pvObj.tipoImpresion === 2 || pvObj.tipoImpresion === 4) {
|
||||
let sangre = parseFloat(5); // mm
|
||||
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + (2 * sangre) + pvObj.lomoLibro);
|
||||
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + pvObj.offsetSolapa)) + (2 * sangre) + pvObj.lomoLibro);
|
||||
pvObj.altoForma += (2 * sangre);
|
||||
}
|
||||
// Grapado
|
||||
else if (pvObj.tipoImpresion === 21) {
|
||||
let sangre = parseFloat(5); // mm
|
||||
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + (2 * sangre));
|
||||
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + pvObj.offsetSolapa)) + (2 * sangre));
|
||||
pvObj.altoForma += (2 * sangre);
|
||||
}
|
||||
// Espiral TD y TB, Wire-o TD y TB
|
||||
@ -1011,10 +1007,10 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) {
|
||||
if (_isTapaDura) {
|
||||
let anchoPliegue = parseFloat(7); // mm
|
||||
let altoPliegue = parseFloat(7); // mm
|
||||
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * anchoPliegue) + (2 * (anchoSolapaSobrecubierta + offsetSolapaValor)) + (2 * sangre) + pvObj.lomoLibro);
|
||||
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * anchoPliegue) + (2 * (anchoSolapaSobrecubierta + pvObj.offsetSolapa)) + (2 * sangre) + pvObj.lomoLibro);
|
||||
pvObj.altoForma += altoPliegue + (2 * sangre);
|
||||
} else {
|
||||
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (anchoSolapaSobrecubierta + offsetSolapaValor)) + (2 * sangre) + pvObj.lomoLibro);
|
||||
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (anchoSolapaSobrecubierta + pvObj.offsetSolapa)) + (2 * sangre) + pvObj.lomoLibro);
|
||||
pvObj.altoForma += (2 * sangre);
|
||||
}
|
||||
|
||||
|
||||
@ -138,56 +138,62 @@ $picture = "/assets/img/default-user.png";
|
||||
<!--/ Search Budgets -->
|
||||
|
||||
<!-- View Mode links -->
|
||||
<li class="nav-item dropdown-shortcuts navbar-dropdown dropdown me-2 me-xl-0">
|
||||
<a
|
||||
class="nav-link dropdown-toggle hide-arrow"
|
||||
href="javascript:void(0);"
|
||||
data-bs-toggle="dropdown"
|
||||
data-bs-auto-close="outside"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<i class="ti ti-building ti-md"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end py-0">
|
||||
<div class="dropdown-menu-header border-bottom">
|
||||
<div class="dropdown-header d-flex align-items-center py-3">
|
||||
<h5 class="text-body mb-0 me-auto">Vistas</h5>
|
||||
<?php
|
||||
if (auth()->user()->inGroup('beta')) :
|
||||
?>
|
||||
<li class="nav-item dropdown-shortcuts navbar-dropdown dropdown me-2 me-xl-0">
|
||||
<a
|
||||
class="nav-link dropdown-toggle hide-arrow"
|
||||
href="javascript:void(0);"
|
||||
data-bs-toggle="dropdown"
|
||||
data-bs-auto-close="outside"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<i class="ti ti-building ti-md"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end py-0">
|
||||
<div class="dropdown-menu-header border-bottom">
|
||||
<div class="dropdown-header d-flex align-items-center py-3">
|
||||
<h5 class="text-body mb-0 me-auto">Vistas</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-shortcuts-list scrollable-container">
|
||||
<div class="dropdown-shortcuts-list scrollable-container">
|
||||
|
||||
<div class="row row-bordered overflow-visible g-0">
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<div class="row row-bordered overflow-visible g-0">
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<span class="dropdown-shortcuts-icon rounded-circle mb-2">
|
||||
<i class="ti ti-printer fs-4"></i>
|
||||
</span>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_impresion); ?>"
|
||||
class="stretched-link">Impresión</a>
|
||||
</div>
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_impresion); ?>"
|
||||
class="stretched-link">Impresión</a>
|
||||
</div>
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<span class="dropdown-shortcuts-icon rounded-circle mb-2">
|
||||
<i class="ti ti-ruler-2 fs-4"></i>
|
||||
</span>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_maquetacion); ?>"
|
||||
class="stretched-link">Maquetación</a>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_maquetacion); ?>"
|
||||
class="stretched-link">Maquetación</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-bordered overflow-visible g-0">
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<div class="row row-bordered overflow-visible g-0">
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<span class="dropdown-shortcuts-icon rounded-circle mb-2">
|
||||
<i class="ti ti-file-code-2 fs-4"></i>
|
||||
</span>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_digitalizacion); ?>"
|
||||
class="stretched-link">Digitalización</a>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_digitalizacion); ?>"
|
||||
class="stretched-link">Digitalización</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</li>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<!-- View Mode links -->
|
||||
|
||||
<!-- Language -->
|
||||
|
||||
@ -28,6 +28,8 @@
|
||||
|
||||
require "menus/pedidos_menu.php";
|
||||
|
||||
require "menus/pedidos_cliente_menu.php";
|
||||
|
||||
require "menus/produccion_menu.php";
|
||||
|
||||
require "menus/importacion_menu.php";
|
||||
@ -36,6 +38,8 @@
|
||||
|
||||
require "menus/facturacion_menu.php";
|
||||
|
||||
require "menus/facturacion_cliente_menu.php";
|
||||
|
||||
require "menus/logistica_menu.php";
|
||||
|
||||
require "menus/tarifas_menu.php";
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
* MENU CLIENTES
|
||||
*/
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
if (auth()->user()->can('perfil.edit')) {
|
||||
|
||||
if (auth()->user()->can('perfil.edit') || auth()->user()->can('direcciones.menu')) {
|
||||
?>
|
||||
<!-- Clientes -->
|
||||
<li class="menu-item">
|
||||
@ -14,11 +15,18 @@ if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente
|
||||
<ul class="menu-sub">
|
||||
<?php if (auth()->user()->can('perfil.edit')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("clienteList") ?>" class="menu-link">
|
||||
<a href="<?= route_to("profileIndex") ?>" class="menu-link">
|
||||
<?= lang("App.menu_perfil_clientes") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if (auth()->user()->can('direcciones.menu')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("clientedireccionesIndex") ?>" class="menu-link">
|
||||
<?= lang("App.menu_direcciones_clientes") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* MENU FACTURACION
|
||||
*/
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
?>
|
||||
<!-- 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>
|
||||
<?= lang("App.menu_facturación") ?>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturas/list") ?>" class="menu-link">
|
||||
<?= lang("App.menu_facturas") ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("facturas/albaranes") ?>" class="menu-link">
|
||||
<?= lang("App.menu_albaran") ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* MENU PEDIDOS
|
||||
*/
|
||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||
?>
|
||||
<!-- Orders -->
|
||||
<li class="menu-item">
|
||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||
<i class="menu-icon tf-icons ti ti-file-description"></i>
|
||||
<?= lang("App.menu_pedidos") ?>
|
||||
</a>
|
||||
<ul class="menu-sub">
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/activos") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_activos") ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/finalizados") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_finalizados") ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/cancelados") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_cancelados") ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="menu-item">
|
||||
<a href="<?= site_url("pedidos/pedido/todos") ?>" class="menu-link">
|
||||
<?= lang("App.menu_pedidos_todos") ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
@ -1,16 +1,7 @@
|
||||
<?php
|
||||
$session = session();
|
||||
$token = $session->get('token') ?? '';
|
||||
$tfa = $session->get('tfa') ?? false;
|
||||
$settings = $session->get('settings');
|
||||
|
||||
$picture = "/assets/img/default-user.png";
|
||||
$pulse = session()->get('pulse');
|
||||
$notification = session()->get('notification');
|
||||
|
||||
if (!empty($token) && $tfa == false) {
|
||||
//echo "<script>window.location.href = '/'; </script>";
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
@ -154,56 +145,62 @@ if (!empty($token) && $tfa == false) {
|
||||
<!--/ Search Budgets -->
|
||||
|
||||
<!-- View Mode links -->
|
||||
<li class="nav-item dropdown-shortcuts navbar-dropdown dropdown me-2 me-xl-0">
|
||||
<a
|
||||
class="nav-link dropdown-toggle hide-arrow"
|
||||
href="javascript:void(0);"
|
||||
data-bs-toggle="dropdown"
|
||||
data-bs-auto-close="outside"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<i class="ti ti-building ti-md"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end py-0">
|
||||
<div class="dropdown-menu-header border-bottom">
|
||||
<div class="dropdown-header d-flex align-items-center py-3">
|
||||
<h5 class="text-body mb-0 me-auto">Vistas</h5>
|
||||
<?php
|
||||
if (auth()->user()->inGroup('beta')) :
|
||||
?>
|
||||
<li class="nav-item dropdown-shortcuts navbar-dropdown dropdown me-2 me-xl-0">
|
||||
<a
|
||||
class="nav-link dropdown-toggle hide-arrow"
|
||||
href="javascript:void(0);"
|
||||
data-bs-toggle="dropdown"
|
||||
data-bs-auto-close="outside"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<i class="ti ti-building ti-md"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end py-0">
|
||||
<div class="dropdown-menu-header border-bottom">
|
||||
<div class="dropdown-header d-flex align-items-center py-3">
|
||||
<h5 class="text-body mb-0 me-auto">Vistas</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-shortcuts-list scrollable-container">
|
||||
<div class="dropdown-shortcuts-list scrollable-container">
|
||||
|
||||
<div class="row row-bordered overflow-visible g-0">
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<div class="row row-bordered overflow-visible g-0">
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<span class="dropdown-shortcuts-icon rounded-circle mb-2">
|
||||
<i class="ti ti-printer fs-4"></i>
|
||||
</span>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_impresion); ?>"
|
||||
class="stretched-link">Impresión</a>
|
||||
</div>
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_impresion); ?>"
|
||||
class="stretched-link">Impresión</a>
|
||||
</div>
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<span class="dropdown-shortcuts-icon rounded-circle mb-2">
|
||||
<i class="ti ti-ruler-2 fs-4"></i>
|
||||
</span>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_maquetacion); ?>"
|
||||
class="stretched-link">Maquetación</a>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_maquetacion); ?>"
|
||||
class="stretched-link">Maquetación</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-bordered overflow-visible g-0">
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<div class="row row-bordered overflow-visible g-0">
|
||||
<div class="dropdown-shortcuts-item col">
|
||||
<span class="dropdown-shortcuts-icon rounded-circle mb-2">
|
||||
<i class="ti ti-file-code-2 fs-4"></i>
|
||||
</span>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_digitalizacion); ?>"
|
||||
class="stretched-link">Digitalización</a>
|
||||
<small class="text-muted mb-0">Vista</small>
|
||||
<a href="<?= site_url('viewmode/' . config("Basics")->vista_digitalizacion); ?>"
|
||||
class="stretched-link">Digitalización</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</li>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<!-- View Mode links -->
|
||||
|
||||
<!-- Language -->
|
||||
|
||||
185
ci4/composer.lock
generated
185
ci4/composer.lock
generated
@ -8,16 +8,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "codeigniter4/framework",
|
||||
"version": "v4.5.1",
|
||||
"version": "v4.5.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/codeigniter4/framework.git",
|
||||
"reference": "9b2cd730db29d14ac6e760fb15c4bcac15184ec4"
|
||||
"reference": "2849e7ff36b4c4aa1376d990a9a1e3f0c393b8d0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/codeigniter4/framework/zipball/9b2cd730db29d14ac6e760fb15c4bcac15184ec4",
|
||||
"reference": "9b2cd730db29d14ac6e760fb15c4bcac15184ec4",
|
||||
"url": "https://api.github.com/repos/codeigniter4/framework/zipball/2849e7ff36b4c4aa1376d990a9a1e3f0c393b8d0",
|
||||
"reference": "2849e7ff36b4c4aa1376d990a9a1e3f0c393b8d0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -34,7 +34,7 @@
|
||||
"kint-php/kint": "^5.0.4",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"nexusphp/cs-config": "^3.6",
|
||||
"phpunit/phpunit": "^10.5.16",
|
||||
"phpunit/phpunit": "^10.5.16 || ^11.2",
|
||||
"predis/predis": "^1.1 || ^2.0"
|
||||
},
|
||||
"suggest": {
|
||||
@ -78,7 +78,7 @@
|
||||
"slack": "https://codeigniterchat.slack.com",
|
||||
"source": "https://github.com/codeigniter4/CodeIgniter4"
|
||||
},
|
||||
"time": "2024-04-14T04:18:29+00:00"
|
||||
"time": "2024-09-07T08:49:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "codeigniter4/settings",
|
||||
@ -137,16 +137,16 @@
|
||||
},
|
||||
{
|
||||
"name": "codeigniter4/shield",
|
||||
"version": "v1.0.3",
|
||||
"version": "v1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/codeigniter4/shield.git",
|
||||
"reference": "3fbac7a3da41ebaac7d51708244f68df596409f0"
|
||||
"reference": "22a8b3b58dafa7a5c080bc61446653aeb9fffc06"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/codeigniter4/shield/zipball/3fbac7a3da41ebaac7d51708244f68df596409f0",
|
||||
"reference": "3fbac7a3da41ebaac7d51708244f68df596409f0",
|
||||
"url": "https://api.github.com/repos/codeigniter4/shield/zipball/22a8b3b58dafa7a5c080bc61446653aeb9fffc06",
|
||||
"reference": "22a8b3b58dafa7a5c080bc61446653aeb9fffc06",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -165,7 +165,8 @@
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpstan/extension-installer": "^1.3",
|
||||
"phpstan/phpstan-strict-rules": "^1.5",
|
||||
"rector/rector": "1.0.4"
|
||||
"phpunit/phpunit": "^9.6",
|
||||
"rector/rector": "1.1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "Required to use the password validation rule via PwnedValidator class.",
|
||||
@ -206,7 +207,7 @@
|
||||
"slack": "https://codeigniterchat.slack.com",
|
||||
"source": "https://github.com/codeigniter4/shield"
|
||||
},
|
||||
"time": "2024-04-14T08:57:57+00:00"
|
||||
"time": "2024-06-13T08:54:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dompdf/dompdf",
|
||||
@ -660,16 +661,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "3.0.41",
|
||||
"version": "3.0.42",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb"
|
||||
"reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/621c73f7dcb310b61de34d1da4c4204e8ace6ceb",
|
||||
"reference": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/db92f1b1987b12b13f248fe76c3a52cadb67bb98",
|
||||
"reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -750,7 +751,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.41"
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.42"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -766,20 +767,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-08-12T00:13:54+00:00"
|
||||
"time": "2024-09-16T03:06:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
|
||||
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
|
||||
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -814,22 +815,22 @@
|
||||
"psr-3"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/log/tree/3.0.0"
|
||||
"source": "https://github.com/php-fig/log/tree/3.0.2"
|
||||
},
|
||||
"time": "2021-07-14T16:46:02+00:00"
|
||||
"time": "2024-09-11T13:17:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sabberworm/php-css-parser",
|
||||
"version": "v8.5.1",
|
||||
"version": "v8.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MyIntervals/PHP-CSS-Parser.git",
|
||||
"reference": "4a3d572b0f8b28bb6fd016ae8bbfc445facef152"
|
||||
"reference": "d2fb94a9641be84d79c7548c6d39bbebba6e9a70"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/4a3d572b0f8b28bb6fd016ae8bbfc445facef152",
|
||||
"reference": "4a3d572b0f8b28bb6fd016ae8bbfc445facef152",
|
||||
"url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/d2fb94a9641be84d79c7548c6d39bbebba6e9a70",
|
||||
"reference": "d2fb94a9641be84d79c7548c6d39bbebba6e9a70",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -879,9 +880,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues",
|
||||
"source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.5.1"
|
||||
"source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.6.0"
|
||||
},
|
||||
"time": "2024-02-15T16:41:13+00:00"
|
||||
"time": "2024-07-01T07:33:21+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@ -1020,23 +1021,24 @@
|
||||
},
|
||||
{
|
||||
"name": "mikey179/vfsstream",
|
||||
"version": "v1.6.11",
|
||||
"version": "v1.6.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bovigo/vfsStream.git",
|
||||
"reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f"
|
||||
"reference": "fe695ec993e0a55c3abdda10a9364eb31c6f1bf0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f",
|
||||
"reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f",
|
||||
"url": "https://api.github.com/repos/bovigo/vfsStream/zipball/fe695ec993e0a55c3abdda10a9364eb31c6f1bf0",
|
||||
"reference": "fe695ec993e0a55c3abdda10a9364eb31c6f1bf0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
"php": ">=7.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.5|^5.0"
|
||||
"phpunit/phpunit": "^7.5||^8.5||^9.6",
|
||||
"yoast/phpunit-polyfills": "^2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@ -1067,20 +1069,20 @@
|
||||
"source": "https://github.com/bovigo/vfsStream/tree/master",
|
||||
"wiki": "https://github.com/bovigo/vfsStream/wiki"
|
||||
},
|
||||
"time": "2022-02-23T02:02:42+00:00"
|
||||
"time": "2024-08-29T18:43:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
"version": "1.11.1",
|
||||
"version": "1.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||
"reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
|
||||
"reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
|
||||
"reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
|
||||
"reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1088,11 +1090,12 @@
|
||||
},
|
||||
"conflict": {
|
||||
"doctrine/collections": "<1.6.8",
|
||||
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
|
||||
"doctrine/common": "<2.13.3 || >=3 <3.2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/collections": "^1.6.8",
|
||||
"doctrine/common": "^2.13.3 || ^3.2.2",
|
||||
"phpspec/prophecy": "^1.10",
|
||||
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
|
||||
},
|
||||
"type": "library",
|
||||
@ -1118,7 +1121,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/myclabs/DeepCopy/issues",
|
||||
"source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
|
||||
"source": "https://github.com/myclabs/DeepCopy/tree/1.12.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1126,20 +1129,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-03-08T13:26:56+00:00"
|
||||
"time": "2024-06-12T14:39:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v5.0.2",
|
||||
"version": "v5.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13"
|
||||
"reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13",
|
||||
"reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb",
|
||||
"reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1150,7 +1153,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"ircmaxell/php-yacc": "^0.0.7",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/php-parse"
|
||||
@ -1182,9 +1185,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2"
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0"
|
||||
},
|
||||
"time": "2024-03-05T20:51:40+00:00"
|
||||
"time": "2024-09-15T16:40:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
@ -1306,35 +1309,35 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "9.2.31",
|
||||
"version": "9.2.32",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "48c34b5d8d983006bd2adc2d0de92963b9155965"
|
||||
"reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965",
|
||||
"reference": "48c34b5d8d983006bd2adc2d0de92963b9155965",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5",
|
||||
"reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"nikic/php-parser": "^4.18 || ^5.0",
|
||||
"nikic/php-parser": "^4.19.1 || ^5.1.0",
|
||||
"php": ">=7.3",
|
||||
"phpunit/php-file-iterator": "^3.0.3",
|
||||
"phpunit/php-text-template": "^2.0.2",
|
||||
"sebastian/code-unit-reverse-lookup": "^2.0.2",
|
||||
"sebastian/complexity": "^2.0",
|
||||
"sebastian/environment": "^5.1.2",
|
||||
"sebastian/lines-of-code": "^1.0.3",
|
||||
"sebastian/version": "^3.0.1",
|
||||
"theseer/tokenizer": "^1.2.0"
|
||||
"phpunit/php-file-iterator": "^3.0.6",
|
||||
"phpunit/php-text-template": "^2.0.4",
|
||||
"sebastian/code-unit-reverse-lookup": "^2.0.3",
|
||||
"sebastian/complexity": "^2.0.3",
|
||||
"sebastian/environment": "^5.1.5",
|
||||
"sebastian/lines-of-code": "^1.0.4",
|
||||
"sebastian/version": "^3.0.2",
|
||||
"theseer/tokenizer": "^1.2.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.3"
|
||||
"phpunit/phpunit": "^9.6"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-pcov": "PHP extension that provides line coverage",
|
||||
@ -1343,7 +1346,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "9.2-dev"
|
||||
"dev-main": "9.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -1372,7 +1375,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31"
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1380,7 +1383,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-02T06:37:42+00:00"
|
||||
"time": "2024-08-22T04:23:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
@ -1625,45 +1628,45 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "9.6.19",
|
||||
"version": "9.6.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "a1a54a473501ef4cdeaae4e06891674114d79db8"
|
||||
"reference": "49d7820565836236411f5dc002d16dd689cde42f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8",
|
||||
"reference": "a1a54a473501ef4cdeaae4e06891674114d79db8",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/49d7820565836236411f5dc002d16dd689cde42f",
|
||||
"reference": "49d7820565836236411f5dc002d16dd689cde42f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.3.1 || ^2",
|
||||
"doctrine/instantiator": "^1.5.0 || ^2",
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"myclabs/deep-copy": "^1.10.1",
|
||||
"phar-io/manifest": "^2.0.3",
|
||||
"phar-io/version": "^3.0.2",
|
||||
"myclabs/deep-copy": "^1.12.0",
|
||||
"phar-io/manifest": "^2.0.4",
|
||||
"phar-io/version": "^3.2.1",
|
||||
"php": ">=7.3",
|
||||
"phpunit/php-code-coverage": "^9.2.28",
|
||||
"phpunit/php-file-iterator": "^3.0.5",
|
||||
"phpunit/php-code-coverage": "^9.2.31",
|
||||
"phpunit/php-file-iterator": "^3.0.6",
|
||||
"phpunit/php-invoker": "^3.1.1",
|
||||
"phpunit/php-text-template": "^2.0.3",
|
||||
"phpunit/php-timer": "^5.0.2",
|
||||
"sebastian/cli-parser": "^1.0.1",
|
||||
"sebastian/code-unit": "^1.0.6",
|
||||
"phpunit/php-text-template": "^2.0.4",
|
||||
"phpunit/php-timer": "^5.0.3",
|
||||
"sebastian/cli-parser": "^1.0.2",
|
||||
"sebastian/code-unit": "^1.0.8",
|
||||
"sebastian/comparator": "^4.0.8",
|
||||
"sebastian/diff": "^4.0.3",
|
||||
"sebastian/environment": "^5.1.3",
|
||||
"sebastian/exporter": "^4.0.5",
|
||||
"sebastian/global-state": "^5.0.1",
|
||||
"sebastian/object-enumerator": "^4.0.3",
|
||||
"sebastian/resource-operations": "^3.0.3",
|
||||
"sebastian/type": "^3.2",
|
||||
"sebastian/diff": "^4.0.6",
|
||||
"sebastian/environment": "^5.1.5",
|
||||
"sebastian/exporter": "^4.0.6",
|
||||
"sebastian/global-state": "^5.0.7",
|
||||
"sebastian/object-enumerator": "^4.0.4",
|
||||
"sebastian/resource-operations": "^3.0.4",
|
||||
"sebastian/type": "^3.2.1",
|
||||
"sebastian/version": "^3.0.2"
|
||||
},
|
||||
"suggest": {
|
||||
@ -1708,7 +1711,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.20"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1724,7 +1727,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-04-05T04:35:58+00:00"
|
||||
"time": "2024-07-10T11:45:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
|
||||
Reference in New Issue
Block a user