mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
falta comprobar que se puede cambiar el tipo de presupuesto
This commit is contained in:
@ -9,10 +9,18 @@ const SK_PERMISSION_MATRIX = [
|
|||||||
"plantilla-tarifa.edit",
|
"plantilla-tarifa.edit",
|
||||||
"plantilla-tarifa.delete",
|
"plantilla-tarifa.delete",
|
||||||
"plantilla-tarifa.menu",
|
"plantilla-tarifa.menu",
|
||||||
|
"perfil.create",
|
||||||
|
"perfil.edit",
|
||||||
|
"perfil.delete",
|
||||||
|
"perfil.menu",
|
||||||
"presupuesto.create",
|
"presupuesto.create",
|
||||||
"presupuesto.edit",
|
"presupuesto.edit",
|
||||||
"presupuesto.delete",
|
"presupuesto.delete",
|
||||||
"presupuesto.menu",
|
"presupuesto.menu",
|
||||||
|
"presupuesto-cliente.create",
|
||||||
|
"presupuesto-cliente.edit",
|
||||||
|
"presupuesto-cliente.delete",
|
||||||
|
"presupuesto-cliente.menu",
|
||||||
"tarifa-preimpresion.create",
|
"tarifa-preimpresion.create",
|
||||||
"tarifa-preimpresion.edit",
|
"tarifa-preimpresion.edit",
|
||||||
"tarifa-preimpresion.delete",
|
"tarifa-preimpresion.delete",
|
||||||
@ -73,22 +81,28 @@ const SK_PERMISSION_MATRIX = [
|
|||||||
"roles-permisos.edit",
|
"roles-permisos.edit",
|
||||||
"roles-permisos.delete",
|
"roles-permisos.delete",
|
||||||
"roles-permisos.menu",
|
"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" => [
|
"cliente-admin" => [
|
||||||
|
"perfil.edit",
|
||||||
|
"perfil.menu",
|
||||||
"presupuesto-cliente.create",
|
"presupuesto-cliente.create",
|
||||||
"presupuesto-cliente.edit",
|
"presupuesto-cliente.edit",
|
||||||
"presupuesto-cliente.delete",
|
"presupuesto-cliente.delete",
|
||||||
"presupuesto-cliente.menu",
|
"presupuesto-cliente.menu",
|
||||||
"usuarios.create",
|
|
||||||
"usuarios.edit",
|
|
||||||
"usuarios.delete",
|
|
||||||
"usuarios.menu",
|
|
||||||
],
|
],
|
||||||
"cliente-editor" => [
|
"cliente-editor" => [
|
||||||
"presupuesto.create",
|
"presupuesto-cliente.create",
|
||||||
"presupuesto.edit",
|
"presupuesto-cliente.edit",
|
||||||
"presupuesto.delete",
|
"presupuesto-cliente.delete",
|
||||||
"presupuesto.menu",
|
"presupuesto-cliente.menu",
|
||||||
],
|
],
|
||||||
"comercial" => [
|
"comercial" => [
|
||||||
"token.token",
|
"token.token",
|
||||||
|
|||||||
@ -9,6 +9,10 @@ const SK_PERMISSIONS = [
|
|||||||
'plantilla-tarifa.edit' => 'Can edit',
|
'plantilla-tarifa.edit' => 'Can edit',
|
||||||
'plantilla-tarifa.delete' => 'Can delete',
|
'plantilla-tarifa.delete' => 'Can delete',
|
||||||
'plantilla-tarifa.menu' => 'Menu shall be visualize',
|
'plantilla-tarifa.menu' => 'Menu shall be visualize',
|
||||||
|
'perfil.create' => 'Can create',
|
||||||
|
'perfil.edit' => 'Can edit',
|
||||||
|
'perfil.delete' => 'Can delete',
|
||||||
|
'perfil.menu' => 'Menu shall be visualize',
|
||||||
'presupuesto.create' => 'Can create',
|
'presupuesto.create' => 'Can create',
|
||||||
'presupuesto.edit' => 'Can edit',
|
'presupuesto.edit' => 'Can edit',
|
||||||
'presupuesto.delete' => 'Can delete',
|
'presupuesto.delete' => 'Can delete',
|
||||||
@ -77,4 +81,12 @@ const SK_PERMISSIONS = [
|
|||||||
'roles-permisos.edit' => 'Can edit',
|
'roles-permisos.edit' => 'Can edit',
|
||||||
'roles-permisos.delete' => 'Can delete',
|
'roles-permisos.delete' => 'Can delete',
|
||||||
'roles-permisos.menu' => 'Menu shall be visualize',
|
'roles-permisos.menu' => 'Menu shall be visualize',
|
||||||
|
'ubicaciones.create' => 'Can create',
|
||||||
|
'ubicaciones.edit' => 'Can edit',
|
||||||
|
'ubicaciones.delete' => 'Can delete',
|
||||||
|
'ubicaciones.menu' => 'Menu shall be visualize',
|
||||||
|
'series-facturas.create' => 'Can create',
|
||||||
|
'series-facturas.edit' => 'Can edit',
|
||||||
|
'series-facturas.delete' => 'Can delete',
|
||||||
|
'series-facturas.menu' => 'Menu shall be visualize',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -72,9 +72,11 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
'pageTitle' => lang('Presupuestos.presupuestos'),
|
'pageTitle' => lang('Presupuestos.presupuestos'),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')) {
|
||||||
$clienteId = 999; // Fijo hasta desarollar clientes usuarios
|
// 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 {
|
} else {
|
||||||
$clienteId = 0;
|
$clienteId = 0;
|
||||||
}
|
}
|
||||||
@ -87,8 +89,10 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
// Se obtiene el cliente ID a partir del usuario de la sesion
|
// Se obtiene el cliente ID a partir del usuario de la sesion
|
||||||
$clienteId = 999; // Fijo hasta desarollar clientes usuarios
|
$model_user = model('App\Models\Usuarios\UserModel');
|
||||||
|
$user = $model_user->find(auth()->user()->id);
|
||||||
|
$clienteId = $user->cliente_id;
|
||||||
|
|
||||||
$presupuestoEntity = isset($sanitizedData) ? new PresupuestoEntity($sanitizedData) : new PresupuestoEntity();
|
$presupuestoEntity = isset($sanitizedData) ? new PresupuestoEntity($sanitizedData) : new PresupuestoEntity();
|
||||||
$presupuestoEntity->clienteId = $clienteId;
|
$presupuestoEntity->clienteId = $clienteId;
|
||||||
|
|
||||||
@ -111,10 +115,9 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
|
|
||||||
$datosPresupuesto->tipo_libro = "";
|
$datosPresupuesto->tipo_libro = "";
|
||||||
$datosPresupuesto->color_impresion = 'negro';
|
$datosPresupuesto->color_impresion = 'negro';
|
||||||
$datosPresupuesto->calidad_impresion = 'estandar';
|
|
||||||
$datosPresupuesto->tapa = 'blanda';
|
$datosPresupuesto->tapa = 'blanda';
|
||||||
|
|
||||||
$datosPresupuesto->clienteList = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
|
$datosPresupuesto->clienteList = $this->getClienteListItems($clienteId ?? null);
|
||||||
$presupuestoEntity->estado_id = 1;
|
$presupuestoEntity->estado_id = 1;
|
||||||
|
|
||||||
$this->viewData['formAction'] = 'add';
|
$this->viewData['formAction'] = 'add';
|
||||||
@ -123,6 +126,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
|
|
||||||
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
||||||
$this->viewData['datosPresupuesto'] = $datosPresupuesto;
|
$this->viewData['datosPresupuesto'] = $datosPresupuesto;
|
||||||
|
$this->viewData['clienteId'] = $clienteId;
|
||||||
|
|
||||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . $this->viewData['pageTitle'] . ' ' . lang('Basic.global.addNewSuffix');
|
$this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . $this->viewData['pageTitle'] . ' ' . lang('Basic.global.addNewSuffix');
|
||||||
|
|
||||||
@ -132,7 +136,6 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
|
|
||||||
public function edit($requestedId = null)
|
public function edit($requestedId = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($requestedId == null) :
|
if ($requestedId == null) :
|
||||||
return $this->redirect2listView();
|
return $this->redirect2listView();
|
||||||
endif;
|
endif;
|
||||||
@ -144,6 +147,11 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
return $this->redirect2listView('sweet-error', $message);
|
return $this->redirect2listView('sweet-error', $message);
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
$datosPresupuesto = (object)array();
|
$datosPresupuesto = (object)array();
|
||||||
$datosPresupuesto->POD = model('App\Models\Configuracion\ConfiguracionSistemaModel')->getPOD();
|
$datosPresupuesto->POD = model('App\Models\Configuracion\ConfiguracionSistemaModel')->getPOD();
|
||||||
$datosPresupuesto->paisList = model('App\Models\Configuracion\PaisModel')->getAllForMenu('id, nombre', 'nombre', true);
|
$datosPresupuesto->paisList = model('App\Models\Configuracion\PaisModel')->getAllForMenu('id, nombre', 'nombre', true);
|
||||||
@ -162,7 +170,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
$datosPresupuesto->acabadosSobrecubierta = $this->getAcabadosSobrecubierta();
|
$datosPresupuesto->acabadosSobrecubierta = $this->getAcabadosSobrecubierta();
|
||||||
|
|
||||||
$datosPresupuesto->tipo_libro = $this->getTipoLibro($presupuestoEntity->tipo_impresion_id ?? null);
|
$datosPresupuesto->tipo_libro = $this->getTipoLibro($presupuestoEntity->tipo_impresion_id ?? null);
|
||||||
[$datosPresupuesto->color_impresion, $datosPresupuesto->calidad_impresion] =
|
$datosPresupuesto->color_impresion =
|
||||||
$this->getTipoInterior($presupuestoEntity->id ?? null);
|
$this->getTipoInterior($presupuestoEntity->id ?? null);
|
||||||
$datosPresupuesto->tapa = $this->getTapa($presupuestoEntity->tipo_impresion_id ?? null);
|
$datosPresupuesto->tapa = $this->getTapa($presupuestoEntity->tipo_impresion_id ?? null);
|
||||||
|
|
||||||
@ -184,6 +192,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
|
|
||||||
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
||||||
$this->viewData['datosPresupuesto'] = $datosPresupuesto;
|
$this->viewData['datosPresupuesto'] = $datosPresupuesto;
|
||||||
|
$this->viewData['clienteId'] = $clienteId;
|
||||||
|
|
||||||
// Si se ha llamado a esta funcion porque se ha duplicado el presupuesto
|
// Si se ha llamado a esta funcion porque se ha duplicado el presupuesto
|
||||||
// se actualiza la bbdd para que sólo ejecute algunas funciones una vez
|
// se actualiza la bbdd para que sólo ejecute algunas funciones una vez
|
||||||
@ -280,7 +289,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
if ($this->request->isAJAX()) {
|
if ($this->request->isAJAX()) {
|
||||||
$reqData = $this->request->getPost();
|
$reqData = $this->request->getPost();
|
||||||
|
|
||||||
$clienteId = $reqData['clienteId'] ?? 0;
|
$clienteId = $reqData['cliente'] ?? 0;
|
||||||
|
|
||||||
if (!isset($reqData['draw']) || !isset($reqData['columns'])) {
|
if (!isset($reqData['draw']) || !isset($reqData['columns'])) {
|
||||||
$errstr = 'No data available in response to this specific request.';
|
$errstr = 'No data available in response to this specific request.';
|
||||||
@ -1743,7 +1752,17 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
$color = 'color';
|
$color = 'color';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [$color, $calidad];
|
|
||||||
|
$tipo = "negro";
|
||||||
|
|
||||||
|
if($calidad == 'premium' && $color=='negro')
|
||||||
|
$tipo = "negroHq";
|
||||||
|
else if ($calidad == 'estandar' && $color=='color')
|
||||||
|
$tipo = "color";
|
||||||
|
else if ($calidad == 'premium' && $color=='color')
|
||||||
|
$tipo = "colorHq";
|
||||||
|
|
||||||
|
return $tipo;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getTapa($tipo_impresion_id)
|
protected function getTapa($tipo_impresion_id)
|
||||||
|
|||||||
@ -59,6 +59,7 @@ return [
|
|||||||
'numeroEdicion' => 'Número de edición',
|
'numeroEdicion' => 'Número de edición',
|
||||||
'isbn' => 'ISBN',
|
'isbn' => 'ISBN',
|
||||||
'referenciaCliente' => 'Referencia del cliente',
|
'referenciaCliente' => 'Referencia del cliente',
|
||||||
|
'referenciaCliente2' => 'Referencia',
|
||||||
'papelFormatoId' => "Tamaño",
|
'papelFormatoId' => "Tamaño",
|
||||||
'papelFormatoPersonalizado' => 'Tamaño personalizado',
|
'papelFormatoPersonalizado' => 'Tamaño personalizado',
|
||||||
'papelFormatoAncho' => 'Ancho',
|
'papelFormatoAncho' => 'Ancho',
|
||||||
|
|||||||
@ -34,7 +34,6 @@ class PresupuestoModel extends \App\Models\BaseModel
|
|||||||
0 => "t1.id",
|
0 => "t1.id",
|
||||||
1 => "t1.updated_at",
|
1 => "t1.updated_at",
|
||||||
2 => "t7.codigo",
|
2 => "t7.codigo",
|
||||||
3 => "t2.nombre",
|
|
||||||
4 => "t1.titulo",
|
4 => "t1.titulo",
|
||||||
5 => "t1.paginas",
|
5 => "t1.paginas",
|
||||||
6 => "t1.tirada",
|
6 => "t1.tirada",
|
||||||
|
|||||||
@ -3,7 +3,7 @@ namespace App\Models\Usuarios;
|
|||||||
|
|
||||||
class UserModel extends \App\Models\BaseModel
|
class UserModel extends \App\Models\BaseModel
|
||||||
{
|
{
|
||||||
protected $table = "auth_user";
|
protected $table = "users";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether primary key uses auto increment.
|
* Whether primary key uses auto increment.
|
||||||
@ -16,29 +16,21 @@ class UserModel extends \App\Models\BaseModel
|
|||||||
protected $createdField = 'created_at';
|
protected $createdField = 'created_at';
|
||||||
protected $updatedField = 'updated_at';
|
protected $updatedField = 'updated_at';
|
||||||
|
|
||||||
protected $primaryKey = "id_user";
|
protected $primaryKey = "id";
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
"group",
|
"username",
|
||||||
"first_name",
|
"first_name",
|
||||||
"last_name",
|
"last_name",
|
||||||
"date_birth",
|
"client_id",
|
||||||
"address",
|
|
||||||
"city",
|
|
||||||
"state",
|
|
||||||
"country",
|
|
||||||
"zip_code",
|
|
||||||
"mobile",
|
|
||||||
"email",
|
|
||||||
"password",
|
|
||||||
"last_ip",
|
|
||||||
"last_access",
|
|
||||||
"picture",
|
|
||||||
"language",
|
|
||||||
"blocked",
|
|
||||||
"email_confirmed",
|
|
||||||
"status",
|
"status",
|
||||||
"token",
|
"status_message",
|
||||||
|
"active",
|
||||||
|
"country",
|
||||||
|
"last_active",
|
||||||
|
"created_at",
|
||||||
|
"updated_at",
|
||||||
|
"deleted_at",
|
||||||
];
|
];
|
||||||
protected $returnType = "App\Entities\Usuarios\UserEntity";
|
protected $returnType = "App\Entities\Usuarios\UserEntity";
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6 mb-3">
|
<div class="col-sm-6 mb-3" <?= $clienteId != 0 ?' style="display:none;"':''?>>
|
||||||
<label for="clienteId" class="form-label">
|
<label for="clienteId" class="form-label">
|
||||||
<?= lang('Presupuestos.clienteId') ?>*
|
<?= lang('Presupuestos.clienteId') ?>*
|
||||||
</label>
|
</label>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<?php if (isset($datosPresupuesto->clienteList) && is_array($datosPresupuesto->clienteList) && !empty($datosPresupuesto->clienteList)) :
|
<?php if (isset($datosPresupuesto->clienteList) && is_array($datosPresupuesto->clienteList) && !empty($datosPresupuesto->clienteList)) :
|
||||||
foreach ($datosPresupuesto->clienteList as $k => $v) : ?>
|
foreach ($datosPresupuesto->clienteList as $k => $v) : ?>
|
||||||
<option value="<?= $k ?>" <?= $k == $presupuestoEntity->cliente_id ? ' selected' : '' ?>>
|
<option value="<?= $k ?>" <?= $k == $clienteId ? ' selected' : '' ?>>
|
||||||
<?= $v ?>
|
<?= $v ?>
|
||||||
</option>
|
</option>
|
||||||
<?php endforeach;
|
<?php endforeach;
|
||||||
@ -35,7 +35,11 @@
|
|||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
<div class="col-sm-6 mb-3">
|
||||||
<label for="referenciaCliente" class="form-label">
|
<label for="referenciaCliente" class="form-label">
|
||||||
<?= lang('Presupuestos.referenciaCliente') ?>
|
<?php if($clienteId == 0): ?>
|
||||||
|
<?= lang('Presupuestos.referenciaCliente') ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?= lang('Presupuestos.referenciaCliente2') ?>
|
||||||
|
<?php endif; ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="referenciaCliente" name="referencia_cliente" maxLength="100" class="form-control" value="<?= old('referencia_cliente', $presupuestoEntity->referencia_cliente) ?>">
|
<input type="text" id="referenciaCliente" name="referencia_cliente" maxLength="100" class="form-control" value="<?= old('referencia_cliente', $presupuestoEntity->referencia_cliente) ?>">
|
||||||
</div>
|
</div>
|
||||||
@ -82,33 +86,35 @@
|
|||||||
<div>No puede mezclar tiradas mayores de 30 unidades con tiradas menores de 30 unidades</div>
|
<div>No puede mezclar tiradas mayores de 30 unidades con tiradas menores de 30 unidades</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="row">
|
||||||
<label for="tirada" class="form-label">
|
<div class="col-sm-3 mb-3">
|
||||||
<?= lang('Presupuestos.tirada') ?> 1
|
<label for="tirada" class="form-label">
|
||||||
</label>
|
<?= lang('Presupuestos.tirada') ?> 1
|
||||||
<input type="number" class="calcular-presupuesto" id="tirada" name="tirada" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada) ?>">
|
</label>
|
||||||
</div><!--//.mb-3 -->
|
<input type="number" class="calcular-presupuesto" id="tirada" name="tirada" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<label for="tirada2" class="form-label">
|
<label for="tirada2" class="form-label">
|
||||||
<?= lang('Presupuestos.tirada') ?> 2
|
<?= lang('Presupuestos.tirada') ?> 2
|
||||||
</label>
|
</label>
|
||||||
<input type="number" class="calcular-presupuesto" id="tirada2" name="tirada2" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada2) ?>">
|
<input type="number" class="calcular-presupuesto" id="tirada2" name="tirada2" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada2) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<label for="tirada3" class="form-label">
|
<label for="tirada3" class="form-label">
|
||||||
<?= lang('Presupuestos.tirada') ?> 3
|
<?= lang('Presupuestos.tirada') ?> 3
|
||||||
</label>
|
</label>
|
||||||
<input type="number" class="calcular-presupuesto" id="tirada3" name="tirada3" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada3) ?>">
|
<input type="number" class="calcular-presupuesto" id="tirada3" name="tirada3" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada3) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
<label for="tirada4" class="form-label">
|
<label for="tirada4" class="form-label">
|
||||||
<?= lang('Presupuestos.tirada') ?> 4
|
<?= lang('Presupuestos.tirada') ?> 4
|
||||||
</label>
|
</label>
|
||||||
<input type="number" class="calcular-presupuesto" id="tirada4" name="tirada4" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada4) ?>">
|
<input type="number" class="calcular-presupuesto" id="tirada4" name="tirada4" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->tirada4) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
</div> <!--//.row -->
|
||||||
|
|
||||||
</div> <!--//.row -->
|
</div> <!--//.row -->
|
||||||
|
|
||||||
@ -177,33 +183,64 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h6> Color del interior </h6>
|
<h6> Color del interior </h6>
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col col-sm-2 d-flex justify-content-center">
|
<div class="row-color">
|
||||||
<div id="colorNegroDiv" class="form-check change-tipo-impresion custom-option-color custom-option custom-option-image custom-option-image-radio">
|
|
||||||
<label class="form-check-label custom-option-content" for="colorNegro">
|
<div class="row mb-2 col-sm-6">
|
||||||
<span class="custom-option-body">
|
|
||||||
<img style="height:120px;width:120px" src="<?= site_url("assets/img/grises.png") ?>" alt="">
|
<div class="container col col-sm-3 d-flex justify-content-center">
|
||||||
</span>
|
<div id="colorNegroDiv" class="form-check change-tipo-impresion custom-option-color custom-option custom-option-image custom-option-image-radio">
|
||||||
</label>
|
<label class="form-check-label custom-option-content" for="colorNegro">
|
||||||
<input name="colorNegro" class="form-check-input calcular-presupuesto" type="radio" value="colorNegro" id="colorNegro"
|
<span class="custom-option-body">
|
||||||
<?php echo ($datosPresupuesto->color_impresion == 'negro' ? ' checked=""': ''); ?> >
|
<img style="height:150px;width:240px" src="<?= site_url("assets/img/bn.png") ?>" alt="">
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<input name="colorNegro" class="form-check-input calcular-presupuesto" type="radio" value="colorNegro" id="colorNegro"
|
||||||
|
<?php echo ($datosPresupuesto->color_impresion == 'negro' ? ' checked=""': ''); ?> >
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col col-sm-2 d-flex justify-content-center">
|
<div class="container col col-sm-3 d-flex justify-content-center">
|
||||||
<div id="colorColorDiv" class="form-check change-tipo-impresion custom-option-color custom-option custom-option-image custom-option-image-radio">
|
<div id="colorNegroHqDiv" class="form-check change-tipo-impresion custom-option-color custom-option custom-option-image custom-option-image-radio">
|
||||||
<label class="form-check-label custom-option-content" for="colorColor">
|
<label class="form-check-label custom-option-content" for="colorNegroHq">
|
||||||
<span class="custom-option-body">
|
<span class="custom-option-body">
|
||||||
<img style="height:120px;width:120px" src="<?= site_url("assets/img//gamacolor.png") ?>" alt="">
|
<img style="height:150px;width:240px" src="<?= site_url("assets/img//bn_hq.png") ?>" alt="">
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input name="colorColor" class="form-check-input calcular-presupuesto" type="radio" value="colorColor" id="colorColor"
|
<input name="colorNegroHq" class="form-check-input calcular-presupuesto" type="radio" value="colorNegroHq" id="colorNegroHq"
|
||||||
<?php echo ($datosPresupuesto->color_impresion == 'color' ? ' checked=""': ''); ?> >
|
<?php echo ($datosPresupuesto->color_impresion == 'negroHq' ? ' checked=""': ''); ?> >
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> <!--//.row -->
|
</div> <!--//.row -->
|
||||||
|
<div class="row col-sm-6">
|
||||||
|
|
||||||
|
<div class="container col col-sm-3 d-flex justify-content-center">
|
||||||
|
<div id="colorColorDiv" class="form-check change-tipo-impresion custom-option-color custom-option custom-option-image custom-option-image-radio">
|
||||||
|
<label class="form-check-label custom-option-content" for="colorColor">
|
||||||
|
<span class="custom-option-body">
|
||||||
|
<img style="height:150px;width:240px" src="<?= site_url("assets/img/color.png") ?>" alt="">
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<input name="colorColor" class="form-check-input calcular-presupuesto" type="radio" value="colorColor" id="colorColor"
|
||||||
|
<?php echo ($datosPresupuesto->color_impresion == 'color' ? ' checked=""': ''); ?> >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container col col-sm-3 d-flex justify-content-center">
|
||||||
|
<div id="colorColorHqDiv" class="form-check change-tipo-impresion custom-option-color custom-option custom-option-image custom-option-image-radio">
|
||||||
|
<label class="form-check-label custom-option-content" for="colorColorHq">
|
||||||
|
<span class="custom-option-body">
|
||||||
|
<img style="height:150px;width:240px" src="<?= site_url("assets/img//color_hq.png") ?>" alt="">
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<input name="colorColorHq" class="form-check-input calcular-presupuesto" type="radio" value="colorColorHq" id="colorColorHq"
|
||||||
|
<?php echo ($datosPresupuesto->color_impresion == 'colorHq' ? ' checked=""': ''); ?> >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div> <!--//.row -->
|
||||||
|
</div> <!--//.row-color -->
|
||||||
|
|
||||||
<div id="pagColorDiv" class="row">
|
<div id="pagColorDiv" class="row">
|
||||||
<div class="col-sm-3 mb-3">
|
<div class="col-sm-3 mb-3">
|
||||||
@ -214,36 +251,6 @@
|
|||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h6> Calidad </h6>
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2">
|
|
||||||
<div id="calidadEstandarDiv" class="form-check change-tipo-impresion custom-option custom-option-calidad custom-option-basic
|
|
||||||
<?php echo ($datosPresupuesto->calidad_impresion == 'estandar' ? ' checked"': '"'); ?> >
|
|
||||||
<label class="form-check-label custom-option-content" for="calidadEstandar">
|
|
||||||
<input name="calidadEstandar" class="form-check-input calcular-presupuesto" type="radio" value="" id="calidadEstandar"
|
|
||||||
<?php echo ($datosPresupuesto->calidad_impresion == 'estandar' ? ' checked=""': ''); ?> >
|
|
||||||
<span class="custom-option-header">
|
|
||||||
<span class="h6 mb-0">Estándar</span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-3">
|
|
||||||
<div id="calidadPremiumDiv" class="form-check change-tipo-impresion custom-option custom-option-calidad custom-option-basic"
|
|
||||||
<?php echo ($datosPresupuesto->calidad_impresion == 'premium' ? ' checked"': '"'); ?> >
|
|
||||||
<label class="form-check-label custom-option-content" for="calidadPremium">
|
|
||||||
<input name="calidadPremium" class="form-check-input calcular-presupuesto" type="radio" value="" id="calidadPremium"
|
|
||||||
<?php echo ($datosPresupuesto->calidad_impresion == 'premium' ? ' checked=""': ''); ?> >
|
|
||||||
<span class="custom-option-header">
|
|
||||||
<span class="h6 mb-0">Premium</span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> <!--//.row -->
|
|
||||||
|
|
||||||
<h6> Papel </h6>
|
<h6> Papel </h6>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
@ -262,7 +269,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<h6> Opciones extra </h6>
|
<h6> Opciones extra </h6>
|
||||||
<div class="row">
|
<div class="row" <?= $clienteId != 0 ?' style="display:none;"':' '?>>
|
||||||
<div class="col-sm-3 mb-3 d-flex align-items-end">
|
<div class="col-sm-3 mb-3 d-flex align-items-end">
|
||||||
<div class="form-check form-switch mb-2">
|
<div class="form-check form-switch mb-2">
|
||||||
<input class="form-check-input calcular-presupuesto" type="checkbox" id="excluirRotativa" name="excluir_rotativa" value="0" <?= $presupuestoEntity->excluir_rotativa == true ? 'checked' : ''; ?>>
|
<input class="form-check-input calcular-presupuesto" type="checkbox" id="excluirRotativa" name="excluir_rotativa" value="0" <?= $presupuestoEntity->excluir_rotativa == true ? 'checked' : ''; ?>>
|
||||||
|
|||||||
@ -71,7 +71,7 @@ function updateColorCheck(el) {
|
|||||||
if (el.checked) {
|
if (el.checked) {
|
||||||
// If custom option element is radio, remove checked from the siblings (closest `.row`)
|
// If custom option element is radio, remove checked from the siblings (closest `.row`)
|
||||||
if (el.type === 'radio') {
|
if (el.type === 'radio') {
|
||||||
const customRadioOptionList = [].slice.call(el.closest('.row').querySelectorAll('.custom-option-color'))
|
const customRadioOptionList = [].slice.call(el.closest('.row-color').querySelectorAll('.custom-option-color'))
|
||||||
customRadioOptionList.map(function (customRadioOptionEL) {
|
customRadioOptionList.map(function (customRadioOptionEL) {
|
||||||
customRadioOptionEL.closest('.custom-option-color').classList.remove('checked')
|
customRadioOptionEL.closest('.custom-option-color').classList.remove('checked')
|
||||||
})
|
})
|
||||||
@ -79,11 +79,27 @@ function updateColorCheck(el) {
|
|||||||
el.closest('.custom-option-color').classList.add('checked')
|
el.closest('.custom-option-color').classList.add('checked')
|
||||||
if (el.closest('.custom-option-color').id == 'colorNegroDiv') {
|
if (el.closest('.custom-option-color').id == 'colorNegroDiv') {
|
||||||
$('#colorNegro').prop('checked', true);
|
$('#colorNegro').prop('checked', true);
|
||||||
|
$('#colorNegroHq').prop('checked', false);
|
||||||
$('#colorColor').prop('checked', false);
|
$('#colorColor').prop('checked', false);
|
||||||
|
$('#colorColorHq').prop('checked', false);
|
||||||
|
}
|
||||||
|
else if (el.closest('.custom-option-color').id == 'colorNegroHqDiv') {
|
||||||
|
$('#colorNegro').prop('checked', false);
|
||||||
|
$('#colorNegroHq').prop('checked', true);
|
||||||
|
$('#colorColor').prop('checked', false);
|
||||||
|
$('#colorColorHq').prop('checked', false);
|
||||||
|
}
|
||||||
|
else if (el.closest('.custom-option-color').id == 'colorColorDiv') {
|
||||||
|
$('#colorNegro').prop('checked', false);
|
||||||
|
$('#colorNegroHq').prop('checked', false);
|
||||||
|
$('#colorColor').prop('checked', true);
|
||||||
|
$('#colorColorHq').prop('checked', false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#colorNegro').prop('checked', false);
|
$('#colorNegro').prop('checked', false);
|
||||||
$('#colorColor').prop('checked', true);
|
$('#colorNegroHq').prop('checked', false);
|
||||||
|
$('#colorColor').prop('checked', false);
|
||||||
|
$('#colorColorHq').prop('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -92,44 +108,6 @@ function updateColorCheck(el) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function initCalidadCheck() {
|
|
||||||
const _this = this
|
|
||||||
|
|
||||||
const calidadOptionList = [].slice.call(document.querySelectorAll('.custom-option-calidad .form-check-input'))
|
|
||||||
calidadOptionList.map(function (customOptionEL) {
|
|
||||||
// Update custom options check on page load
|
|
||||||
_this.updateCalidadCheck(customOptionEL)
|
|
||||||
|
|
||||||
// Update custom options check on click
|
|
||||||
customOptionEL.addEventListener('click', e => {
|
|
||||||
_this.updateCalidadCheck(customOptionEL)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateCalidadCheck(el) {
|
|
||||||
if (el.checked) {
|
|
||||||
// If custom option element is radio, remove checked from the siblings (closest `.row`)
|
|
||||||
if (el.type === 'radio') {
|
|
||||||
const customRadioOptionList = [].slice.call(el.closest('.row').querySelectorAll('.custom-option-calidad'))
|
|
||||||
customRadioOptionList.map(function (customRadioOptionEL) {
|
|
||||||
customRadioOptionEL.closest('.custom-option-calidad').classList.remove('checked')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
el.closest('.custom-option-calidad').classList.add('checked')
|
|
||||||
if (el.closest('.custom-option-calidad').id == 'calidadEstandarDiv') {
|
|
||||||
$('#calidadEstandar').prop('checked', true);
|
|
||||||
$('#calidadPremium').prop('checked', false);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$('#calidadEstandar').prop('checked', false);
|
|
||||||
$('#calidadPremium').prop('checked', true);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
el.closest('.custom-option-calidad').classList.remove('checked')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#enableSobrecubierta').on('change', function () {
|
$('#enableSobrecubierta').on('change', function () {
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
$('.enable-sobrecubierta').show();
|
$('.enable-sobrecubierta').show();
|
||||||
@ -147,7 +125,6 @@ $('#enableSobrecubierta').on('change', function () {
|
|||||||
function initDisenioLibro() {
|
function initDisenioLibro() {
|
||||||
initTapaCheck();
|
initTapaCheck();
|
||||||
initColorCheck();
|
initColorCheck();
|
||||||
initCalidadCheck();
|
|
||||||
|
|
||||||
$('.elementos-libro').trigger('change');
|
$('.elementos-libro').trigger('change');
|
||||||
$('.change-tipo-impresion').trigger('change');
|
$('.change-tipo-impresion').trigger('change');
|
||||||
@ -180,8 +157,12 @@ function initDisenioLibro() {
|
|||||||
|
|
||||||
$('.change-tipo-impresion').on('change', function () {
|
$('.change-tipo-impresion').on('change', function () {
|
||||||
|
|
||||||
isColor = $('#colorNegroDiv').hasClass('checked') ? false : true;
|
let isColor = false;
|
||||||
isHq = $('#calidadEstandarDiv').hasClass('checked') ? false : true;
|
if($('#colorColorDiv').hasClass('checked') || $('#colorColorHqDiv').hasClass('checked'))
|
||||||
|
isColor = true;
|
||||||
|
let isHq = false;
|
||||||
|
if($('#colorNegroDiv').hasClass('checked') || $('#colorColorHqDiv').hasClass('checked'))
|
||||||
|
isHq = true;
|
||||||
|
|
||||||
//si es color hay que mostrar el numero de paginas a color
|
//si es color hay que mostrar el numero de paginas a color
|
||||||
if (isColor) {
|
if (isColor) {
|
||||||
@ -238,8 +219,13 @@ $('#tirada').on('change', function () {
|
|||||||
|
|
||||||
|
|
||||||
$('#papelInterior').on('change', function () {
|
$('#papelInterior').on('change', function () {
|
||||||
isColor = $('#colorNegroDiv').hasClass('checked') ? false : true;
|
|
||||||
isHq = $('#calidadEstandarDiv').hasClass('checked') ? false : true;
|
let isColor = false;
|
||||||
|
if($('#colorColorDiv').hasClass('checked') || $('#colorColorHqDiv').hasClass('checked'))
|
||||||
|
isColor = true;
|
||||||
|
let isHq = false;
|
||||||
|
if($('#colorNegroDiv').hasClass('checked') || $('#colorColorHqDiv').hasClass('checked'))
|
||||||
|
isHq = true;
|
||||||
|
|
||||||
if ($('#papelInterior option:selected').val() != undefined) {
|
if ($('#papelInterior option:selected').val() != undefined) {
|
||||||
var uso = 'bn';
|
var uso = 'bn';
|
||||||
@ -293,8 +279,8 @@ $('#papelInterior').on('change', function () {
|
|||||||
|
|
||||||
|
|
||||||
$('#papelCubierta').on('change', function () {
|
$('#papelCubierta').on('change', function () {
|
||||||
isColor = true;
|
let isColor = true;
|
||||||
isHq = true;
|
let isHq = true;
|
||||||
|
|
||||||
if ($('#papelCubierta option:selected').val() != undefined) {
|
if ($('#papelCubierta option:selected').val() != undefined) {
|
||||||
var uso = 'cubierta';
|
var uso = 'cubierta';
|
||||||
@ -331,8 +317,8 @@ $('#papelCubierta').on('change', function () {
|
|||||||
|
|
||||||
|
|
||||||
$('#papelSobrecubierta').on('change', function () {
|
$('#papelSobrecubierta').on('change', function () {
|
||||||
isColor = true;
|
let isColor = true;
|
||||||
isHq = true;
|
let isHq = true;
|
||||||
|
|
||||||
if ($('#papelSobrecubierta option:selected').val() != undefined) {
|
if ($('#papelSobrecubierta option:selected').val() != undefined) {
|
||||||
var uso = 'sobrecubierta';
|
var uso = 'sobrecubierta';
|
||||||
@ -616,6 +602,13 @@ $('#clienteId').on('select2:change', function () {
|
|||||||
|
|
||||||
async function calcularPresupuesto() {
|
async function calcularPresupuesto() {
|
||||||
|
|
||||||
|
let isColor = false;
|
||||||
|
if($('#colorColorDiv').hasClass('checked') || $('#colorColorHqDiv').hasClass('checked'))
|
||||||
|
isColor = true;
|
||||||
|
let isHq = false;
|
||||||
|
if($('#colorNegroDiv').hasClass('checked') || $('#colorColorHqDiv').hasClass('checked'))
|
||||||
|
isHq = true;
|
||||||
|
|
||||||
if(!comprobarTiradasPOD()){
|
if(!comprobarTiradasPOD()){
|
||||||
$('#errorTiradas').show();
|
$('#errorTiradas').show();
|
||||||
return;
|
return;
|
||||||
@ -639,8 +632,8 @@ async function calcularPresupuesto() {
|
|||||||
paginasColor: $('#paginasColor').val(),
|
paginasColor: $('#paginasColor').val(),
|
||||||
tipo: $('.custom-option-tipo.checked').attr('id').replace('Div', ''),
|
tipo: $('.custom-option-tipo.checked').attr('id').replace('Div', ''),
|
||||||
tapa: $('#tapaDura').is(':checked') ? 'dura' : 'blanda',
|
tapa: $('#tapaDura').is(':checked') ? 'dura' : 'blanda',
|
||||||
isColor: $('#colorNegroDiv').hasClass('checked') ? 0 : 1,
|
isColor: isColor ? 1 : 0,
|
||||||
isHq: $('#calidadEstandarDiv').hasClass('checked') ? 0 : 1,
|
isHq: isHq ? 1 : 0,
|
||||||
papelInterior: $('#papelInterior option:selected').val(),
|
papelInterior: $('#papelInterior option:selected').val(),
|
||||||
papelInteriorNombre: $('#papelInterior option:selected').text().trim(),
|
papelInteriorNombre: $('#papelInterior option:selected').text().trim(),
|
||||||
gramajeInterior: $('#gramajeInterior option:selected').text(),
|
gramajeInterior: $('#gramajeInterior option:selected').text(),
|
||||||
|
|||||||
@ -19,9 +19,11 @@ function generarResumen(){
|
|||||||
$('#resumenFerro').text('Ferro: ' + (($('#ferro').is(':checked'))?'Sí':'No'));
|
$('#resumenFerro').text('Ferro: ' + (($('#ferro').is(':checked'))?'Sí':'No'));
|
||||||
|
|
||||||
$('#tipoImpresion').text('Impresión: ' +
|
$('#tipoImpresion').text('Impresión: ' +
|
||||||
($('#colorNegroDiv').hasClass('checked')?'Negro ':'Color ') +
|
($('#colorNegroDiv').hasClass('checked')?'Negro estándar':
|
||||||
($('#calidadEstandarDiv').hasClass('checked')?'Estándar': 'Premium'));
|
$('#colorNegroHqDiv').hasClass('checked')?'Negro premium':
|
||||||
if($('#colorNegroDiv').hasClass('checked')){
|
$('#colorColorDiv').hasClass('checked')?'Color estándar':'Color premium'));
|
||||||
|
|
||||||
|
if($('#colorNegroDiv').hasClass('checked') || $('#colorNegroHqDiv').hasClass('checked')){
|
||||||
$('#pResumenPaginasColor').hide();
|
$('#pResumenPaginasColor').hide();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -279,13 +281,11 @@ function finalizarPresupuesto(confirmar){
|
|||||||
data: datos,
|
data: datos,
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
|
|
||||||
if(confirmar){
|
if(Object.keys(response).length > 0) {
|
||||||
if(Object.keys(response).length > 0) {
|
if(response.status > 0){
|
||||||
if(response.status > 0){
|
window.location.href = response.url + '/' + response.status;
|
||||||
window.location.href = response.url + '/' + response.status;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
|
|
||||||
|
|||||||
@ -212,12 +212,6 @@ theTable = $('#tableOfPresupuestos').DataTable({
|
|||||||
searchable: false,
|
searchable: false,
|
||||||
targets: [lastColNr]
|
targets: [lastColNr]
|
||||||
},
|
},
|
||||||
<?php if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')): ?>
|
|
||||||
{
|
|
||||||
target: 3,
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
<?php endif; ?>
|
|
||||||
],
|
],
|
||||||
|
|
||||||
columns : [
|
columns : [
|
||||||
@ -270,8 +264,9 @@ theTable = $('#tableOfPresupuestos').DataTable({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
<?php if ($clienteId == 0): ?>
|
||||||
{ 'data': 'cliente'},
|
{ 'data': 'cliente'},
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
{ 'data': 'titulo' },
|
{ 'data': 'titulo' },
|
||||||
{ 'data': 'paginas' },
|
{ 'data': 'paginas' },
|
||||||
@ -293,7 +288,11 @@ theTable = $('#tableOfPresupuestos').DataTable({
|
|||||||
theTable.on( 'draw.dt', function () {
|
theTable.on( 'draw.dt', function () {
|
||||||
|
|
||||||
const dateCols = [1];
|
const dateCols = [1];
|
||||||
|
<?php if ($clienteId == 0): ?>
|
||||||
const priceCols = [7];
|
const priceCols = [7];
|
||||||
|
<?php else: ?>
|
||||||
|
const priceCols = [6];
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
for (let coln of dateCols) {
|
for (let coln of dateCols) {
|
||||||
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
||||||
|
|||||||
BIN
httpdocs/assets/img/bn.png
Normal file
BIN
httpdocs/assets/img/bn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
BIN
httpdocs/assets/img/bn_hq.png
Normal file
BIN
httpdocs/assets/img/bn_hq.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 172 KiB |
BIN
httpdocs/assets/img/color.png
Normal file
BIN
httpdocs/assets/img/color.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
BIN
httpdocs/assets/img/color_hq.png
Normal file
BIN
httpdocs/assets/img/color_hq.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 155 KiB |
Reference in New Issue
Block a user