mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'mod/recoger_taller_presucliente' into 'main'
añadiro recoger en taller en direcciones presupuesto cliente See merge request jjimenez/safekat!435
This commit is contained in:
@ -935,13 +935,14 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
if ($id != 0) {
|
if ($id != 0) {
|
||||||
$borrar_antes = true;
|
$borrar_antes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$datos_presupuesto['prototipo'] = $prototipo;
|
$datos_presupuesto['prototipo'] = $prototipo;
|
||||||
$datos_presupuesto['ferro'] = $ferro;
|
$datos_presupuesto['ferro'] = $ferro;
|
||||||
$datos_presupuesto['ferro_digital'] = $ferroDigital;
|
$datos_presupuesto['ferro_digital'] = $ferroDigital;
|
||||||
$datos_presupuesto['marcapaginas'] = $marcapaginas;
|
$datos_presupuesto['marcapaginas'] = $marcapaginas;
|
||||||
$datos_presupuesto['retractilado'] = $retractilado;
|
$datos_presupuesto['retractilado'] = $retractilado;
|
||||||
$datos_presupuesto['retractilado5'] = $retractilado5;
|
$datos_presupuesto['retractilado5'] = $retractilado5;
|
||||||
|
$datos_presupuesto['entrega_taller'] = $reqData['entrega_taller'] ?? 0;
|
||||||
|
|
||||||
$id = $model_presupuesto->insertarPresupuestoCliente(
|
$id = $model_presupuesto->insertarPresupuestoCliente(
|
||||||
$id,
|
$id,
|
||||||
@ -973,7 +974,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
$this->guardarLineaPresupuesto($id, $resultado_presupuesto['info']['guardas']);
|
$this->guardarLineaPresupuesto($id, $resultado_presupuesto['info']['guardas']);
|
||||||
|
|
||||||
// Servicios
|
// Servicios
|
||||||
if(intval($sobrecubierta['acabado']) > 0) {
|
if (intval($sobrecubierta['acabado']) > 0) {
|
||||||
$model = model('App\Models\Presupuestos\PresupuestoAcabadosModel');
|
$model = model('App\Models\Presupuestos\PresupuestoAcabadosModel');
|
||||||
$servicio = $model->getPrecioTarifa(intval($sobrecubierta['acabado']), intval($selected_tirada), -1, $POD);
|
$servicio = $model->getPrecioTarifa(intval($sobrecubierta['acabado']), intval($selected_tirada), -1, $POD);
|
||||||
|
|
||||||
@ -983,7 +984,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (intval($cubierta['acabado'])>0) {
|
if (intval($cubierta['acabado']) > 0) {
|
||||||
$model = model('App\Models\Presupuestos\PresupuestoAcabadosModel');
|
$model = model('App\Models\Presupuestos\PresupuestoAcabadosModel');
|
||||||
$servicio = $model->getPrecioTarifa(intval($cubierta['acabado']), intval($selected_tirada), -1, $POD);
|
$servicio = $model->getPrecioTarifa(intval($cubierta['acabado']), intval($selected_tirada), -1, $POD);
|
||||||
|
|
||||||
@ -1121,7 +1122,12 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
[$data['datosGenerales']['paginasNegro'], $data['datosGenerales']['paginasColor']] =
|
[$data['datosGenerales']['paginasNegro'], $data['datosGenerales']['paginasColor']] =
|
||||||
$this->getPaginas($lineas);
|
$this->getPaginas($lineas);
|
||||||
|
|
||||||
$data['direcciones'] = $this->obtenerDireccionesEnvio($id, $presupuesto->cliente_id);
|
if (intval($presupuesto->envios_recoge_cliente) == 1) {
|
||||||
|
$data['direcciones']['entrega_taller'] = 1;
|
||||||
|
} else {
|
||||||
|
$data['direcciones']['entrega_taller'] = 0;
|
||||||
|
$data['direcciones'] = $this->obtenerDireccionesEnvio($id, $presupuesto->cliente_id);
|
||||||
|
}
|
||||||
|
|
||||||
if (intval($presupuesto->estado_id) == 2) {
|
if (intval($presupuesto->estado_id) == 2) {
|
||||||
$data['resumen']['base'] = $presupuesto->total_aceptado;
|
$data['resumen']['base'] = $presupuesto->total_aceptado;
|
||||||
@ -2382,7 +2388,6 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
{
|
{
|
||||||
$model = model('App\Models\Presupuestos\PresupuestoDireccionesModel');
|
$model = model('App\Models\Presupuestos\PresupuestoDireccionesModel');
|
||||||
$model_direcciones = model('App\Models\Clientes\ClienteDireccionesModel');
|
$model_direcciones = model('App\Models\Clientes\ClienteDireccionesModel');
|
||||||
$model_pais = model('App\Models\Configuracion\PaisModel');
|
|
||||||
$direcciones = $model->where('presupuesto_id', $id)->findAll();
|
$direcciones = $model->where('presupuesto_id', $id)->findAll();
|
||||||
|
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|||||||
@ -434,6 +434,8 @@ class PresupuestoModel extends \App\Models\BaseModel
|
|||||||
'merma_cubierta' => $extra_info['merma'],
|
'merma_cubierta' => $extra_info['merma'],
|
||||||
'paginasCuadernillo' => $data['paginasCuadernillo'],
|
'paginasCuadernillo' => $data['paginasCuadernillo'],
|
||||||
|
|
||||||
|
'recoger_en_taller' => $data['entrega_taller'],
|
||||||
|
|
||||||
'comp_pos_paginas_color' => $data['interior']['pos_paginas_color'],
|
'comp_pos_paginas_color' => $data['interior']['pos_paginas_color'],
|
||||||
'paginas_color_consecutivas' => $data['interior']['paginas_color_consecutivas'],
|
'paginas_color_consecutivas' => $data['interior']['paginas_color_consecutivas'],
|
||||||
'papel_interior_diferente' => $data['interior']['papelInteriorDiferente'],
|
'papel_interior_diferente' => $data['interior']['papelInteriorDiferente'],
|
||||||
|
|||||||
@ -1,94 +0,0 @@
|
|||||||
<div class="col-12 pb-2">
|
|
||||||
|
|
||||||
<input hidden readonly style="background: #E8E8E8;" id="id" name="id" maxLength="12" class="form-control" value="<?= old('id', $presupuestoEntity->id) ?>">
|
|
||||||
|
|
||||||
<div class="row g-2">
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="titulo" class="form-label">
|
|
||||||
<?=lang('Presupuestos.titulo') ?>*
|
|
||||||
</label>
|
|
||||||
<input type="text" id="titulo" name="titulo" maxLength="300" class="form-control" value="<?=old('titulo', $presupuestoEntity->titulo) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="autor" class="form-label">
|
|
||||||
<?=lang('Presupuestos.autor') ?>
|
|
||||||
</label>
|
|
||||||
<input type="text" id="autor" name="autor" maxLength="150" class="form-control" value="<?=old('autor', $presupuestoEntity->autor) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="coleccion" class="form-label">
|
|
||||||
<?=lang('Presupuestos.coleccion') ?>
|
|
||||||
</label>
|
|
||||||
<input type="text" id="coleccion" name="coleccion" maxLength="255" class="form-control" value="<?=old('coleccion', $presupuestoEntity->coleccion) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="numeroEdicion" class="form-label">
|
|
||||||
<?=lang('Presupuestos.numeroEdicion') ?>
|
|
||||||
</label>
|
|
||||||
<input type="text" id="numeroEdicion" name="numero_edicion" maxLength="50" class="form-control" value="<?=old('numero_edicion', $presupuestoEntity->numero_edicion) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="numeroEdicion" class="form-label">
|
|
||||||
<?=lang('Presupuestos.numeroEdicion') ?>
|
|
||||||
</label>
|
|
||||||
<input type="text" id="numeroEdicion" name="numero_edicion" maxLength="50" class="form-control" value="<?=old('numero_edicion', $presupuestoEntity->numero_edicion) ?>">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="isbn" class="form-label">
|
|
||||||
<?=lang('Presupuestos.isbn') ?>
|
|
||||||
</label>
|
|
||||||
<input type="text" id="isbn" name="isbn" maxLength="50" class="form-control" value="<?=old('isbn', $presupuestoEntity->isbn) ?>">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="paisId" class="form-label">
|
|
||||||
<?=lang('Presupuestos.paisId') ?>*
|
|
||||||
</label>
|
|
||||||
<select id="paisId" name="pais_id" class="form-control select2bs" style="width: 100%;" >
|
|
||||||
<?php foreach ($datosPresupuesto->paisList as $item) : ?>
|
|
||||||
<option value="<?=$item->id ?>"<?=$item->id==$presupuestoEntity->pais_id ? ' selected':'' ?>>
|
|
||||||
<?=$item->nombre ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr> <!-- Separador -->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="clienteId" class="form-label">
|
|
||||||
<?= lang('Presupuestos.clienteId') ?>*
|
|
||||||
</label>
|
|
||||||
<select id="clienteId" name="clienteId" class="form-control select2bs2" style="width: 100%;">
|
|
||||||
|
|
||||||
<?php if (isset($datosPresupuesto->clienteList) && is_array($datosPresupuesto->clienteList) && !empty($datosPresupuesto->clienteList)) :
|
|
||||||
foreach ($datosPresupuesto->clienteList as $k => $v) : ?>
|
|
||||||
<option value="<?= $k ?>" <?= $k == $presupuestoEntity->cliente_id ? ' selected' : '' ?>>
|
|
||||||
<?= $v ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="referenciaCliente" class="form-label">
|
|
||||||
<?=lang('Presupuestos.referenciaCliente') ?>
|
|
||||||
</label>
|
|
||||||
<input type="text" id="referenciaCliente" name="referencia_cliente" maxLength="100" class="form-control" value="<?=old('referencia_cliente', $presupuestoEntity->referencia_cliente) ?>">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
<div class="col-12 pb-2">
|
|
||||||
|
|
||||||
<div id="containerTiradasEnvios" class="row mb-3">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
|
|
||||||
<div class="col-sm-4 mb-3">
|
|
||||||
<label for="direcciones" class="form-label">Mis direcciones</label>
|
|
||||||
<select id="direcciones" name="direcciones" class="form-control select2bs2" style="width: 100%;"></select>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-2 mb-3">
|
|
||||||
<label for="unidadesEnvio" class="form-label">
|
|
||||||
Unidades
|
|
||||||
</label>
|
|
||||||
<input type="number" class="form-control" id="unidadesEnvio" name="unidadesEnvio" maxLength="8" step="1" class="form-control">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
<div class="col-sm-2 mb-3 mt-auto mb-0">
|
|
||||||
<button id="insertarDireccion" type="button" class="btn btn-secondary waves-effect waves-light">Insertar</button>
|
|
||||||
</div>
|
|
||||||
<div id="errorDirecciones" class="fv-plugins-message-container invalid-feedback" style="display: none;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-sm-4 mb-3">
|
|
||||||
<div class="form-check form-switch mb-2">
|
|
||||||
<input class="form-check-input" type="checkbox" id="entregaPieCalle" name="entregaPieCalle" value="1">
|
|
||||||
<label class="form-check-label" for="add_entregaPieCalle"><?= lang('PresupuestosDirecciones.entregaPieCalle') ?></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="divDirecciones" class="col-12 pb-2">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?= $this->section("additionalInlineJs") ?>
|
|
||||||
|
|
||||||
window.direcciones = <?= json_encode($presupuestoEntity->direcciones_envio) ?>;
|
|
||||||
window.direcciones_sel_tirada = <?= json_encode($presupuestoEntity->selected_tirada) ?>;
|
|
||||||
window.routes_direcciones = {
|
|
||||||
direcciones: "<?= route_to('getDirecciones') ?>",
|
|
||||||
getDatos: "<?= route_to('getDatosDireccion') ?>",
|
|
||||||
nuevaDireccion: "<?= route_to('nuevaDireccion') ?>",
|
|
||||||
}
|
|
||||||
<?= $this->endSection() ?>
|
|
||||||
@ -1,665 +0,0 @@
|
|||||||
<div class="col-12 pb-2">
|
|
||||||
|
|
||||||
<input hidden readonly style="background: #E8E8E8;" id="id" name="id" maxLength="12" class="form-control" value="<?= old('id', $presupuestoEntity->id) ?>">
|
|
||||||
|
|
||||||
<div class="row g-2">
|
|
||||||
|
|
||||||
<h3 id="tituloDisenioLibro">Fresado</h3>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 mb-3">
|
|
||||||
<label for="titulo" class="form-label">
|
|
||||||
<?= lang('Presupuestos.titulo') ?>*
|
|
||||||
</label>
|
|
||||||
<input type="text" id="titulo" name="titulo" maxLength="300" class="form-control" value="<?= old('titulo', $presupuestoEntity->titulo) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6 mb-3" <?= $clienteId != 0 && !(auth()->user()->inGroup('admin') || auth()->user()->inGroup('beta')) ?' style="display:none;"':''?>>
|
|
||||||
<label for="clienteId" class="form-label">
|
|
||||||
<?= lang('Presupuestos.clienteId') ?>*
|
|
||||||
</label>
|
|
||||||
<select id="clienteId" name="clienteId" class="form-control select2bs2" style="width: 100%;">
|
|
||||||
|
|
||||||
<?php if (isset($datosPresupuesto->clienteList) && is_array($datosPresupuesto->clienteList) && !empty($datosPresupuesto->clienteList)) :
|
|
||||||
foreach ($datosPresupuesto->clienteList as $k => $v) : ?>
|
|
||||||
<option value="<?= $k ?>" <?= $k == $clienteId ? ' selected' : '' ?>>
|
|
||||||
<?= $v ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-sm-6 mb-3">
|
|
||||||
<label for="referenciaCliente" class="form-label">
|
|
||||||
<?php if($clienteId == 0): ?>
|
|
||||||
<?= lang('Presupuestos.referenciaCliente') ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<?= lang('Presupuestos.referenciaCliente2') ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</label>
|
|
||||||
<input type="text" id="referenciaCliente" name="referencia_cliente" maxLength="100" class="form-control" value="<?= old('referencia_cliente', $presupuestoEntity->referencia_cliente) ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tapaDiv" class="row mt-3">
|
|
||||||
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2" id="tapaBlandaDiv">
|
|
||||||
<div id="tapaBlandaInnerDiv" class="form-check custom-option custom-option-tapa custom-option-basic
|
|
||||||
<?php echo ($datosPresupuesto->tapa == 'blanda' ? ' checked"': '"'); ?> >
|
|
||||||
<label class="form-check-label custom-option-content" for="tapaBlanda">
|
|
||||||
<input name="tapaBlanda" class="form-check-input elementos-libro calcular-presupuesto" type="radio" value="" id="tapaBlanda"
|
|
||||||
<?php echo ($datosPresupuesto->tapa == 'blanda' ? ' checked=""': ''); ?> >
|
|
||||||
<span class="custom-option-header">
|
|
||||||
<span class="h6 mb-0">Tapa blanda</span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="tapaDuraDiv" class="col-sm-3 mb-md-0 mb-2">
|
|
||||||
<div class="form-check custom-option custom-option-tapa custom-option-basic
|
|
||||||
<?php echo ($datosPresupuesto->tapa == 'dura' ? ' checked"': '"'); ?> >
|
|
||||||
<label class="form-check-label custom-option-content" for="tapaDura">
|
|
||||||
<input name="tapaDura" class="form-check-input elementos-libro calcular-presupuesto" type="radio" value="" id="tapaDura"
|
|
||||||
<?php echo ($datosPresupuesto->tapa == 'dura' ? ' checked=""': ''); ?> >
|
|
||||||
<span class="custom-option-header">
|
|
||||||
<span class="h6 mb-0">Tapa Dura</span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> <!--//.row -->
|
|
||||||
|
|
||||||
<div class="divider divider-dark text-start mb-1">
|
|
||||||
<div class="divider-text">
|
|
||||||
<h5>Datos presupuesto</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div id="errorTiradas" class="fv-plugins-message-container invalid-feedback" style="display: none;">
|
|
||||||
<div>No puede mezclar tiradas mayores de 30 unidades con tiradas menores de 30 unidades</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-3 mb-3">
|
|
||||||
<label for="tirada" class="form-label">
|
|
||||||
<?= lang('Presupuestos.tirada') ?> 1
|
|
||||||
</label>
|
|
||||||
<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">
|
|
||||||
<label for="tirada2" class="form-label">
|
|
||||||
<?= lang('Presupuestos.tirada') ?> 2
|
|
||||||
</label>
|
|
||||||
<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 class="col-sm-3 mb-3">
|
|
||||||
<label for="tirada3" class="form-label">
|
|
||||||
<?= lang('Presupuestos.tirada') ?> 3
|
|
||||||
</label>
|
|
||||||
<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 class="col-sm-3 mb-3">
|
|
||||||
<label for="tirada4" class="form-label">
|
|
||||||
<?= lang('Presupuestos.tirada') ?> 4
|
|
||||||
</label>
|
|
||||||
<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> <!--//.row -->
|
|
||||||
|
|
||||||
</div> <!--//.row -->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-sm-3 mb-3">
|
|
||||||
<label for="paginas" class="form-label">
|
|
||||||
<?= lang('Presupuestos.paginas') ?>
|
|
||||||
</label>
|
|
||||||
<input type="number" class="calcular-presupuesto" id="paginas" name="paginas" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->paginas) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
|
|
||||||
<div id="div_pagCuadernillo" class="col-sm-3 mb-3">
|
|
||||||
<label for="paginas_por_cuadernillo" class="form-label">
|
|
||||||
<?= lang('Presupuestos.paginasCuadernillo') ?>
|
|
||||||
</label>
|
|
||||||
<select id="paginasCuadernillo" name="paginas_por_cuadernillo" class="calcular-presupuesto form-control select2bs2" style="width: 100%;">
|
|
||||||
<?php if (isset($datosPresupuesto->paginasCuadernillo) && is_array($datosPresupuesto->paginasCuadernillo) && !empty($datosPresupuesto->paginasCuadernillo)) :
|
|
||||||
foreach ($datosPresupuesto->paginasCuadernillo as $value) : ?>
|
|
||||||
<option value="<?= $value ?>" <?= $value == $presupuestoEntity->paginas_por_cuadernillo ? ' selected' : '' ?>>
|
|
||||||
<?= $value ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</select>
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
|
|
||||||
</div> <!--//.row -->
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div id="tamanioLibroDiv" class="col-sm-3 mb-3" <?= $presupuestoEntity->papel_formato_personalizado == false ? '' : 'style="display: none"'; ?>>
|
|
||||||
<label id="label_papelFormatoId" for="papelFormatoId" class="form-label">
|
|
||||||
Tamaño Libro*
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<select id="papelFormatoId" name="papel_formato_id" tabindex="3" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
|
|
||||||
|
|
||||||
<?php if (isset($datosPresupuesto->papelFormatoList) && is_array($datosPresupuesto->papelFormatoList) && !empty($datosPresupuesto->papelFormatoList)) :
|
|
||||||
foreach ($datosPresupuesto->papelFormatoList as $formato) : ?>
|
|
||||||
<option value="<?= $formato->id ?>" <?= $formato->id == $presupuestoEntity->papel_formato_id ? ' selected' : '' ?>>
|
|
||||||
<?= $formato->tamanio ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="anchoLibroDiv" class="col-sm-3 mb-3" <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?>>
|
|
||||||
<div class="mb-1">
|
|
||||||
<label class="form-label" for="papelFormatoAncho">Ancho Libro</label>
|
|
||||||
<input type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="1" class="form-control formato_libro calcular-presupuesto" value="<?= old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
<div id="altoLibroDiv" class="col-sm-3 mb-3" <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?>>
|
|
||||||
<div class="mb-1">
|
|
||||||
<label class="form-label" for="papelFormatoAlto">Alto Libro</label>
|
|
||||||
<input type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="1" class="form-control formato_libro calcular-presupuesto" value="<?= old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
<div class="col-sm-3 mb-3 d-flex align-items-end">
|
|
||||||
<div class="form-check form-switch mb-2">
|
|
||||||
<input class="form-check-input" type="checkbox" id="papelFormatoPersonalizado" name="papel_formato_personalizado" value="1" <?= $presupuestoEntity->papel_formato_personalizado == true ? 'checked' : ''; ?>>
|
|
||||||
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.papelFormatoPersonalizado') ?></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> <!--//.row -->
|
|
||||||
|
|
||||||
<div class="divider divider-dark text-start mb-1">
|
|
||||||
<div class="divider-text">
|
|
||||||
<h5>Interior</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="errorInterior" class="fv-plugins-message-container invalid-feedback" style="display: none;">
|
|
||||||
<div>No existe combinación con las opciones seleccionadas. Pruebe con otro papel/gramaje</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h6> Color del interior </h6>
|
|
||||||
|
|
||||||
<div class="row-color">
|
|
||||||
<!-- Fila 1 -->
|
|
||||||
<div class="row mb-2">
|
|
||||||
<!-- Imagen 1 (Color Negro) -->
|
|
||||||
<div class="col-sm-4 offset-sm-1 d-flex flex-column align-items-center justify-content-center">
|
|
||||||
<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">
|
|
||||||
<span class="custom-option-body">
|
|
||||||
<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>
|
|
||||||
<!-- Texto alineado debajo de la imagen -->
|
|
||||||
<div>
|
|
||||||
<h6 class="mt-2 text-center">Blanco y Negro Estándar</h6>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Imagen 2 (Color Negro HQ) -->
|
|
||||||
<div class="col-sm-4 d-flex flex-column align-items-center justify-content-center">
|
|
||||||
<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="colorNegroHq">
|
|
||||||
<span class="custom-option-body">
|
|
||||||
<img style="height:150px;width:240px" src="<?= site_url('assets/img/bn_hq.png') ?>" alt="">
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<input name="colorNegroHq" class="form-check-input calcular-presupuesto" type="radio" value="colorNegroHq" id="colorNegroHq"
|
|
||||||
<?php echo ($datosPresupuesto->color_impresion == 'negroHq' ? ' checked=""': ''); ?> >
|
|
||||||
</div>
|
|
||||||
<!-- Texto alineado debajo de la imagen -->
|
|
||||||
<div>
|
|
||||||
<h6 class="mt-2 text-center">Blanco y Negro Premium</h6>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> <!-- //.row -->
|
|
||||||
|
|
||||||
<!-- Fila 2 -->
|
|
||||||
<div class="row mb-2">
|
|
||||||
<!-- Imagen 3 (Color) -->
|
|
||||||
<div class="col-sm-4 offset-sm-1 d-flex flex-column align-items-center 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>
|
|
||||||
<!-- Texto alineado debajo de la imagen -->
|
|
||||||
<div>
|
|
||||||
<h6 class="mt-2 text-center">Color Estándar</h6>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Imagen 4 (Color HQ) -->
|
|
||||||
<div class="col-sm-4 d-flex flex-column align-items-center 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>
|
|
||||||
<!-- Texto alineado debajo de la imagen -->
|
|
||||||
<div>
|
|
||||||
<h6 class="mt-2 text-center">Color Premium</h6>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> <!-- //.row -->
|
|
||||||
</div> <!-- //.row-color -->
|
|
||||||
|
|
||||||
<div id="pagColorDiv" class="row">
|
|
||||||
<div class="col-sm-3 mb-3">
|
|
||||||
<label for="paginasColor" class="form-label">
|
|
||||||
Páginas a color
|
|
||||||
</label>
|
|
||||||
<input type="number" class="calcular-presupuesto" id="paginasColor" name="paginasColor" maxLength="8" step="1" class="form-control" value="<?= old(0, $presupuestoEntity->paginasColor) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h6> Papel </h6>
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="papelInterior" class="form-label">Tipo de papel</label>
|
|
||||||
<select id="papelInterior" name="papelInterior" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;"></select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-2 mb-md-0 mb-2">
|
|
||||||
<label for="gramajeInterior" class="form-label">Gramaje (g/m2)</label>
|
|
||||||
<select id="gramajeInterior" name="gramajeInterior" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h6> Opciones extra </h6>
|
|
||||||
<div class="row" <?= $clienteId != 0 ?' style="display:none;"':' '?>>
|
|
||||||
<div class="col-sm-3 mb-3 d-flex align-items-end">
|
|
||||||
<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' : ''; ?>>
|
|
||||||
<label class="form-check-label" for="excluirRotativa">Excluir rotativa</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--SECCION DE CUBIERTA -->
|
|
||||||
<div class="divider divider-dark text-start mb-1">
|
|
||||||
<div class="divider-text">
|
|
||||||
<h5>Cubierta</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="errorCubierta" class="fv-plugins-message-container invalid-feedback" style="display: none;">
|
|
||||||
<div>No existe combinación con las opciones seleccionadas. Pruebe con otro papel/gramaje</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h6> Papel </h6>
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="papelCubierta" class="form-label">Tipo de papel</label>
|
|
||||||
<select id="papelCubierta" name="papelCubierta" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
|
|
||||||
<?php if (isset($datosPresupuesto->papelCubierta) && is_array($datosPresupuesto->papelCubierta) && !empty($datosPresupuesto->papelCubierta)) :
|
|
||||||
foreach ($datosPresupuesto->papelCubierta as $k => $v) : ?>
|
|
||||||
<option value="<?= $v->id ?>">
|
|
||||||
<?= $v->nombre ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-2 mb-md-0 mb-2">
|
|
||||||
<label for="gramajeCubierta" class="form-label">Gramaje (g/m2)</label>
|
|
||||||
<select id="gramajeCubierta" name="gramajeCubierta" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="carasCubierta" class="form-label">Caras impresas cubierta</label>
|
|
||||||
<select id="carasCubierta" name="carasCubierta" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
|
|
||||||
<option value="2" <?php echo $presupuestoEntity->paginas_cubierta==2?'selected':''?> >
|
|
||||||
<p><?= lang('Presupuestos.unaCara') ?></p>
|
|
||||||
</option>
|
|
||||||
<option value="4" <?php echo $presupuestoEntity->paginas_cubierta==4?'selected':''?>>
|
|
||||||
<p><?= lang('Presupuestos.dosCaras') ?></p>
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<h6 class='solapas-cubierta'> Opciones extra </h6>
|
|
||||||
|
|
||||||
<div class="row solapas-cubierta">
|
|
||||||
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2 d-flex align-items-end">
|
|
||||||
<div class="form-check form-switch mb-2">
|
|
||||||
<input class="form-check-input" type="checkbox" id="solapasCubierta" name="solapasCubierta" value="0" <?= $presupuestoEntity->solapas == true ? 'checked' : ''; ?>>
|
|
||||||
<label class="form-check-label" for="solapasCubierta">Solapas cubierta</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tamanioSolapasCubierta" class="col-sm-3 mb-md-0 mb-2" <?= $presupuestoEntity->solapas == true ? '' : 'style="display: none;"'; ?>>
|
|
||||||
<label for="anchoSolapasCubierta" class="form-label">Tamaño</label>
|
|
||||||
<input type="number" id="anchoSolapasCubierta" name="anchoSolapasCubierta" maxLength="8" step="1" class="form-control calcular-presupuesto" value="<?= old(0, $presupuestoEntity->solapas_ancho) ?>">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="acabadosCubierta" class="form-label">Acabados cubierta</label>
|
|
||||||
<select id="acabadosCubierta" name="acabadosCubierta" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
|
|
||||||
<?php if (isset($datosPresupuesto->acabadosCubierta) && is_array($datosPresupuesto->acabadosCubierta) && !empty($datosPresupuesto->acabadosCubierta)) :
|
|
||||||
foreach ($datosPresupuesto->acabadosCubierta as $acabado) : ?>
|
|
||||||
<option value="<?= $acabado->id ?>" <?= $acabado->id == $presupuestoEntity->acabado_cubierta_id ? ' selected' : '' ?>>
|
|
||||||
<?= $acabado->label ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!--SECCION DE SOBRECUBIERTA -->
|
|
||||||
<div class="divider divider-dark text-start mb-1 sobrecubierta">
|
|
||||||
<div class="divider-text">
|
|
||||||
<h5>Sobrecubierta</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="errorSobrecubierta" class="fv-plugins-message-container invalid-feedback" style="display: none;">
|
|
||||||
<div>No existe combinación con las opciones seleccionadas. Pruebe con otro papel/gramaje</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row sobrecubierta">
|
|
||||||
<div class="col-sm-3 mb-md-0 mb-2 d-flex align-items-end">
|
|
||||||
<div class="form-check form-switch mb-2">
|
|
||||||
<input class="form-check-input" type="checkbox" id="enableSobrecubierta" name="enableSobrecubierta" value="0"
|
|
||||||
<?php if (isset($presupuestoEntity->papel_sobrecubierta) && $presupuestoEntity->papel_sobrecubierta>0) :
|
|
||||||
echo 'checked';
|
|
||||||
endif; ?>
|
|
||||||
>
|
|
||||||
<label class="form-check-label" for="enableSobrecubierta">Añadir sobrecubierta</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h6 class="sobrecubierta enable-sobrecubierta"
|
|
||||||
<?php if (isset($presupuestoEntity->papel_sobrecubierta) && $presupuestoEntity->papel_sobrecubierta>0) :
|
|
||||||
echo '';
|
|
||||||
else:
|
|
||||||
echo 'style="display: none;"';
|
|
||||||
endif; ?>
|
|
||||||
> Papel </h6>
|
|
||||||
<div class="row sobrecubierta enable-sobrecubierta">
|
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="papelSobrecubierta" class="form-label">Tipo de papel</label>
|
|
||||||
<select id="papelSobrecubierta" name="papelSobrecubierta" class="form-control select2bs2 calcular-presupuesto input-sobrecubierta" style="width: 100%;">
|
|
||||||
<?php if (isset($datosPresupuesto->papelSobrecubierta) && is_array($datosPresupuesto->papelSobrecubierta) && !empty($datosPresupuesto->papelSobrecubierta)) :
|
|
||||||
foreach ($datosPresupuesto->papelSobrecubierta as $k => $v) : ?>
|
|
||||||
<option value="<?= $v->id ?>">
|
|
||||||
<?= $v->nombre ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-2 mb-md-0 mb-2">
|
|
||||||
<label for="gramajeSobrecubierta" class="form-label">Gramaje (g/m2)</label>
|
|
||||||
<select id="gramajeSobrecubierta" name="gramajeSobrecubierta" class="form-control select2bs2 calcular-presupuesto input-sobrecubierta" style="width: 100%;">
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h6 class="sobrecubierta enable-sobrecubierta"
|
|
||||||
<?php if (isset($presupuestoEntity->papel_sobrecubierta) && $presupuestoEntity->papel_sobrecubierta>0) :
|
|
||||||
echo '';
|
|
||||||
else:
|
|
||||||
echo 'style="display: none;"';
|
|
||||||
endif; ?>
|
|
||||||
> Opciones extra </h6>
|
|
||||||
|
|
||||||
<div class="row sobrecubierta enable-sobrecubierta"
|
|
||||||
<?php if (isset($presupuestoEntity->papel_sobrecubierta) && $presupuestoEntity->papel_sobrecubierta>0) :
|
|
||||||
echo '';
|
|
||||||
else:
|
|
||||||
echo 'style="display: none;"';
|
|
||||||
endif; ?>
|
|
||||||
>
|
|
||||||
|
|
||||||
<div id="tamanioSolapasSobrecubierta" class="col-sm-3 mb-md-0 mb-2"">
|
|
||||||
<label for="anchoSolapasSobrecubierta" class="form-label">Tamaño solapas</label>
|
|
||||||
<input type="number" id="anchoSolapasSobrecubierta" name="anchoSolapasSobrecubierta" maxLength="8" step="1" class="form-control input-sobrecubierta calcular-presupuesto" value="<?= old(0, $presupuestoEntity->solapas_ancho_sobrecubierta) ?>">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row sobrecubierta enable-sobrecubierta"
|
|
||||||
<?php if (isset($presupuestoEntity->papel_sobrecubierta) && $presupuestoEntity->papel_sobrecubierta>0) :
|
|
||||||
echo '';
|
|
||||||
else:
|
|
||||||
echo 'style="display: none;"';
|
|
||||||
endif; ?>
|
|
||||||
>
|
|
||||||
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="acabadosSobrecubierta" class="form-label">Acabados sobrecubierta</label>
|
|
||||||
<select id="acabadosSobrecubierta" name="acabadosSobrecubierta" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
|
|
||||||
<?php if (isset($datosPresupuesto->acabadosSobrecubierta) && is_array($datosPresupuesto->acabadosSobrecubierta) && !empty($datosPresupuesto->acabadosSobrecubierta)) :
|
|
||||||
foreach ($datosPresupuesto->acabadosSobrecubierta as $acabado) : ?>
|
|
||||||
<option value="<?= $acabado->id ?>" <?= $acabado->id == $presupuestoEntity->acabado_sobrecubierta_id ? ' selected' : '' ?>>
|
|
||||||
<?= $acabado->label ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!--SECCION DE GUARDAS -->
|
|
||||||
<div class="divider divider-dark text-start mb-1 guardas">
|
|
||||||
<div class="divider-text">
|
|
||||||
<h5>Guardas</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="errorGuardas" class="fv-plugins-message-container invalid-feedback" style="display: none;">
|
|
||||||
<div>No existe combinación con las opciones seleccionadas. Pruebe con otro papel/gramaje</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="divGuardas" class="row guardas">
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="impresionGuardas" class="form-label">Impresión de guardas</label>
|
|
||||||
<select id="impresionGuardas" name="impresionGuardas" class="form-control select2bs2 comp_guardas_items calcular-presupuesto" style="width: 100%;">
|
|
||||||
<option value="0"
|
|
||||||
<?php echo ((!isset($presupuestoEntity->paginas_guardas) || $presupuestoEntity->paginas_guardas==0) ? 'selected' : ''); ?>
|
|
||||||
>
|
|
||||||
<p><?= lang('Presupuestos.sinImpresion') ?></p>
|
|
||||||
</option>
|
|
||||||
<option value="4"
|
|
||||||
<?php echo ($presupuestoEntity->paginas_guardas==4 ? 'selected' : ''); ?>
|
|
||||||
>
|
|
||||||
<p><?= lang('Presupuestos.unaCara') ?></p>
|
|
||||||
</option>
|
|
||||||
<option value="8"
|
|
||||||
<?php echo ($presupuestoEntity->paginas_guardas==8 ? 'selected' : ''); ?>
|
|
||||||
>
|
|
||||||
<p><?= lang('Presupuestos.dosCaras') ?></p>
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row guardas">
|
|
||||||
<div class="col-sm-4 mb-md-0 mb-2">
|
|
||||||
<label for="papelGuardas" class="form-label">Tipo de papel</label>
|
|
||||||
<select id="papelGuardas" name="papelGuardas" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
|
|
||||||
<?php if (isset($datosPresupuesto->papelGuardas) && is_array($datosPresupuesto->papelGuardas) && !empty($datosPresupuesto->papelGuardas)) :
|
|
||||||
foreach ($datosPresupuesto->papelGuardas as $k => $v) : ?>
|
|
||||||
<option value="<?= $v->id ?>" <?php echo ($v->id==$presupuestoEntity->papel_guardas?'selected':'');?> >
|
|
||||||
<?= $v->nombre ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!--SECCION DE SERVICIOS EXTRA -->
|
|
||||||
<div class="divider divider-dark text-start mb-1">
|
|
||||||
<div class="divider-text">
|
|
||||||
<h5>Servicios Extra</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-3 px-4">
|
|
||||||
<div class="mb-3">
|
|
||||||
<div class="form-check">
|
|
||||||
<label for="retractilado" class="form-check-label">
|
|
||||||
<input type="checkbox" id="retractilado" name="retractilado" serv_id="3" value="1" class="form-check-input servicio-extra calcular-presupuesto" <?= $presupuestoEntity->retractilado == true ? 'checked' : ''; ?>>
|
|
||||||
<?= lang('Presupuestos.retractilado') ?>
|
|
||||||
</label>
|
|
||||||
</div><!--//.form-check -->
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-3 px-4">
|
|
||||||
<div class="mb-3">
|
|
||||||
<div class="form-check">
|
|
||||||
<label for="retractilado5" class="form-check-label">
|
|
||||||
<input type="checkbox" id="retractilado5" name="retractilado_5" serv_id="5" value="1" class="form-check-input servicio-extra calcular-presupuesto" <?= $presupuestoEntity->retractilado5 == true ? 'checked' : ''; ?>>
|
|
||||||
<?= lang('Presupuestos.retractilado5') ?>
|
|
||||||
</label>
|
|
||||||
</div><!--//.form-check -->
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-3 px-4">
|
|
||||||
<div class="mb-3">
|
|
||||||
<div class="form-check">
|
|
||||||
<label for="fajaColor" class="form-check-label">
|
|
||||||
<input type="checkbox" id="fajaColor" name="faja_color" value="1" serv_id="16" class="form-check-input servicio-extra calcular-presupuesto" <?= $presupuestoEntity->faja_color == true ? 'checked' : ''; ?>>
|
|
||||||
<?= lang('Presupuestos.fajaColor') ?>
|
|
||||||
</label>
|
|
||||||
</div><!--//.form-check -->
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-3 px-4">
|
|
||||||
<div class="mb-3">
|
|
||||||
<div class="form-check">
|
|
||||||
<label for="prototipo" class="form-check-label">
|
|
||||||
<input type="checkbox" id="prototipo" name="prototipo" value="1" serv_id="9" class="form-check-input servicio-extra calcular-presupuesto" <?= $presupuestoEntity->prototipo == true ? 'checked' : ''; ?>>
|
|
||||||
<?= lang('Presupuestos.prototipo') ?>
|
|
||||||
</label>
|
|
||||||
</div><!--//.form-check -->
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
<div class="mb-3">
|
|
||||||
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-3 px-4">
|
|
||||||
<div class="mb-3">
|
|
||||||
<div class="form-check">
|
|
||||||
<label for="ferro" class="form-check-label">
|
|
||||||
<input type="checkbox" id="ferro" name="ferro" value="1" serv_id="24" class="form-check-input servicio-extra calcular-presupuesto" <?= $presupuestoEntity->ferro == true ? 'checked' : ''; ?>>
|
|
||||||
<?= lang('Presupuestos.ferro') ?>
|
|
||||||
</label>
|
|
||||||
</div><!--//.form-check -->
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
</div><!--//.row -->
|
|
||||||
|
|
||||||
<!--SECCION DE OTRAS OPCIONES -->
|
|
||||||
<div class="divider divider-dark text-start mb-1">
|
|
||||||
<div class="divider-text">
|
|
||||||
<h5>Otras opciones</h5>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-2 mb-md-0 mb-2">
|
|
||||||
<label for="ivaReducido" class="form-label">I.V.A. reducido</label>
|
|
||||||
<select id="ivaReducido" name="ivaReducido" class="form-control select2bs2 calcular-presupuesto" style="width: 100%;">
|
|
||||||
<option value="1" <?= $presupuestoEntity->iva_reducido == 1? 'selected':''?> >
|
|
||||||
<p><?= lang('SI') ?></p>
|
|
||||||
</option>
|
|
||||||
<option value="0" <?= $presupuestoEntity->iva_reducido == 0? 'selected':''?> >
|
|
||||||
<p><?= lang('NO') ?></p>
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="mt-2">Se verificará que el pedido cumpla con los requisitos establecidos en el Artículo 91 de la Ley 37/1992, sobre inserción de publicidad, antes de proceder con su producción, lo que garantiza la aplicación del IVA reducido del 4%.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div><!--//.col -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?= $this->section("additionalInlineJs") ?>
|
|
||||||
|
|
||||||
|
|
||||||
window.datosDisenioLibro = {
|
|
||||||
papel_interior: <?php echo $presupuestoEntity->papel_interior ? $presupuestoEntity->papel_interior : 'null'; ?>,
|
|
||||||
gramaje_interior: <?php echo $presupuestoEntity->gramaje_interior ? $presupuestoEntity->gramaje_interior : 'null'; ?>,
|
|
||||||
papel_cubierta: <?php echo $presupuestoEntity->papel_cubierta ? $presupuestoEntity->papel_cubierta : 'null'; ?>,
|
|
||||||
gramaje_cubierta: <?php echo $presupuestoEntity->gramaje_cubierta ? $presupuestoEntity->gramaje_cubierta : 'null'; ?>,
|
|
||||||
papel_sobrecubierta: <?php echo $presupuestoEntity->papel_sobrecubierta ? $presupuestoEntity->papel_sobrecubierta : 'null'; ?>,
|
|
||||||
gramaje_sobrecubierta: <?php echo $presupuestoEntity->gramaje_sobrecubierta ? $presupuestoEntity->gramaje_sobrecubierta : 'null'; ?>,
|
|
||||||
}
|
|
||||||
window.routes_disenio_libro = {
|
|
||||||
obtenerGramaje: "<?= route_to('obtenerGramaje') ?>",
|
|
||||||
presupuestoCliente: "<?= route_to('presupuestoCliente') ?>",
|
|
||||||
}
|
|
||||||
<?= $this->endSection() ?>
|
|
||||||
@ -1,316 +0,0 @@
|
|||||||
<div class="col-12 pb-2">
|
|
||||||
<div class="row mb-3">
|
|
||||||
<?php if($presupuestoEntity->estado_id==2): ?>
|
|
||||||
<h2>PRESUPUESTO ACEPTADO</h2>
|
|
||||||
<input type="hidden" id="lomo_cubierta" value=<?php echo $presupuestoEntity->lomo_cubierta ?>>
|
|
||||||
<br>
|
|
||||||
<?php endif; ?>
|
|
||||||
<h3>Resumen</h3>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<h5 class="mb-1">Libro</h5>
|
|
||||||
<p class="mb-0"><small id="tipoLibro"><?php echo (isset($presupuestoEntity->resumen->titulo)?$presupuestoEntity->resumen->titulo:'') ?></small></p>
|
|
||||||
<p class="mb-0"><small id="resumenTamanio">Tamaño: <?php echo (isset($presupuestoEntity->resumen->tamanio)?$presupuestoEntity->resumen->tamanio:'') ?></small></p>
|
|
||||||
<p class="mb-0"><small id="resumenPaginas">Número de páginas: <?php echo $presupuestoEntity->paginas ?></small></p>
|
|
||||||
<p class="mb-0"><small id="resumenTirada">Tirada: <?php echo $presupuestoEntity->tirada ?></small></p>
|
|
||||||
<p class="mb-0"><small id="resumenPrototipo">Prototipo: <?php echo ($presupuestoEntity->prototipo?'SI':'NO') ?></small></p>
|
|
||||||
<p class="mb-3"><small id="resumenFerro">Ferro: <?php echo ($presupuestoEntity->ferro?'SI':'NO') ?></small></p>
|
|
||||||
|
|
||||||
<h5 class="mb-1">Interior</h5>
|
|
||||||
<p class="mb-0"><small id="tipoImpresion">Impresion:
|
|
||||||
<?php echo (isset($presupuestoEntity->resumen->tipo_impresion)?$presupuestoEntity->resumen->tipo_impresion:'') ?>
|
|
||||||
</small></p>
|
|
||||||
<p id="pResumenPaginasColor" class="mb-0" <?php echo ($presupuestoEntity->paginasColor==0?'style="display:none"':'')?>>
|
|
||||||
<small id="resumenPaginasColor">Páginas a color: <?php echo $presupuestoEntity->paginasColor?></small></p>
|
|
||||||
<p class="mb-3"><small id="resumenPapelInterior">Papel:
|
|
||||||
<?php echo (isset($presupuestoEntity->papel_interior_nombre)?$presupuestoEntity->papel_interior_nombre:'') ?>
|
|
||||||
<?php echo (isset($presupuestoEntity->gramaje_interior)?$presupuestoEntity->gramaje_interior:'') ?>gr/m²</small></p>
|
|
||||||
|
|
||||||
<h5 class="mb-1">Cubierta</h5>
|
|
||||||
<p class="mb-0"><small id="resumenPapelCubierta">Papel:
|
|
||||||
<?php echo (isset($presupuestoEntity->papel_cubierta_nombre)?$presupuestoEntity->papel_cubierta_nombre:''); ?>
|
|
||||||
<?php echo (isset($presupuestoEntity->gramaje_cubierta)?$presupuestoEntity->gramaje_cubierta:''); ?>gr/m²</small></p>
|
|
||||||
<p class="mb-0"><small id="resumenCarasCubierta">Impresión: <?php echo ($presupuestoEntity->paginas_cubierta==2?"1 cara":"2 caras");?></small></p>
|
|
||||||
<?php if($presupuestoEntity->solapas_ancho>0 || $presupuestoEntity->estado_id==1): ?>
|
|
||||||
<p class="mb-0"><small id="resumenSolapasCubierta">Solapas: <?php echo $presupuestoEntity->solapas_ancho;?>mm</small></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if($presupuestoEntity->acabado_cubierta_id>0 || $presupuestoEntity->estado_id==1): ?>
|
|
||||||
<p class="mb-3"><small id="resumenAcabadoCubierta">Acabado:
|
|
||||||
<?php if (isset($datosPresupuesto->acabadosCubierta) && is_array($datosPresupuesto->acabadosCubierta) && !empty($datosPresupuesto->acabadosCubierta)) :
|
|
||||||
foreach ($datosPresupuesto->acabadosCubierta as $acabado) :
|
|
||||||
if ($acabado->id == $presupuestoEntity->acabado_cubierta_id):
|
|
||||||
echo $acabado->label;
|
|
||||||
endif;
|
|
||||||
endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</small></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if($presupuestoEntity->papel_sobrecubierta || $presupuestoEntity->estado_id==1): ?>
|
|
||||||
<h5 class="mb-1 resumen-sobrecubierta">Sobrecubierta</h5>
|
|
||||||
<p class="mb-0 resumen-sobrecubierta"><small id="resumenPapelSobrecubierta">Papel:
|
|
||||||
<?php echo (isset($presupuestoEntity->papel_sobrecubierta_nombre)?$presupuestoEntity->papel_sobrecubierta_nombre:'') ?>
|
|
||||||
<?php echo (isset($presupuestoEntity->gramaje_sobrecubierta)?$presupuestoEntity->gramaje_sobrecubierta:'') ?>gr/m²</small></p>
|
|
||||||
<?php if($presupuestoEntity->solapas_ancho_sobrecubierta>0 || $presupuestoEntity->estado_id==1): ?>
|
|
||||||
<p class="mb-0 resumen-sobrecubierta"><small id="resumenSolapasCubierta">Ancho solapas: <?php echo $presupuestoEntity->solapas_ancho_sobrecubierta;?>mm</small></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
<p class="mb-3 resumen-sobrecubierta"><small id="resumenAcabadoSobrecubierta">Acabado:
|
|
||||||
<?php if (isset($datosPresupuesto->acabadosSobrecubierta) && is_array($datosPresupuesto->acabadosSobrecubierta) && !empty($datosPresupuesto->acabadosSobrecubierta)) :
|
|
||||||
foreach ($datosPresupuesto->acabadosSobrecubierta as $acabado) :
|
|
||||||
if ($acabado->id == $presupuestoEntity->acabado_sobrecubierta_id):
|
|
||||||
echo $acabado->label;
|
|
||||||
endif;
|
|
||||||
endforeach;
|
|
||||||
endif; ?>
|
|
||||||
</small></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if($presupuestoEntity->papel_guardas || $presupuestoEntity->estado_id==1): ?>
|
|
||||||
<h5 class="mb-1 resumen-guardas">Guardas</h5>
|
|
||||||
<p class="mb-0 resumen-guardas"><small id="resumenGuardasPapel">Papel:
|
|
||||||
<?php echo (isset($presupuestoEntity->papel_guardas_nombre)?$presupuestoEntity->papel_guardas_nombre:''); ?>
|
|
||||||
170gr/m²</small></p>
|
|
||||||
<p class="mb-3 resumen-guardas"><small id="resumenGuardasCaras">Impresión:
|
|
||||||
<?php if(!isset($presupuestoEntity->paginas_guardas) || $presupuestoEntity->paginas_guardas==0):
|
|
||||||
echo "Sin impresion";
|
|
||||||
elseif($presupuestoEntity->paginas_guardas==4):
|
|
||||||
echo "1 cara";
|
|
||||||
else:
|
|
||||||
echo "2 caras";
|
|
||||||
endif; ?></small></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if($presupuestoEntity->retractiladol || $presupuestoEntity->retractilado5 || $presupuestoEntity->faja_color || $presupuestoEntity->estado_id==1): ?>
|
|
||||||
<h5 class="mb-1 resumen-extras">Extras</h5>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if($presupuestoEntity->retractiladol): ?>
|
|
||||||
<p class="mb-0 resumen-extras" id="resumenRetractilado1"><small>Retractilado individual</small></p>
|
|
||||||
<?php elseif ($presupuestoEntity->retractilado5): ?>
|
|
||||||
<p class="mb-0 resumen-extras" id="resumenRetractilado5"><small>Retractilado de 5</small></p>
|
|
||||||
<?php elseif ($presupuestoEntity->faja_color): ?>
|
|
||||||
<p class="mb-0 resumen-extras" id="resumenFajaColor"><small>Imprimir faja a color</small></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-6">
|
|
||||||
|
|
||||||
<?php if($presupuestoEntity->estado_id==2):
|
|
||||||
$total = $presupuestoEntity->total_aceptado;
|
|
||||||
$iva = $presupuestoEntity->iva_reducido?1.04:1.21;
|
|
||||||
$total *= $iva;
|
|
||||||
$total_unidad = $presupuestoEntity->total_precio_unidad * $iva;;
|
|
||||||
echo '<h4 id="resumenTotalIVA" class="mb-1">Total: ' . round($total, 2) . '€</h4>';
|
|
||||||
echo '<h6 id="resumenPrecioU" class="mb-0">' . round($total_unidad, 4) . '€/ud</h6>'
|
|
||||||
?>
|
|
||||||
<?php else: ?>
|
|
||||||
<h4 id="resumenTotalIVA" class="mb-1">Total: 100€</h4>
|
|
||||||
<h6 id="resumenPrecioU" class="mb-0">10.4€/ud</h6>
|
|
||||||
<?php endif; ?>
|
|
||||||
<div id="shape-container">
|
|
||||||
<div id="thumbnail_ec_shape" style="width:350px;height:300px;margin:2.5% auto;"></div>
|
|
||||||
<div class="d-flex justify-content-center">
|
|
||||||
<button type="button" id="pv_details" class="btn btn-primary align-content-center"
|
|
||||||
data-bs-toggle="modal" data-bs-target="#pv_ec_modal">
|
|
||||||
Previsualizar detalles de cubierta
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php if($presupuestoEntity->estado_id==2):
|
|
||||||
echo '<div class="row mb-3">';
|
|
||||||
echo '<h3>Direcciones de envío</h3>';
|
|
||||||
echo '<div class="col-sm-6">';
|
|
||||||
if(isset($presupuestoEntity->direcciones_envio)):
|
|
||||||
foreach ($presupuestoEntity->direcciones_envio as $direccion):
|
|
||||||
echo '<div class="row mb-3">';
|
|
||||||
echo '<div class="col-sm-5 form-check custom-option custom-option-basic checked">';
|
|
||||||
echo '<label class="form-check-label custom-option-content">';
|
|
||||||
echo '<span class="custom-option-header mb-2">';
|
|
||||||
echo '<h6 class="fw-semibold mb-0">' . $direccion['att'] . '</h6>';
|
|
||||||
echo '<span class="badge bg-label-primary">' . $direccion['cantidad'] . ' unidades</span>';
|
|
||||||
echo '</span>';
|
|
||||||
echo '<span class="custom-option-body">';
|
|
||||||
echo '<small>' . $direccion['direccion'] . '</small><br>';
|
|
||||||
echo '<small>' . $direccion['cp'] . '</small><br>';
|
|
||||||
echo '<small>' . $direccion['municipio'] .', ' . $direccion['pais'] . '</small><br>';
|
|
||||||
echo '<small>' . $direccion['telefono'] . '</small><br>';
|
|
||||||
echo '<small>' . $direccion['email'] . '</small><br>';
|
|
||||||
if($direccion['entregaPieCalle'] == 1){
|
|
||||||
echo '<small><i>Envío en palets</i></small><br>';
|
|
||||||
}
|
|
||||||
echo '<hr class="my-2">';
|
|
||||||
echo '</span>';
|
|
||||||
echo '</label>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
endforeach;
|
|
||||||
endif;
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
endif; ?>
|
|
||||||
|
|
||||||
<?php if($presupuestoEntity->estado_id==2): ?>
|
|
||||||
<div class="row mb-3">
|
|
||||||
<h3>Ficheros</h3>
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="dropzone needsclick" id="dropzone-multi" >
|
|
||||||
<div class="dz-message needsclick">
|
|
||||||
Arrastre aquí los ficheros o haga click
|
|
||||||
</div>
|
|
||||||
<div class="fallback">
|
|
||||||
<input name="file" type="file" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button id="submit-all" class="btn mt-3 btn-primary btn-submit waves-effect waves-light ml-2">
|
|
||||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Actualizar ficheros</span>
|
|
||||||
<i class="ti ti-upload ti-xs"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Modal -->
|
|
||||||
<div class="modal fade" id="pv_ec_modal" tabindex="-1">
|
|
||||||
<div class="modal-dialog modal-xl modal-dialog-centered" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title">Esquema de cubierta</h5>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body" >
|
|
||||||
<div id="pv_ec_shape" style="width:850px;height:600px;margin:2.5% auto;"></div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cerrar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?= $this->section("additionalInlineJs") ?>
|
|
||||||
window.estado = <?= $presupuestoEntity->estado_id ?? 1?>;
|
|
||||||
window.tirada = <?= $presupuestoEntity->selected_tirada ?? 0?>;
|
|
||||||
window.total = <?= $presupuestoEntity->total_aceptado ?? 0?>;
|
|
||||||
window.total_unidad = <?= $presupuestoEntity->total_precio_unidad ?? 0 ?>;
|
|
||||||
window.routes_resumen = {
|
|
||||||
guardarPresupuesto: "<?= route_to('guardarPresupuesto') ?>",
|
|
||||||
duplicarPresupuesto: "<?= route_to('duplicarPresupuesto') ?>",
|
|
||||||
}
|
|
||||||
|
|
||||||
<?php if ($presupuestoEntity->estado_id===2): ?>
|
|
||||||
previewEsquemaCubierta(true);
|
|
||||||
|
|
||||||
const previewTemplate = `<div class="dz-preview dz-file-preview">
|
|
||||||
<div class="dz-details">
|
|
||||||
<div class="dz-thumbnail">
|
|
||||||
<!---<img data-dz-thumbnail>
|
|
||||||
<span class="dz-nopreview">No preview</span> --->
|
|
||||||
<div class="dz-success-mark"></div>
|
|
||||||
<div class="dz-error-mark"></div>
|
|
||||||
<div class="dz-error-message"><span data-dz-errormessage></span></div>
|
|
||||||
<div class="progress">
|
|
||||||
<div class="progress-bar progress-bar-primary" role="progressbar" aria-valuemin="0" aria-valuemax="100" data-dz-uploadprogress></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="dz-filename" data-dz-name></div>
|
|
||||||
<div class="dz-size" data-dz-size></div>
|
|
||||||
</div>
|
|
||||||
</div>`;
|
|
||||||
|
|
||||||
Dropzone.autoDiscover = false;
|
|
||||||
|
|
||||||
var dropzoneMulti = new Dropzone('#dropzone-multi', {
|
|
||||||
url: "<?= site_url('presupuestos/presupuestocliente/upload_files') ?>",
|
|
||||||
addRemoveLinks: true,
|
|
||||||
previewTemplate: previewTemplate,
|
|
||||||
paramName: "file",
|
|
||||||
uploadMultiple: true,
|
|
||||||
parallelUploads: 4, // Ajusta este número al máximo número de archivos que esperas subir a la vez
|
|
||||||
maxFiles: 5, // Ajusta este número al máximo número de archivos que esperas subir a la vez
|
|
||||||
autoProcessQueue: true,
|
|
||||||
dictRemoveFile: "Eliminar",
|
|
||||||
acceptedFiles: 'image/*, application/pdf',
|
|
||||||
maxFilesize: 5e+7, // Bytes
|
|
||||||
init: function() {
|
|
||||||
thisDropzone = this;
|
|
||||||
$('#loader').show();
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "<?= site_url('presupuestos/presupuestocliente/get_files') ?>",
|
|
||||||
type: 'POST',
|
|
||||||
data: { presupuesto_id: <?= $presupuestoEntity->id ?> },
|
|
||||||
|
|
||||||
}).done(function(response) {
|
|
||||||
if(response == null || response == ""){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
values = JSON.parse(response);
|
|
||||||
for(var i = 0; i < values.length; i++){
|
|
||||||
var mockFile = { name: values[i].name, size: values[i].size, hash: values[i].hash};
|
|
||||||
|
|
||||||
thisDropzone.files.push(mockFile); // add to files array
|
|
||||||
thisDropzone.emit("addedfile", mockFile);
|
|
||||||
thisDropzone.emit("thumbnail", mockFile, window.location.host + "/sistema/intranet/presupuestos/"+values[i].hash);
|
|
||||||
thisDropzone.emit("complete", mockFile);
|
|
||||||
thisDropzone.options.success.call(thisDropzone, mockFile);
|
|
||||||
};
|
|
||||||
}).always(function() {
|
|
||||||
$('#loader').hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
this.on("addedfile", function (file) {
|
|
||||||
if(file.hash){
|
|
||||||
var viewButton = Dropzone.createElement("<span class='dz-remove'>Ver</span>");
|
|
||||||
file.previewElement.appendChild(viewButton);
|
|
||||||
// Listen to the view button click event
|
|
||||||
viewButton.addEventListener("click", function (e) {
|
|
||||||
|
|
||||||
window.open(window.location.protocol + "//" + window.location.host + "/sistema/intranet/presupuestos/"+file.hash, '_blank');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#presupuesto-cliente-form').submit(function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
var files = dropzoneMulti.files;
|
|
||||||
$('#loader').show();
|
|
||||||
|
|
||||||
var formData = new FormData();
|
|
||||||
var oldFiles = [];
|
|
||||||
var counter = 0;
|
|
||||||
for (var i = 0; i < files.length; i++) {
|
|
||||||
|
|
||||||
if(files[i].upload){
|
|
||||||
var file = files[i];
|
|
||||||
formData.append('file[' + counter + ']', file);
|
|
||||||
counter += 1;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
oldFiles.push(files[i].name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
formData.append('oldFiles', JSON.stringify(oldFiles));
|
|
||||||
|
|
||||||
formData.append('presupuesto_id', <?= $presupuestoEntity->id ?>);
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "<?= site_url('presupuestos/presupuestocliente/upload_files') ?>",
|
|
||||||
type: 'POST',
|
|
||||||
data: formData,
|
|
||||||
processData: false, // Indicar a jQuery que no procese los datos
|
|
||||||
contentType: false // Indicar a jQuery que no establezca el tipo de contenido
|
|
||||||
}).done(function(response) {
|
|
||||||
// Aquí puedes manejar la respuesta del servidor
|
|
||||||
}).always(function() {
|
|
||||||
$('#loader').hide();
|
|
||||||
})
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
<?php endif; ?>
|
|
||||||
<?= $this->endSection() ?>
|
|
||||||
@ -1,122 +0,0 @@
|
|||||||
<div class="col-12 pb-2">
|
|
||||||
<div class="tipo_libro">
|
|
||||||
|
|
||||||
<input type="hidden" id="lomo_cubierta" value=<?php echo $presupuestoEntity->lomo_cubierta ?>>
|
|
||||||
|
|
||||||
<div class="row row-cols-3 mb-6 d-flex justify-content-center d-flex justify-content-center">
|
|
||||||
|
|
||||||
<div class="container col-md-4 mb-6 d-flex justify-content-center" style="margin-bottom: 40px;">
|
|
||||||
<div>
|
|
||||||
<div style="max-width:200px;max-height:200px;padding-right:0px" id="cosidoDiv"
|
|
||||||
class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio
|
|
||||||
<?php
|
|
||||||
if($datosPresupuesto->tipo_libro == 'cosido' || $datosPresupuesto->tipo_libro == ''){
|
|
||||||
echo ' checked"';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo '"';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
>
|
|
||||||
<label style="max-width:200px;max-height:200px;" class="form-check-label custom-option-content"
|
|
||||||
for="tipoCosido">
|
|
||||||
<span class="custom-option-body">
|
|
||||||
<img style="max-width:200px;max-height:200px;"
|
|
||||||
src="<?= site_url("assets/img/libro_cosido.png") ?>" alt="radioImg">
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<input name="cosido" class="form-check-input elementos-libro calcular-presupuesto" type="radio" value="tipoCosido"
|
|
||||||
id="tipoCosido"
|
|
||||||
<?php
|
|
||||||
if($datosPresupuesto->tipo_libro == 'cosido' || $datosPresupuesto->tipo_libro == ''){
|
|
||||||
echo 'checked=""';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<h4 class="text-center">Rústica cosido</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container col-md-4 mb-6 d-flex justify-content-center" style="margin-bottom: 40px;">
|
|
||||||
<div>
|
|
||||||
<div style="max-width:200px;max-height:200px;padding-right:0px" id="fresadoDiv"
|
|
||||||
class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio
|
|
||||||
<?php echo ($datosPresupuesto->tipo_libro == 'fresado' ? ' checked"': '"'); ?> >
|
|
||||||
<label style="max-width:200px;max-height:200px;" class="form-check-label custom-option-content"
|
|
||||||
for="tipoFresado">
|
|
||||||
<span class="custom-option-body">
|
|
||||||
<img style="max-width:200px;max-height:200px;"
|
|
||||||
src="<?= site_url("assets/img/libro_fresado.png") ?>" alt="radioImg2">
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<input name="fresado" class="form-check-input elementos-libro calcular-presupuesto" type="radio" value="tipoFresado"
|
|
||||||
id="tipoFresado" <?php echo (($datosPresupuesto->tipo_libro)=='fresado'? 'checked=""':''); ?> >
|
|
||||||
</div>
|
|
||||||
<h4 class="text-center">Rústica fresado</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container col-md-4 mb-6 d-flex justify-content-center" style="margin-bottom: 40px;">
|
|
||||||
<div>
|
|
||||||
<div style="max-width:200px;max-height:200px;padding-right:0px" id="grapadoDiv"
|
|
||||||
class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio
|
|
||||||
<?php echo ($datosPresupuesto->tipo_libro == 'grapado' ? ' checked"': '"'); ?> >
|
|
||||||
<label style="max-width:200px;max-height:200px;" class="form-check-label custom-option-content"
|
|
||||||
for="tipoGrapado">
|
|
||||||
<span class="custom-option-body">
|
|
||||||
<img style="max-width:200px;max-height:200px;"
|
|
||||||
src="<?= site_url("assets/img/libro_grapado.png") ?>" alt="radioImg3">
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<input name="grapado" class="form-check-input elementos-libro calcular-presupuesto" type="radio" value="tipoGrapado"
|
|
||||||
id="tipoGrapado" <?php echo (($datosPresupuesto->tipo_libro)=='grapado'? 'checked=""':''); ?> >
|
|
||||||
</div>
|
|
||||||
<h4 class="text-center">Cosido con grapas</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row row-cols-3 d-flex justify-content-center d-flex justify-content-center">
|
|
||||||
<div class="col-md-4 mb-6 d-flex justify-content-center">
|
|
||||||
<div>
|
|
||||||
<div style="max-width:200px;max-height:200px;padding-right:0px" id="espiralDiv"
|
|
||||||
class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio
|
|
||||||
<?php echo ($datosPresupuesto->tipo_libro == 'espiral' ? ' checked"': '"'); ?> >
|
|
||||||
<label style="max-width:200px;max-height:200px;" class="form-check-label custom-option-content"
|
|
||||||
for="tipoEspiral">
|
|
||||||
<span class="custom-option-body">
|
|
||||||
<img style="max-width:200px;max-height:200px;"
|
|
||||||
src="<?= site_url("assets/img/libro_espiral.png") ?>" alt="radioImg4">
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<input name="espiral" class="form-check-input elementos-libro calcular-presupuesto" type="radio" value="tipoEspiral"
|
|
||||||
id="tipoEspiral" <?php echo (($datosPresupuesto->tipo_libro)=='espiral'? 'checked=""':''); ?> >
|
|
||||||
</div>
|
|
||||||
<h4 class="text-center">Espiral</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-4 mb-6 d-flex justify-content-center" >
|
|
||||||
<div>
|
|
||||||
<div style="max-width:200px;max-height:200px;padding-right:0px" id="wireoDiv"
|
|
||||||
class="form-check custom-option-tipo custom-option custom-option-image custom-option-image-radio
|
|
||||||
<?php echo ($datosPresupuesto->tipo_libro == 'wireo' ? ' checked"': '"'); ?> >
|
|
||||||
<label style="max-width:200px;max-height:200px;" class="form-check-label custom-option-content"
|
|
||||||
for="tipoWireO">
|
|
||||||
<span class="custom-option-body">
|
|
||||||
<img style="max-width:200px;max-height:200px;"
|
|
||||||
src="<?= site_url("assets/img/libro_wire-o.png") ?>" alt="radioImg5">
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<input name="wireo" class="form-check-input elementos-libro calcular-presupuesto" type="radio" value="tipoWireO"
|
|
||||||
id="tipoWireO" <?php echo (($datosPresupuesto->tipo_libro)=='wireo'? 'checked=""':''); ?> >
|
|
||||||
</div>
|
|
||||||
<h4 class="text-center">Wire-o</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@ -13,7 +13,15 @@
|
|||||||
<div id="containerTiradasEnvios" class="row mb-3 justify-content-center">
|
<div id="containerTiradasEnvios" class="row mb-3 justify-content-center">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3 justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-12 col-lg-4 px-4 py-2">
|
||||||
|
<input class="form-check-input" type="checkbox" id="recogerEnTaller" name="recoger_en_taller" value="1">
|
||||||
|
<label class="form-check-label"
|
||||||
|
for="recoger_en_taller"><?= lang('Presupuestos.recogerEnTaller') ?></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3 justify-content-center div-direcciones">
|
||||||
|
|
||||||
<div class="col-sm-4 mb-3">
|
<div class="col-sm-4 mb-3">
|
||||||
<label for="direcciones" class="form-label">Mis direcciones</label>
|
<label for="direcciones" class="form-label">Mis direcciones</label>
|
||||||
@ -36,7 +44,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3 justify-content-center">
|
<div class="row mb-3 justify-content-center div-direcciones">
|
||||||
<div class="col-sm-4 mb-3">
|
<div class="col-sm-4 mb-3">
|
||||||
<div class="form-check form-switch mb-2">
|
<div class="form-check form-switch mb-2">
|
||||||
<input class="form-check-input" type="checkbox" id="entregaPieCalle" name="entregaPieCalle"
|
<input class="form-check-input" type="checkbox" id="entregaPieCalle" name="entregaPieCalle"
|
||||||
@ -47,16 +55,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3 justify-content-center">
|
<div class="row mb-3 justify-content-center div-direcciones">
|
||||||
<div class="col-sm-2 mb-3 mt-auto mb-0">
|
<div class="col-sm-2 mb-3 mt-auto mb-0">
|
||||||
<button id="nuevaDireccion" type="button"
|
<button id="nuevaDireccion" type="button" class="btn btn-secondary waves-effect waves-light">Nueva
|
||||||
class="btn btn-secondary waves-effect waves-light">Nueva Dirección</button>
|
Dirección</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="divErrorEnvios" name="div_error_envios" class="col-sm-10 mb-3 justify-content-center"></div>
|
<div id="divErrorEnvios" name="div_error_envios" class="col-sm-10 mb-3 justify-content-center"></div>
|
||||||
|
|
||||||
<div id="divDirecciones" class="calcular-presupuesto col-sm-12 d-flex flex-column align-items-center">
|
<div id="divDirecciones" class="calcular-presupuesto col-sm-12 d-flex flex-column align-items-center div-direcciones">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -14,6 +14,8 @@ class Direcciones {
|
|||||||
this.validatorStepper = validatorStepper;
|
this.validatorStepper = validatorStepper;
|
||||||
this.allowNext = true;
|
this.allowNext = true;
|
||||||
|
|
||||||
|
this.recogidaTaller = this.domItem.find('#recogerEnTaller');
|
||||||
|
|
||||||
this.unidadesAdd = this.domItem.find('#unidadesEnvio');
|
this.unidadesAdd = this.domItem.find('#unidadesEnvio');
|
||||||
this.btnAdd = this.domItem.find('#insertarDireccion');
|
this.btnAdd = this.domItem.find('#insertarDireccion');
|
||||||
this.btnNew = this.domItem.find('#nuevaDireccion');
|
this.btnNew = this.domItem.find('#nuevaDireccion');
|
||||||
@ -39,6 +41,20 @@ class Direcciones {
|
|||||||
|
|
||||||
$("#clienteId").on('change', this.handleChangeCliente.bind(this));
|
$("#clienteId").on('change', this.handleChangeCliente.bind(this));
|
||||||
|
|
||||||
|
this.recogidaTaller.on('change', () => {
|
||||||
|
|
||||||
|
if (this.recogidaTaller.is(':checked')) {
|
||||||
|
|
||||||
|
this.divDirecciones.empty();
|
||||||
|
this.direcciones = [];
|
||||||
|
$('.div-direcciones').addClass('d-none');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('.div-direcciones').removeClass('d-none');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.direccionesCliente.init();
|
this.direccionesCliente.init();
|
||||||
this.btnAdd.on('click', this.#insertDireccion.bind(this));
|
this.btnAdd.on('click', this.#insertDireccion.bind(this));
|
||||||
this.btnNew.on('click', this.#nuevaDireccion.bind(this));
|
this.btnNew.on('click', this.#nuevaDireccion.bind(this));
|
||||||
@ -70,44 +86,52 @@ class Direcciones {
|
|||||||
});
|
});
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
setTimeout(function () {
|
if (datos.entrega_taller == 1) {
|
||||||
$(`#containerTiradasEnvios .tirada-envio input[tirada="${datosGenerales.tirada}"]`).trigger('click');
|
this.recogidaTaller.prop('checked', true);
|
||||||
}, 0);
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
this.recogidaTaller.prop('checked', false);
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
$(`#containerTiradasEnvios .tirada-envio input[tirada="${datosGenerales.tirada}"]`).trigger('click');
|
||||||
|
}, 0);
|
||||||
|
|
||||||
|
|
||||||
for (let i = 0; i < datos.length; i++) {
|
for (let i = 0; i < datos.length; i++) {
|
||||||
|
|
||||||
let id = datos[i].id;
|
let id = datos[i].id;
|
||||||
let unidades = datos[i].unidades;
|
let unidades = datos[i].unidades;
|
||||||
let entregaPalets = datos[i].palets;
|
let entregaPalets = datos[i].palets;
|
||||||
let divId = "dirEnvio-1";
|
let divId = "dirEnvio-1";
|
||||||
let direccionesActuales = this.divDirecciones.find('.direccion-cliente');
|
let direccionesActuales = this.divDirecciones.find('.direccion-cliente');
|
||||||
if (direccionesActuales.length > 0) {
|
if (direccionesActuales.length > 0) {
|
||||||
// the the lass item
|
// the the lass item
|
||||||
let last = direccionesActuales[direccionesActuales.length - 1];
|
let last = direccionesActuales[direccionesActuales.length - 1];
|
||||||
divId = "dirEnvio-" + (parseInt(last.id.split('-')[1]) + 1);
|
divId = "dirEnvio-" + (parseInt(last.id.split('-')[1]) + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id == null || id <= 0 || id == undefined)
|
||||||
|
return;
|
||||||
|
if (unidades == null || unidades <= 0 || unidades == undefined)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let peticion = new Ajax('/misdirecciones/getDireccionPresupuesto/' + id, {}, {},
|
||||||
|
(response) => {
|
||||||
|
let tarjeta = new tarjetaDireccion(this.divDirecciones, divId, response.data[0]);
|
||||||
|
tarjeta.setUnidades(unidades);
|
||||||
|
tarjeta.setEntregaPalets(entregaPalets);
|
||||||
|
tarjeta.card.find('.direccion-editar').on('click', this.#editUnits.bind(self));
|
||||||
|
tarjeta.card.find('.direccion-eliminar').on('click', this.#deleteDireccion.bind(self));
|
||||||
|
this.divDirecciones.append(tarjeta.card);
|
||||||
|
this.direcciones.push(tarjeta);
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
console.error('Error getting address');
|
||||||
|
});
|
||||||
|
|
||||||
|
peticion.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id == null || id <= 0 || id == undefined)
|
|
||||||
return;
|
|
||||||
if (unidades == null || unidades <= 0 || unidades == undefined)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let peticion = new Ajax('/misdirecciones/getDireccionPresupuesto/' + id, {}, {},
|
|
||||||
(response) => {
|
|
||||||
let tarjeta = new tarjetaDireccion(this.divDirecciones, divId, response.data[0]);
|
|
||||||
tarjeta.setUnidades(unidades);
|
|
||||||
tarjeta.setEntregaPalets(entregaPalets);
|
|
||||||
tarjeta.card.find('.direccion-editar').on('click', this.#editUnits.bind(self));
|
|
||||||
tarjeta.card.find('.direccion-eliminar').on('click', this.#deleteDireccion.bind(self));
|
|
||||||
this.divDirecciones.append(tarjeta.card);
|
|
||||||
this.direcciones.push(tarjeta);
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
console.error('Error getting address');
|
|
||||||
});
|
|
||||||
|
|
||||||
peticion.get();
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|||||||
@ -45,7 +45,7 @@ class PresupuestoCliente {
|
|||||||
this.datos = {};
|
this.datos = {};
|
||||||
this.ajax_calcular = new Ajax('/presupuestocliente/calcular',
|
this.ajax_calcular = new Ajax('/presupuestocliente/calcular',
|
||||||
this.datos,
|
this.datos,
|
||||||
{},
|
{},
|
||||||
this.#procesarPresupuesto.bind(this),
|
this.#procesarPresupuesto.bind(this),
|
||||||
() => { $('#loader').modal('hide'); });
|
() => { $('#loader').modal('hide'); });
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ class PresupuestoCliente {
|
|||||||
return !(noPOD && siPOD);
|
return !(noPOD && siPOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
calcularSolapas(){
|
calcularSolapas() {
|
||||||
|
|
||||||
/* Solapas Max */
|
/* Solapas Max */
|
||||||
this.#getDatos(false, true);
|
this.#getDatos(false, true);
|
||||||
@ -175,7 +175,7 @@ class PresupuestoCliente {
|
|||||||
this.disenioCubierta.textoSolapasCubierta.text("Entre 60 y " + response + " mm");
|
this.disenioCubierta.textoSolapasCubierta.text("Entre 60 y " + response + " mm");
|
||||||
this.disenioCubierta.textoSolapasSobrecubierta.text("Entre 60 y " + response + " mm");
|
this.disenioCubierta.textoSolapasSobrecubierta.text("Entre 60 y " + response + " mm");
|
||||||
},
|
},
|
||||||
() => { }
|
() => { }
|
||||||
).post();
|
).post();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ class PresupuestoCliente {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (this.calcularPresupuesto) {
|
if (this.calcularPresupuesto) {
|
||||||
|
|
||||||
if (event.target.id === 'divDirecciones') {
|
if (event.target.id === 'divDirecciones') {
|
||||||
@ -686,13 +686,16 @@ class PresupuestoCliente {
|
|||||||
this.datos.cubierta.solapas = 0;
|
this.datos.cubierta.solapas = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.direcciones.direcciones.length > 0) {
|
this.datos.entrega_taller = this.direcciones.recogidaTaller.is(':checked') ? 1 : 0;
|
||||||
this.datos.direcciones = [];
|
|
||||||
for (let i = 0; i < this.direcciones.direcciones.length; i++) {
|
|
||||||
this.datos.direcciones.push(this.direcciones.direcciones[i].getFormData());
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!this.direcciones.recogidaTaller.is(':checked')) {
|
||||||
|
if (this.direcciones.direcciones.length > 0) {
|
||||||
|
this.datos.direcciones = [];
|
||||||
|
for (let i = 0; i < this.direcciones.direcciones.length; i++) {
|
||||||
|
this.datos.direcciones.push(this.direcciones.direcciones[i].getFormData());
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
if (save) {
|
if (save) {
|
||||||
this.datos.datosCabecera = {
|
this.datos.datosCabecera = {
|
||||||
titulo: this.datosGenerales.titulo.val(),
|
titulo: this.datosGenerales.titulo.val(),
|
||||||
|
|||||||
Reference in New Issue
Block a user