mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'bug/presupuestos_jm_2' into 'main'
Bug/presupuestos jm 2 See merge request jjimenez/safekat!96
This commit is contained in:
@ -189,6 +189,28 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
|||||||
// JJO
|
// JJO
|
||||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||||
|
|
||||||
|
if ($this->request->getPost('retractilado') == null) {
|
||||||
|
$sanitizedData['retractilado'] = false;
|
||||||
|
}
|
||||||
|
if ($this->request->getPost('retractilado5') == null) {
|
||||||
|
$sanitizedData['retractilado5'] = false;
|
||||||
|
}
|
||||||
|
if ($this->request->getPost('ferro') == null) {
|
||||||
|
$sanitizedData['ferro'] = false;
|
||||||
|
}
|
||||||
|
if ($this->request->getPost('ferro_digital') == null) {
|
||||||
|
$sanitizedData['ferro_digital'] = false;
|
||||||
|
}
|
||||||
|
if ($this->request->getPost('prototipo') == null) {
|
||||||
|
$sanitizedData['prototipo'] = false;
|
||||||
|
}
|
||||||
|
if ($this->request->getPost('marcapaginas') == null) {
|
||||||
|
$sanitizedData['marcapaginas'] = false;
|
||||||
|
}
|
||||||
|
if ($this->request->getPost('faja_color') == null) {
|
||||||
|
$sanitizedData['faja_color'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
$noException = true;
|
$noException = true;
|
||||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||||
|
|
||||||
@ -295,6 +317,14 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
|||||||
|
|
||||||
$this->viewData['POD'] = $this->getPOD();
|
$this->viewData['POD'] = $this->getPOD();
|
||||||
|
|
||||||
|
$this->viewData['serviciosCheckboxes'] = [
|
||||||
|
'retractilado' => 3,
|
||||||
|
'retractilado5' => 5,
|
||||||
|
'ferro' => 24,
|
||||||
|
'prototipo' => 9,
|
||||||
|
'fajaColor' => 16,
|
||||||
|
];
|
||||||
|
|
||||||
$this->viewData['tipo_impresion_id'] = 4; // Cosido tapa blanda JJO
|
$this->viewData['tipo_impresion_id'] = 4; // Cosido tapa blanda JJO
|
||||||
|
|
||||||
$this->viewData['formAction'] = route_to('updateCosidotapablanda', $id);
|
$this->viewData['formAction'] = route_to('updateCosidotapablanda', $id);
|
||||||
|
|||||||
@ -17,9 +17,9 @@ class Test extends BaseController
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$model = model('App\Models\Tarifas\TarifaEnvioPrecioModel');
|
|
||||||
echo '<pre>';
|
echo '<pre>';
|
||||||
var_dump($model->getEnvioPrecio(2, 1.5, "cajas"));
|
var_dump($this->get_tarifa_enc(18, 150, 100, 98,148));
|
||||||
echo '</pre>';
|
echo '</pre>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,6 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
|||||||
"sobrecubiertas_ancho" => 0.0,
|
"sobrecubiertas_ancho" => 0.0,
|
||||||
"merma" => null,
|
"merma" => null,
|
||||||
"merma_portada" => 6.0,
|
"merma_portada" => 6.0,
|
||||||
"imagenes_bn_interior" => false,
|
|
||||||
"comentarios_cliente" => null,
|
"comentarios_cliente" => null,
|
||||||
"comentarios_safekat" => null,
|
"comentarios_safekat" => null,
|
||||||
"comentarios_pdf" => null,
|
"comentarios_pdf" => null,
|
||||||
@ -215,7 +214,6 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity
|
|||||||
"sobrecubiertas_ancho" => "float",
|
"sobrecubiertas_ancho" => "float",
|
||||||
"merma" => "float",
|
"merma" => "float",
|
||||||
"merma_portada" => "float",
|
"merma_portada" => "float",
|
||||||
"imagenes_bn_interior" => "boolean",
|
|
||||||
"en_produccion" => "boolean",
|
"en_produccion" => "boolean",
|
||||||
"en_espera" => "boolean",
|
"en_espera" => "boolean",
|
||||||
"modo_comparador" => "boolean",
|
"modo_comparador" => "boolean",
|
||||||
|
|||||||
@ -159,6 +159,7 @@ return [
|
|||||||
|
|
||||||
'errores' => [
|
'errores' => [
|
||||||
'paginas' => 'The field pages must be greater than zero',
|
'paginas' => 'The field pages must be greater than zero',
|
||||||
|
'paginasLP' => 'The number of pages does not match the total',
|
||||||
'tiradas' => 'The field print must be greater than zero',
|
'tiradas' => 'The field print must be greater than zero',
|
||||||
'dimension' => 'The book dimension must be greater than 60mm',
|
'dimension' => 'The book dimension must be greater than 60mm',
|
||||||
'lineaDuplicada' => 'That type of line already exists in the budget.',
|
'lineaDuplicada' => 'That type of line already exists in the budget.',
|
||||||
|
|||||||
@ -18,7 +18,7 @@ return [
|
|||||||
'precio' => 'Price',
|
'precio' => 'Price',
|
||||||
'saveDirection' => 'Save to client addresses (shipped on pallets)',
|
'saveDirection' => 'Save to client addresses (shipped on pallets)',
|
||||||
'validation' => [
|
'validation' => [
|
||||||
'ejemplares_envio' => 'The number of copies sent does not match the print run'
|
'ejemplares_envio' => 'The number of copies sent does not match the print run',
|
||||||
'max_length' => 'Max. length ',
|
'max_length' => 'Max. length ',
|
||||||
'required' => 'Field required',
|
'required' => 'Field required',
|
||||||
'valid_email' => 'The email is not valid',
|
'valid_email' => 'The email is not valid',
|
||||||
|
|||||||
@ -218,6 +218,7 @@ return [
|
|||||||
|
|
||||||
'errores' => [
|
'errores' => [
|
||||||
'paginas' => 'El campo páginas tiene que ser mayor que cero',
|
'paginas' => 'El campo páginas tiene que ser mayor que cero',
|
||||||
|
'paginasLP' => 'El número de páginas no coincide con el total',
|
||||||
'tiradas' => 'El campo tiradas tiene que ser mayor que cero',
|
'tiradas' => 'El campo tiradas tiene que ser mayor que cero',
|
||||||
'dimension' => 'La dimensión del libro tiene que ser mayor que 60mm',
|
'dimension' => 'La dimensión del libro tiene que ser mayor que 60mm',
|
||||||
'lineaDuplicada' => 'Ya existe ese tipo de linea en el presupuesto',
|
'lineaDuplicada' => 'Ya existe ese tipo de linea en el presupuesto',
|
||||||
|
|||||||
@ -158,10 +158,12 @@ class PresupuestoEncuadernacionesModel extends \App\Models\GoBaseModel
|
|||||||
public function getPrecioTarifa($tarifa_encuadernacion_id, $paginas, $tirada, $ancho, $alto, $proveedor_id, $POD){
|
public function getPrecioTarifa($tarifa_encuadernacion_id, $paginas, $tirada, $ancho, $alto, $proveedor_id, $POD){
|
||||||
|
|
||||||
$modelTarifa = model('App\Models\Tarifas\TarifaEncuadernacionModel');
|
$modelTarifa = model('App\Models\Tarifas\TarifaEncuadernacionModel');
|
||||||
if($proveedor_id != -1)
|
if($proveedor_id != -1){
|
||||||
$tarifa_value = $modelTarifa->getTarifaPresupuestoEncuadernacion($tarifa_encuadernacion_id, $paginas, $tirada, $ancho, $alto, $proveedor_id);
|
$tarifa_value = $modelTarifa->getTarifaPresupuestoEncuadernacion($tarifa_encuadernacion_id, $paginas, $tirada, $ancho, $alto, $proveedor_id);
|
||||||
else
|
}
|
||||||
|
else{
|
||||||
$tarifa_value = $modelTarifa->getTarifaPresupuestoEncuadernacion($tarifa_encuadernacion_id, $paginas, $tirada, $ancho, $alto);
|
$tarifa_value = $modelTarifa->getTarifaPresupuestoEncuadernacion($tarifa_encuadernacion_id, $paginas, $tirada, $ancho, $alto);
|
||||||
|
}
|
||||||
if (count($tarifa_value)>0) {
|
if (count($tarifa_value)>0) {
|
||||||
|
|
||||||
$result_data = $this->calcularTarifa($tarifa_value[0], $paginas, $POD<$tirada?false:true);
|
$result_data = $this->calcularTarifa($tarifa_value[0], $paginas, $POD<$tirada?false:true);
|
||||||
|
|||||||
@ -69,7 +69,6 @@ class PresupuestoModel extends \App\Models\GoBaseModel
|
|||||||
"sobrecubiertas_ancho",
|
"sobrecubiertas_ancho",
|
||||||
"merma",
|
"merma",
|
||||||
"merma_portada",
|
"merma_portada",
|
||||||
"imagenes_bn_interior",
|
|
||||||
"comentarios_cliente",
|
"comentarios_cliente",
|
||||||
"comentarios_safekat",
|
"comentarios_safekat",
|
||||||
"comentarios_pdf",
|
"comentarios_pdf",
|
||||||
|
|||||||
@ -158,11 +158,11 @@ class TarifaEncuadernacionModel extends \App\Models\GoBaseModel
|
|||||||
$builder->where('t2.tirada_min <=', $tirada);
|
$builder->where('t2.tirada_min <=', $tirada);
|
||||||
$builder->where('t2.tirada_max >=', $tirada);
|
$builder->where('t2.tirada_max >=', $tirada);
|
||||||
$builder->where('t3.paginas_libro_min <=', $paginas);
|
$builder->where('t3.paginas_libro_min <=', $paginas);
|
||||||
$builder->where('t3.paginas_libro_max >', $paginas);
|
$builder->where('t3.paginas_libro_max >=', $paginas);
|
||||||
$builder->where('t4.ancho_min <=', $ancho);
|
$builder->where('t4.ancho_min <=', $ancho);
|
||||||
$builder->where('t4.ancho_max >', $ancho);
|
$builder->where('t4.ancho_max >=', $ancho);
|
||||||
$builder->where('t4.alto_min <=', $alto);
|
$builder->where('t4.alto_min <=', $alto);
|
||||||
$builder->where('t4.alto_max >', $alto);
|
$builder->where('t4.alto_max >=', $alto);
|
||||||
|
|
||||||
if($proveedor_id != -1){
|
if($proveedor_id != -1){
|
||||||
$builder->where('t2.proveedor_id', $proveedor_id);
|
$builder->where('t2.proveedor_id', $proveedor_id);
|
||||||
|
|||||||
@ -95,7 +95,7 @@
|
|||||||
<label for="merma" class="form-label">
|
<label for="merma" class="form-label">
|
||||||
<?= lang('Presupuestos.merma') ?>*
|
<?= lang('Presupuestos.merma') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="merma" name="merma" maxLength="8" tabindex="4" step="1" placeholder="10" class="form-control" value="<?= old('merma', $presupuestoEntity->merma) ?>">
|
<input readonly style="background: #E8E8E8;" id="merma" name="merma" maxLength="8" tabindex="4" step="1" placeholder="10" class="form-control" value="<?= old('merma', $presupuestoEntity->merma) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<label for="mermacubierta" class="form-label">
|
<label for="mermacubierta" class="form-label">
|
||||||
<?= lang('Presupuestos.mermacubierta') ?>*
|
<?= lang('Presupuestos.mermacubierta') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="mermacubierta" name="merma_cubierta" tabindex="5" placeholder="10" maxLength="8" step="1" class="form-control" value="<?= old('merma_cubierta', $presupuestoEntity->merma_cubierta) ?>">
|
<input readonly style="background: #E8E8E8;" id="mermacubierta" name="merma_cubierta" tabindex="5" placeholder="10" maxLength="8" step="1" class="form-control" value="<?= old('merma_cubierta', $presupuestoEntity->merma_cubierta) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
|
||||||
@ -233,33 +233,8 @@
|
|||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-3 px-4">
|
|
||||||
<div class="mb-3">
|
|
||||||
<div class="form-check">
|
|
||||||
<label for="recogerEnTaller" class="form-check-label">
|
|
||||||
<input type="checkbox" id="recogerEnTaller" name="recoger_en_taller" value="1" class="form-check-input" <?= $presupuestoEntity->recoger_en_taller == true ? 'checked' : ''; ?>>
|
|
||||||
<?= lang('Presupuestos.recogerEnTaller') ?>
|
|
||||||
</label>
|
|
||||||
</div><!--//.form-check -->
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-4 px-4">
|
|
||||||
<div class="mb-3">
|
|
||||||
<div class="form-check">
|
|
||||||
<label for="imagenesBnInterior" class="form-check-label">
|
|
||||||
<input type="checkbox" id="imagenesBnInterior" name="imagenes_bn_interior" value="1" class="form-check-input" <?= $presupuestoEntity->imagenes_bn_interior == true ? 'checked' : ''; ?>>
|
|
||||||
<?= lang('Presupuestos.imagenesBnInterior') ?>
|
|
||||||
</label>
|
|
||||||
</div><!--//.form-check -->
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
</div> <!--//.row -->
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div> <!-- //.accordion-body -->
|
</div> <!-- //.accordion-body -->
|
||||||
@ -273,17 +248,20 @@
|
|||||||
<?= $this->section("additionalInlineJs") ?>
|
<?= $this->section("additionalInlineJs") ?>
|
||||||
|
|
||||||
$('#paginas').on("change", function () {
|
$('#paginas').on("change", function () {
|
||||||
|
checkPaginasPresupuesto()
|
||||||
|
updateLineasPresupuesto()
|
||||||
|
|
||||||
// Si es negro o color
|
// Si es negro o color
|
||||||
if ($('#tipoImpresion').select2('data')[0].id == 'negro' ||
|
if ($('#tipoImpresion').select2('data')[0].id == 'negro' ||
|
||||||
$('#tipoImpresion').select2('data')[0].id == 'color') {
|
$('#tipoImpresion').select2('data')[0].id == 'color') {
|
||||||
document.getElementById('compPaginasNegro').value = document.getElementById('paginas').value;
|
$('#compPaginasNegro').val(parseInt($('#paginas').val())-parseInt($('#compPaginasColor').val()));
|
||||||
document.getElementById('compPaginasColor').value = 0;
|
$('#compPaginasNegro').trigger('change')
|
||||||
}
|
}
|
||||||
// Si es negrohq o colorhq
|
// Si es negrohq o colorhq
|
||||||
if ($('#tipoImpresion').select2('data')[0].id == 'negrohq' ||
|
if ($('#tipoImpresion').select2('data')[0].id == 'negrohq' ||
|
||||||
$('#tipoImpresion').select2('data')[0].id == 'colorhq') {
|
$('#tipoImpresion').select2('data')[0].id == 'colorhq') {
|
||||||
document.getElementById('compPaginasNegrohq').value = document.getElementById('paginas').value;
|
$('#compPaginasNegrohq').val(parseInt($('#paginas').val())-parseInt($('#compPaginasColorhq').val()));
|
||||||
document.getElementById('compPaginasColorhq').value = 0;
|
$('#compPaginasNegrohq').trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
update_servicios(false)
|
update_servicios(false)
|
||||||
@ -292,9 +270,40 @@ $('#paginas').on("change", function () {
|
|||||||
$('#tirada').on("change", function () {
|
$('#tirada').on("change", function () {
|
||||||
|
|
||||||
update_servicios(false)
|
update_servicios(false)
|
||||||
|
calcular_mermas()
|
||||||
|
updateLineasPresupuesto()
|
||||||
checkInsertar()
|
checkInsertar()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function calcular_mermas(){
|
||||||
|
|
||||||
|
const tirada = parseInt($('#tirada').val())
|
||||||
|
var merma = 0
|
||||||
|
|
||||||
|
if(tirada>POD){
|
||||||
|
merma = tirada*0.1<=30 ? tirada*0.1 : 30
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
merma_lineas = []
|
||||||
|
$('#tableLineasPresupuesto tbody tr:visible ').each(function(){
|
||||||
|
if(!this.id.includes('_data') && !this.id.endsWith('_cubierta') && !this.id.endsWith('_sobrecubierta')){
|
||||||
|
const formas_linea = parseInt($('#' + this.id + '_formas').val())
|
||||||
|
if(formas_linea > tirada)
|
||||||
|
merma_lineas.push(formas_linea-tirada)
|
||||||
|
else
|
||||||
|
merma_lineas.push(tirada%formas_linea)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(merma_lineas.length>0)
|
||||||
|
merma = Math.max(...merma_lineas)
|
||||||
|
else
|
||||||
|
merma = 0
|
||||||
|
}
|
||||||
|
$('#mermacubierta').val(parseInt(merma))
|
||||||
|
$('#merma').val(parseInt(merma))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$('#papelFormatoId').select2({
|
$('#papelFormatoId').select2({
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
});
|
});
|
||||||
@ -324,11 +333,37 @@ $('#papelFormatoPersonalizado').on("click",function(){
|
|||||||
<?php if(str_contains($formAction,'edit')): ?>
|
<?php if(str_contains($formAction,'edit')): ?>
|
||||||
var ancho_libro = getDimensionLibro().ancho;
|
var ancho_libro = getDimensionLibro().ancho;
|
||||||
var alto_libro = getDimensionLibro().alto;
|
var alto_libro = getDimensionLibro().alto;
|
||||||
|
|
||||||
|
$('#retractilado').on("change", function () {
|
||||||
|
checkRetractiladoComparador(this);
|
||||||
|
servicioRetractilado()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#retractilado5').on("change", function () {
|
||||||
|
checkRetractiladoComparador(this);
|
||||||
|
servicioRetractilado5()
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#fajaColor').on("change", function () {
|
||||||
|
servicioFajaColor()
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#ferro').on("change", function () {
|
||||||
|
servicioFerro()
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#prototipo').on("change", function () {
|
||||||
|
servicioPrototipo()
|
||||||
|
servicioFerro()
|
||||||
|
});
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
$('#papelFormatoId').on('select2:select', function (e){
|
$('#papelFormatoId').on('select2:select', function (e){
|
||||||
ancho_libro = getDimensionLibro().ancho;
|
ancho_libro = getDimensionLibro().ancho;
|
||||||
alto_libro = getDimensionLibro().alto;
|
alto_libro = getDimensionLibro().alto;
|
||||||
|
update_servicios(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#papelFormatoAncho').on('change', function (e){
|
$('#papelFormatoAncho').on('change', function (e){
|
||||||
|
|||||||
@ -829,7 +829,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function getLineasIntPlana(is_color, is_hq){
|
async function getLineasIntPlana(is_color, is_hq, actualizarLinea){
|
||||||
|
|
||||||
const dimension = getDimensionLibro();
|
const dimension = getDimensionLibro();
|
||||||
|
|
||||||
@ -862,6 +862,28 @@
|
|||||||
selectIntLineas();
|
selectIntLineas();
|
||||||
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>' + ' (' + tableCompIntPlana.rows().count() + ')');
|
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>' + ' (' + tableCompIntPlana.rows().count() + ')');
|
||||||
$('#insertarPlanaBtn').removeClass('d-none')
|
$('#insertarPlanaBtn').removeClass('d-none')
|
||||||
|
if(actualizarLinea){
|
||||||
|
var rows = $("#tableCompIntPlana").DataTable().rows( '.selected' ).data().toArray();
|
||||||
|
for(row of rows){
|
||||||
|
|
||||||
|
if(row['tipo'] =='bn' && !is_color && !is_hq){
|
||||||
|
if($('#lp_bn').css('display')!='none')
|
||||||
|
fill_lp_bn(row, true);
|
||||||
|
}
|
||||||
|
else if(row['tipo'] =='bnhq' && !is_color && is_hq){
|
||||||
|
if($('#lp_bnhq').css('display')!='none')
|
||||||
|
fill_lp_bnhq(row, true);
|
||||||
|
}
|
||||||
|
else if(row['tipo'] =='color' && is_color && !is_hq){
|
||||||
|
if($('#lp_color').css('display')!='none')
|
||||||
|
fill_lp_color(row, true);
|
||||||
|
}
|
||||||
|
else if(row['tipo'] =='colorhq' && is_color && is_hq){
|
||||||
|
if($('#lp_colorhq').css('display')!='none')
|
||||||
|
fill_lp_colorhq(row, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>');
|
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>');
|
||||||
@ -878,7 +900,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getLineasIntRot(is_hq){
|
async function getLineasIntRot(is_hq, actualizarLinea=false){
|
||||||
|
|
||||||
const dimension = getDimensionLibro();
|
const dimension = getDimensionLibro();
|
||||||
|
|
||||||
@ -917,6 +939,19 @@
|
|||||||
selectIntRotLineas();
|
selectIntRotLineas();
|
||||||
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>' + ' (' + tableCompIntRotativa.rows().count() + ')');
|
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>' + ' (' + tableCompIntRotativa.rows().count() + ')');
|
||||||
$('#insertarRotativaBtn').removeClass('d-none')
|
$('#insertarRotativaBtn').removeClass('d-none')
|
||||||
|
if(actualizarLinea){
|
||||||
|
var rows = $("#tableCompIntRotativa").DataTable().rows( '.selected' ).data().toArray();
|
||||||
|
for(row of rows){
|
||||||
|
if(row['paginasColor'] ==0){
|
||||||
|
if($('#lp_rot_bn').css('display')!='none')
|
||||||
|
fill_lp_rot_bn(row, true);
|
||||||
|
}
|
||||||
|
else if(row['paginasColor'] >0){
|
||||||
|
if($('#lp_rot_color').css('display')!='none')
|
||||||
|
fill_lp_rot_color(row, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>');
|
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>');
|
||||||
@ -938,6 +973,12 @@
|
|||||||
|
|
||||||
$('.comp_cubierta_items').on('change', function (){
|
$('.comp_cubierta_items').on('change', function (){
|
||||||
|
|
||||||
|
checkComparadorCubierta()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function checkComparadorCubierta(actualizarLinea = false){
|
||||||
|
|
||||||
if ($('#compCarasCubierta').select2('data').length > 0 &&
|
if ($('#compCarasCubierta').select2('data').length > 0 &&
|
||||||
$('#compPapelCubierta').select2('data').length > 0 &&
|
$('#compPapelCubierta').select2('data').length > 0 &&
|
||||||
$('#compGramajeCubierta').select2('data').length > 0 ){
|
$('#compGramajeCubierta').select2('data').length > 0 ){
|
||||||
@ -974,7 +1015,12 @@
|
|||||||
selectCubiertaLineas();
|
selectCubiertaLineas();
|
||||||
$('#title_cubierta').html('<?= lang("Presupuestos.cubierta") ?>' + ' (' + tableCompCubierta.rows().count() + ')');
|
$('#title_cubierta').html('<?= lang("Presupuestos.cubierta") ?>' + ' (' + tableCompCubierta.rows().count() + ')');
|
||||||
$('#insertarCubiertaBtn').removeClass('d-none')
|
$('#insertarCubiertaBtn').removeClass('d-none')
|
||||||
|
if(actualizarLinea){
|
||||||
|
var rows = $("#tableCompCubierta").DataTable().rows( '.selected' ).data().toArray();
|
||||||
|
for(row of rows){
|
||||||
|
fill_lp_cubierta(row, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$('#title_cubierta').html('<?= lang("Presupuestos.cubierta") ?>');
|
$('#title_cubierta').html('<?= lang("Presupuestos.cubierta") ?>');
|
||||||
@ -994,8 +1040,7 @@
|
|||||||
else{
|
else{
|
||||||
clearCubierta();
|
clearCubierta();
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
|
||||||
$('.comp_negro_items').on('change', function (e) {
|
$('.comp_negro_items').on('change', function (e) {
|
||||||
|
|
||||||
@ -1055,7 +1100,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function checkComparadorInt(is_color, is_hq) {
|
function checkComparadorInt(is_color, is_hq, actualizarLinea=false) {
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
||||||
@ -1072,11 +1117,11 @@
|
|||||||
checkDatosPedidoForComp()) {
|
checkDatosPedidoForComp()) {
|
||||||
|
|
||||||
|
|
||||||
getLineasIntPlana(is_color, is_hq).then((result) =>{
|
getLineasIntPlana(is_color, is_hq, actualizarLinea).then((result) =>{
|
||||||
// Para rotativa, si es color el papel y el gramaje tiene que ser igual
|
// Para rotativa, si es color el papel y el gramaje tiene que ser igual
|
||||||
if(!is_color)
|
if(!is_color)
|
||||||
{
|
{
|
||||||
getLineasIntRot(is_hq);
|
getLineasIntRot(is_hq, actualizarLinea);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1087,7 +1132,7 @@
|
|||||||
if(($('#compPapelNegro').select2('data')[0].id == $('#compPapelColor').select2('data')[0].id &&
|
if(($('#compPapelNegro').select2('data')[0].id == $('#compPapelColor').select2('data')[0].id &&
|
||||||
$('#compGramajeNegro').select2('data')[0].text.trim() == $('#compGramajeColor').select2('data')[0].text.trim()))
|
$('#compGramajeNegro').select2('data')[0].text.trim() == $('#compGramajeColor').select2('data')[0].text.trim()))
|
||||||
{
|
{
|
||||||
getLineasIntRot(is_hq);
|
getLineasIntRot(is_hq, actualizarLinea);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1286,6 +1331,7 @@
|
|||||||
else{
|
else{
|
||||||
$('#insertarCubiertaBtn').addClass('d-none')
|
$('#insertarCubiertaBtn').addClass('d-none')
|
||||||
$('#total_comp_cubierta').html('0.00')
|
$('#total_comp_cubierta').html('0.00')
|
||||||
|
$('#compGramajeCubierta').empty().trigger("change");
|
||||||
$('#compGramajeCubierta').val('').trigger('change');
|
$('#compGramajeCubierta').val('').trigger('change');
|
||||||
$('#compGramajeCubierta').prop('disabled', false);
|
$('#compGramajeCubierta').prop('disabled', false);
|
||||||
$('#compPapelCubierta').find('option[value="0"]').remove();
|
$('#compPapelCubierta').find('option[value="0"]').remove();
|
||||||
|
|||||||
@ -404,6 +404,7 @@
|
|||||||
$('#precio_total_acabado_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
|
$('#precio_total_acabado_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
|
||||||
$('#acabado_margen_' + line[0].tarifa_id).text(parseFloat(line[0].margen).toFixed(2))
|
$('#acabado_margen_' + line[0].tarifa_id).text(parseFloat(line[0].margen).toFixed(2))
|
||||||
});
|
});
|
||||||
|
check_serv_acabado_error()
|
||||||
yeniden(data.<?= csrf_token() ?>);
|
yeniden(data.<?= csrf_token() ?>);
|
||||||
}).then(
|
}).then(
|
||||||
fetch(domain + "/presupuestos/presupuestoencuadernaciones/update/" + id , {
|
fetch(domain + "/presupuestos/presupuestoencuadernaciones/update/" + id , {
|
||||||
@ -426,8 +427,10 @@
|
|||||||
data.lines.forEach((line) => {
|
data.lines.forEach((line) => {
|
||||||
|
|
||||||
$('#proveedor_enc_' + line[0].tarifa_id).off('change')
|
$('#proveedor_enc_' + line[0].tarifa_id).off('change')
|
||||||
if(line[0].hasOwnProperty('proveedor_id'))
|
if(line[0].hasOwnProperty('proveedor_id')){
|
||||||
$('#proveedor_enc_' + line[0].tarifa_id).val(line[0].proveedor_id)
|
$('#proveedor_enc_' + line[0].tarifa_id)
|
||||||
|
.append('<option selected="selected" value="' + line[0].proveedor_id + '">' + line[0].proveedor + '</option>')
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
$('#proveedor_enc_' + line[0].tarifa_id).empty()
|
$('#proveedor_enc_' + line[0].tarifa_id).empty()
|
||||||
.append('<option selected="selected" value="' + line[0].proveedor_id + '">' + '<?= lang("Presupuestos.no_disponible") ?>' + '</option>')
|
.append('<option selected="selected" value="' + line[0].proveedor_id + '">' + '<?= lang("Presupuestos.no_disponible") ?>' + '</option>')
|
||||||
@ -437,6 +440,7 @@
|
|||||||
$('#enc_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
|
$('#enc_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
|
||||||
$('#proveedor_enc_' + line[0].tarifa_id).on('change', proveedor_enc_event)
|
$('#proveedor_enc_' + line[0].tarifa_id).on('change', proveedor_enc_event)
|
||||||
});
|
});
|
||||||
|
check_serv_enc_error()
|
||||||
yeniden(data.<?= csrf_token() ?>);
|
yeniden(data.<?= csrf_token() ?>);
|
||||||
}).then(
|
}).then(
|
||||||
fetch(domain + "/presupuestos/presupuestomanipulados/update/" + id , {
|
fetch(domain + "/presupuestos/presupuestomanipulados/update/" + id , {
|
||||||
@ -458,6 +462,7 @@
|
|||||||
$('#precio_total_manipulado_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
|
$('#precio_total_manipulado_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
|
||||||
$('#manipulado_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
|
$('#manipulado_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
|
||||||
});
|
});
|
||||||
|
check_serv_manipulado_error()
|
||||||
yeniden(data.<?= csrf_token() ?>);
|
yeniden(data.<?= csrf_token() ?>);
|
||||||
}).then(function(){
|
}).then(function(){
|
||||||
if(update_preimpresion){
|
if(update_preimpresion){
|
||||||
@ -478,7 +483,7 @@
|
|||||||
$('#precio_preimpresion_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
|
$('#precio_preimpresion_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
|
||||||
$('#preimpresion_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
|
$('#preimpresion_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
|
||||||
});
|
});
|
||||||
|
check_serv_preimpresion_error()
|
||||||
yeniden(data.<?= csrf_token() ?>);
|
yeniden(data.<?= csrf_token() ?>);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -604,6 +609,54 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function servicioRetractilado(){
|
||||||
|
if($('#retractilado').prop('checked')){
|
||||||
|
$('#add_servicio_acabado_list').val(<?php echo $serviciosCheckboxes['retractilado'] ?>)
|
||||||
|
$('#insertar_serv_acabado').click()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var row_indexes = tableServiciosAcabado.rows().eq( 0 ).filter( function (rowIdx) {
|
||||||
|
return tableServiciosAcabado.cell( rowIdx, 0 ).data() == <?php echo $serviciosCheckboxes['retractilado'] ?> ? true : false;
|
||||||
|
} );
|
||||||
|
if(row_indexes.length > 0){
|
||||||
|
tableServiciosAcabado.row(row_indexes[0]).remove().draw()
|
||||||
|
check_serv_acabado_error()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function servicioRetractilado5(){
|
||||||
|
if($('#retractilado5').prop('checked')){
|
||||||
|
$('#add_servicio_acabado_list').val(<?php echo $serviciosCheckboxes['retractilado5'] ?>)
|
||||||
|
$('#insertar_serv_acabado').click()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var row_indexes = tableServiciosAcabado.rows().eq( 0 ).filter( function (rowIdx) {
|
||||||
|
return tableServiciosAcabado.cell( rowIdx, 0 ).data() == <?php echo $serviciosCheckboxes['retractilado5'] ?> ? true : false;
|
||||||
|
} );
|
||||||
|
if(row_indexes.length > 0){
|
||||||
|
tableServiciosAcabado.row(row_indexes[0]).remove().draw()
|
||||||
|
check_serv_acabado_error()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function servicioFajaColor(){
|
||||||
|
if($('#fajaColor').prop('checked')){
|
||||||
|
$('#add_servicio_acabado_list').val(<?php echo $serviciosCheckboxes['fajaColor'] ?>)
|
||||||
|
$('#insertar_serv_acabado').click()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var row_indexes = tableServiciosAcabado.rows().eq( 0 ).filter( function (rowIdx) {
|
||||||
|
return tableServiciosAcabado.cell( rowIdx, 0 ).data() == <?php echo $serviciosCheckboxes['fajaColor'] ?> ? true : false;
|
||||||
|
} );
|
||||||
|
if(row_indexes.length > 0){
|
||||||
|
tableServiciosAcabado.row(row_indexes[0]).remove().draw()
|
||||||
|
check_serv_acabado_error()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$('#insertar_serv_acabado').on('click', function(){
|
$('#insertar_serv_acabado').on('click', function(){
|
||||||
const tarifa_text = $('#add_servicio_acabado_list').select2('data')[0].text.trim()
|
const tarifa_text = $('#add_servicio_acabado_list').select2('data')[0].text.trim()
|
||||||
|
|
||||||
@ -788,7 +841,8 @@
|
|||||||
|
|
||||||
var htmlString = '';
|
var htmlString = '';
|
||||||
|
|
||||||
if($('#tableOfServiciosEncuadernacion tr > td:contains(' + '<?= lang("Presupuestos.no_disponible") ?>' + ')').length > 0){
|
$('#tableOfServiciosEncuadernacion tr').each(function(){
|
||||||
|
if($(this).find('td').eq(3).text() == '0.00'){
|
||||||
htmlString = `
|
htmlString = `
|
||||||
<div class="alert alert-danger d-flex align-items-baseline" role="alert">
|
<div class="alert alert-danger d-flex align-items-baseline" role="alert">
|
||||||
<span class="alert-icon alert-icon-lg text-primary me-2">
|
<span class="alert-icon alert-icon-lg text-primary me-2">
|
||||||
@ -799,6 +853,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
})
|
||||||
$('#serv-enc-error').html(htmlString)
|
$('#serv-enc-error').html(htmlString)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1231,6 +1286,41 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function servicioPrototipo(){
|
||||||
|
if($('#prototipo').prop('checked')){
|
||||||
|
$('#add_servicio_preimpresion_list').val(<?php echo $serviciosCheckboxes['prototipo'] ?>)
|
||||||
|
$('#insertar_serv_preimpresion').click()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var row_indexes = tableServiciosPreimpresion.rows().eq( 0 ).filter( function (rowIdx) {
|
||||||
|
return tableServiciosPreimpresion.cell( rowIdx, 0 ).data() == <?php echo $serviciosCheckboxes['prototipo'] ?> ? true : false;
|
||||||
|
} );
|
||||||
|
if(row_indexes.length > 0){
|
||||||
|
tableServiciosPreimpresion.row(row_indexes[0]).remove().draw()
|
||||||
|
check_serv_preimpresion_error()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function servicioFerro(){
|
||||||
|
var row_indexes = tableServiciosPreimpresion.rows().eq( 0 ).filter( function (rowIdx) {
|
||||||
|
return tableServiciosPreimpresion.cell( rowIdx, 0 ).data() == <?php echo $serviciosCheckboxes['ferro'] ?> ? true : false;
|
||||||
|
} );
|
||||||
|
if($('#ferro').prop('checked')){
|
||||||
|
if(row_indexes.length == 0){
|
||||||
|
$('#add_servicio_preimpresion_list').val(<?php echo $serviciosCheckboxes['ferro'] ?>)
|
||||||
|
$('#insertar_serv_preimpresion').click()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(row_indexes.length > 0){
|
||||||
|
tableServiciosPreimpresion.row(row_indexes[0]).remove().draw()
|
||||||
|
check_serv_preimpresion_error()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$('#insertar_serv_preimpresion').on('click', function(){
|
$('#insertar_serv_preimpresion').on('click', function(){
|
||||||
const tarifa_text = $('#add_servicio_preimpresion_list').select2('data')[0].text.trim()
|
const tarifa_text = $('#add_servicio_preimpresion_list').select2('data')[0].text.trim()
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
<input type="hidden" name="lp_bn_formas_h" id="lp_bn_formas_h" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_bn_formas_h" id="lp_bn_formas_h" class="form-control" value="0"></input>
|
||||||
<input type="hidden" name="lp_bn_formas_orientacion" id="lp_bn_formas_orientacion" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_bn_formas_orientacion" id="lp_bn_formas_orientacion" class="form-control" value="0"></input>
|
||||||
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_bn.png') ?>" /></td>
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_bn.png') ?>" /></td>
|
||||||
<td class="lp-td"><input id="lp_bn_paginas" name="lp_bn_paginas" class="lp-cell lp-input lp-bn-input" type="text" value="0"></td>
|
<td class="lp-td"><input id="lp_bn_paginas" name="lp_bn_paginas" class="lp-cell lp-input lp-bn-input paginas-lp" type="text" value="0"></td>
|
||||||
<td class="lp-td">
|
<td class="lp-td">
|
||||||
<select id="lp_bn_papel" name="lp_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
<select id="lp_bn_papel" name="lp_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
||||||
<?php if (isset($papelGenericoNegroList) && is_array($papelGenericoNegroList) && !empty($papelGenericoNegroList)) :
|
<?php if (isset($papelGenericoNegroList) && is_array($papelGenericoNegroList) && !empty($papelGenericoNegroList)) :
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<input type="hidden" name="lp_bnhq_formas_h" id="lp_bnhq_formas_h" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_bnhq_formas_h" id="lp_bnhq_formas_h" class="form-control" value="0"></input>
|
||||||
<input type="hidden" name="lp_bnhq_formas_orientacion" id="lp_bnhq_formas_orientacion" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_bnhq_formas_orientacion" id="lp_bnhq_formas_orientacion" class="form-control" value="0"></input>
|
||||||
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_bnhq.png') ?>" /></td>
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_bnhq.png') ?>" /></td>
|
||||||
<td class="lp-td"><input id="lp_bnhq_paginas" name="lp_bnhq_paginas" class="lp-cell lp-input lp-bnhq-input" type="text" value="0"></td>
|
<td class="lp-td"><input id="lp_bnhq_paginas" name="lp_bnhq_paginas" class="lp-cell lp-input lp-bnhq-input paginas-lp" type="text" value="0"></td>
|
||||||
<td class="lp-td">
|
<td class="lp-td">
|
||||||
<select id="lp_bnhq_papel" name="lp_bnhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
<select id="lp_bnhq_papel" name="lp_bnhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
||||||
<?php if (isset($papelGenericoNegroHQList) && is_array($papelGenericoNegroHQList) && !empty($papelGenericoNegroHQList)) :
|
<?php if (isset($papelGenericoNegroHQList) && is_array($papelGenericoNegroHQList) && !empty($papelGenericoNegroHQList)) :
|
||||||
@ -157,7 +157,7 @@
|
|||||||
<input type="hidden" name="lp_color_formas_h" id="lp_color_formas_h" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_color_formas_h" id="lp_color_formas_h" class="form-control" value="0"></input>
|
||||||
<input type="hidden" name="lp_color_formas_orientacion" id="lp_color_formas_orientacion" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_color_formas_orientacion" id="lp_color_formas_orientacion" class="form-control" value="0"></input>
|
||||||
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_color.png') ?>" /></td>
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_color.png') ?>" /></td>
|
||||||
<td class="lp-td"><input id="lp_color_paginas" name="lp_color_paginas" class="lp-cell lp-input lp-color-input" type="text" value="0"></td>
|
<td class="lp-td"><input id="lp_color_paginas" name="lp_color_paginas" class="lp-cell lp-input lp-color-input paginas-lp" type="text" value="0"></td>
|
||||||
<td class="lp-td">
|
<td class="lp-td">
|
||||||
<select id="lp_color_papel" name="lp_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
<select id="lp_color_papel" name="lp_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
||||||
<?php if (isset($papelGenericoColorList) && is_array($papelGenericoColorList) && !empty($papelGenericoColorList)) :
|
<?php if (isset($papelGenericoColorList) && is_array($papelGenericoColorList) && !empty($papelGenericoColorList)) :
|
||||||
@ -211,7 +211,7 @@
|
|||||||
<input type="hidden" name="lp_colorhq_formas_h" id="lp_colorhq_formas_h" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_colorhq_formas_h" id="lp_colorhq_formas_h" class="form-control" value="0"></input>
|
||||||
<input type="hidden" name="lp_colorhq_formas_orientacion" id="lp_colorhq_formas_orientacion" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_colorhq_formas_orientacion" id="lp_colorhq_formas_orientacion" class="form-control" value="0"></input>
|
||||||
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_colorhq.png') ?>" /></td>
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_colorhq.png') ?>" /></td>
|
||||||
<td class="lp-td"><input id="lp_colorhq_paginas" name="lp_colorhq_paginas" class="lp-cell lp-input lp-colorhq-input" type="text" value="0"></td>
|
<td class="lp-td"><input id="lp_colorhq_paginas" name="lp_colorhq_paginas" class="lp-cell lp-input lp-colorhq-input paginas-lp" type="text" value="0"></td>
|
||||||
<td class="lp-td">
|
<td class="lp-td">
|
||||||
<select id="lp_colorhq_papel" name="lp_colorhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
<select id="lp_colorhq_papel" name="lp_colorhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
||||||
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
|
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
|
||||||
@ -264,7 +264,7 @@
|
|||||||
<input type="hidden" name="lp_rot_bn_formas_h" id="lp_rot_bn_formas_h" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_rot_bn_formas_h" id="lp_rot_bn_formas_h" class="form-control" value="0"></input>
|
||||||
<input type="hidden" name="lp_rot_bn_formas_orientacion" id="lp_rot_bn_formas_orientacion" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_rot_bn_formas_orientacion" id="lp_rot_bn_formas_orientacion" class="form-control" value="0"></input>
|
||||||
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_rotativa_bn.png') ?>" /></td>
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_rotativa_bn.png') ?>" /></td>
|
||||||
<td class="lp-td"><input id="lp_rot_bn_paginas" name="lp_rot_bn_paginas" class="lp-cell lp-input lp-rotbn-input" type="text" value="0"></td>
|
<td class="lp-td"><input id="lp_rot_bn_paginas" name="lp_rot_bn_paginas" class="lp-cell lp-input lp-rotbn-input paginas-lp" type="text" value="0"></td>
|
||||||
<td class="lp-td">
|
<td class="lp-td">
|
||||||
<select id="lp_rot_bn_papel" name="lp_rot_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
<select id="lp_rot_bn_papel" name="lp_rot_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
||||||
<?php if (isset($papelGenericoRotativaNegroList) && is_array($papelGenericoRotativaNegroList) && !empty($papelGenericoRotativaNegroList)) :
|
<?php if (isset($papelGenericoRotativaNegroList) && is_array($papelGenericoRotativaNegroList) && !empty($papelGenericoRotativaNegroList)) :
|
||||||
@ -524,11 +524,11 @@
|
|||||||
<input type="hidden" name="lp_rot_color_formas_h" id="lp_rot_color_formas_h" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_rot_color_formas_h" id="lp_rot_color_formas_h" class="form-control" value="0"></input>
|
||||||
<input type="hidden" name="lp_rot_color_formas_orientacion" id="lp_rot_color_formas_orientacion" class="form-control" value="0"></input>
|
<input type="hidden" name="lp_rot_color_formas_orientacion" id="lp_rot_color_formas_orientacion" class="form-control" value="0"></input>
|
||||||
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_rotativa_color.png') ?>" /></td>
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_rotativa_color.png') ?>" /></td>
|
||||||
<td class="lp-td"><input id="lp_rot_color_paginas" name="lp_rot_color_paginas" class="lp-cell lp-input lp-rotcolor-input" type="text" value="0"></td>
|
<td class="lp-td"><input id="lp_rot_color_paginas" name="lp_rot_color_paginas" class="lp-cell lp-input lp-rotcolor-input paginas-lp" type="text" value="0"></td>
|
||||||
<td class="lp-td">
|
<td class="lp-td">
|
||||||
<select id="lp_rot_color_papel" name="lp_rot_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
<select id="lp_rot_color_papel" name="lp_rot_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
||||||
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
|
<?php if (isset($papelGenericoRotativaColorList) && is_array($papelGenericoRotativaColorList) && !empty($papelGenericoRotativaColorList)) :
|
||||||
foreach ($papelGenericoColorHQList as $k => $v) : ?>
|
foreach ($papelGenericoRotativaColorList as $k => $v) : ?>
|
||||||
<?php if($v->id != 0): ?>
|
<?php if($v->id != 0): ?>
|
||||||
<option value="<?= $v->id ?>">
|
<option value="<?= $v->id ?>">
|
||||||
<?= $v->nombre ?>
|
<?= $v->nombre ?>
|
||||||
@ -933,6 +933,9 @@ $('#lp_cubierta_papel').val('');
|
|||||||
$('#lp_sobrecubierta_papel').val('');
|
$('#lp_sobrecubierta_papel').val('');
|
||||||
$('#addLineasPresupuesto').val('');
|
$('#addLineasPresupuesto').val('');
|
||||||
|
|
||||||
|
$('.paginas-lp').on('change', function(){
|
||||||
|
checkPaginasPresupuesto()
|
||||||
|
})
|
||||||
|
|
||||||
$('#lp_rot_color_vercalculos').on("click", function () {
|
$('#lp_rot_color_vercalculos').on("click", function () {
|
||||||
if($( ".calculos_rot_color" ).css('display') == 'none')
|
if($( ".calculos_rot_color" ).css('display') == 'none')
|
||||||
@ -1077,6 +1080,7 @@ $('.insertarLinea').on("click", function (e) {
|
|||||||
fill_lp_cubierta(row, true);
|
fill_lp_cubierta(row, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
checkPaginasPresupuesto()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -1295,7 +1299,7 @@ function calcularPresupuesto_bn(){
|
|||||||
|
|
||||||
const dimension = getDimensionLibro();
|
const dimension = getDimensionLibro();
|
||||||
|
|
||||||
let datos = {
|
var datos = {
|
||||||
type: 'interior',
|
type: 'interior',
|
||||||
color: 0,
|
color: 0,
|
||||||
hq: 0,
|
hq: 0,
|
||||||
@ -1317,8 +1321,10 @@ function calcularPresupuesto_bn(){
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
|
||||||
if(data.lineas.length >0){
|
if(data.lineas.length >0){
|
||||||
// Se cogen los valores de la linea con los datos correspondientes
|
|
||||||
$.each(data.lineas, function(key, value) {
|
$.each(data.lineas, function(key, value) {
|
||||||
|
|
||||||
|
// Se cogen los valores de la linea con los datos correspondientes
|
||||||
if(value.fields.maquina_id === $('#lp_bn_maquina option:selected').val() &&
|
if(value.fields.maquina_id === $('#lp_bn_maquina option:selected').val() &&
|
||||||
value.fields.papel_generico_id === datos.papel_generico_id &&
|
value.fields.papel_generico_id === datos.papel_generico_id &&
|
||||||
value.fields.papel_impresion_id === $('#lp_bn_papelImpresion option:selected').val() ) {
|
value.fields.papel_impresion_id === $('#lp_bn_papelImpresion option:selected').val() ) {
|
||||||
@ -1389,6 +1395,7 @@ function fill_lp_bn(row, fromComparator=false){
|
|||||||
$('#lp_bn_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
$('#lp_bn_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||||
$('#lp_bn_formas_orientacion').val(row.num_formas.posicion_formas)
|
$('#lp_bn_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||||
|
|
||||||
|
calcular_mermas()
|
||||||
updateTotales()
|
updateTotales()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1626,6 +1633,7 @@ function fill_lp_color(row, fromComparator=false){
|
|||||||
$('#lp_color_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
$('#lp_color_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||||
$('#lp_color_formas_orientacion').val(row.num_formas.posicion_formas)
|
$('#lp_color_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||||
|
|
||||||
|
calcular_mermas()
|
||||||
updateTotales()
|
updateTotales()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1862,6 +1870,7 @@ function fill_lp_bnhq(row, fromComparator=false){
|
|||||||
$('#lp_bnhq_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
$('#lp_bnhq_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||||
$('#lp_bnhq_formas_orientacion').val(row.num_formas.posicion_formas)
|
$('#lp_bnhq_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||||
|
|
||||||
|
calcular_mermas()
|
||||||
updateTotales()
|
updateTotales()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2100,6 +2109,7 @@ function fill_lp_colorhq(row, fromComparator=false){
|
|||||||
$('#lp_colorhq_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
$('#lp_colorhq_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||||
$('#lp_colorhq_formas_orientacion').val(row.num_formas.posicion_formas)
|
$('#lp_colorhq_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||||
|
|
||||||
|
calcular_mermas()
|
||||||
updateTotales()
|
updateTotales()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2444,6 +2454,7 @@ function fill_lp_rot_bn(row, fromComparador=false){
|
|||||||
$('#lp_rot_bn_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
$('#lp_rot_bn_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||||
$('#lp_rot_bn_formas_orientacion').val(row.num_formas.posicion_formas)
|
$('#lp_rot_bn_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||||
|
|
||||||
|
calcular_mermas()
|
||||||
updateTotales()
|
updateTotales()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2709,7 +2720,7 @@ $('#lp_rot_color_defecto').on("click", function () {
|
|||||||
function fill_lp_rot_color(row, fromComparador=false){
|
function fill_lp_rot_color(row, fromComparador=false){
|
||||||
|
|
||||||
if(fromComparador){
|
if(fromComparador){
|
||||||
|
console.log(row)
|
||||||
$('#lp_rot_color_paginas').val(row.paginas)
|
$('#lp_rot_color_paginas').val(row.paginas)
|
||||||
$('#lp_rot_color_papel').val(row.papelGenericoId)
|
$('#lp_rot_color_papel').val(row.papelGenericoId)
|
||||||
$('#lp_rot_color_gramaje').empty()
|
$('#lp_rot_color_gramaje').empty()
|
||||||
@ -2798,6 +2809,7 @@ function fill_lp_rot_color(row, fromComparador=false){
|
|||||||
$('#lp_rot_color_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
$('#lp_rot_color_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||||
$('#lp_rot_color_formas_orientacion').val(row.num_formas.posicion_formas)
|
$('#lp_rot_color_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||||
|
|
||||||
|
calcular_mermas()
|
||||||
updateTotales()
|
updateTotales()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3078,6 +3090,7 @@ function fill_lp_cubierta(row, fromComparador=false){
|
|||||||
$('#lp_cubierta_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
$('#lp_cubierta_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||||
$('#lp_cubierta_formas_orientacion').val(row.num_formas.posicion_formas)
|
$('#lp_cubierta_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||||
|
|
||||||
|
calcular_mermas()
|
||||||
updateTotales()
|
updateTotales()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3327,6 +3340,61 @@ async function fill_bbdd_from_lp(presupuesto_id){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateLineasPresupuesto(){
|
||||||
|
|
||||||
|
$('#tableLineasPresupuesto tbody tr:visible ').each(function(){
|
||||||
|
if(!this.id.includes('_data')){
|
||||||
|
if(this.id.endsWith('_bn')){
|
||||||
|
checkComparadorInt(false, false, true);
|
||||||
|
}
|
||||||
|
else if(this.id.endsWith('_bnhq')){
|
||||||
|
checkComparadorInt(false, true, true);
|
||||||
|
}
|
||||||
|
else if(this.id.endsWith('_color')){
|
||||||
|
checkComparadorInt(true, false, true);
|
||||||
|
}
|
||||||
|
else if(this.id.endsWith('_colorhq')){
|
||||||
|
checkComparadorInt(true, true, true);
|
||||||
|
}
|
||||||
|
else if(this.id.endsWith('_rot_bn')){
|
||||||
|
checkComparadorInt(false, false, true)
|
||||||
|
}
|
||||||
|
else if(this.id.endsWith('_rot_color')){
|
||||||
|
checkComparadorInt(false,true, true);
|
||||||
|
}
|
||||||
|
else if(this.id.endsWith('_cubierta')){
|
||||||
|
checkComparadorCubierta(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkPaginasPresupuesto(){
|
||||||
|
|
||||||
|
cantidad_total = 0
|
||||||
|
|
||||||
|
$('#tableLineasPresupuesto tbody tr:visible ').each(function(){
|
||||||
|
if(!this.id.includes('_data') && !this.id.endsWith('_cubierta') && !this.id.endsWith('_sobrecubierta')){
|
||||||
|
cantidad_total += parseInt($('#' + this.id + '_paginas').val() )
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
htmlString = ''
|
||||||
|
|
||||||
|
if(cantidad_total != parseInt($('#paginas').val())){
|
||||||
|
htmlString = `
|
||||||
|
<div class="alert alert-warning d-flex align-items-baseline" role="alert">
|
||||||
|
<span class="alert-icon alert-icon-lg text-primary me-2">
|
||||||
|
<i class="ti ti-bell ti-sm"></i>
|
||||||
|
</span>
|
||||||
|
<div class="d-flex flex-column ps-1">
|
||||||
|
<h5 class="alert-heading mb-2"><?= lang("Presupuestos.errores.paginasLP") ?></h5>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
$('#divAlarmasLineasPresupuesto').html(htmlString)
|
||||||
|
}
|
||||||
|
|
||||||
|
checkPaginasPresupuesto()
|
||||||
|
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<label for="add_clientedAdd" class="form-label">
|
<label for="add_clientedAdd" class="form-label">
|
||||||
<?=lang('PresupuestosDirecciones.clientedAdd') ?>*
|
<?=lang('PresupuestosDirecciones.clientedAdd') ?>*
|
||||||
</label>
|
</label>
|
||||||
<select id="add_clientedAdd" tabindex="0" class="form-control select2bs" style="width: 100%;" >
|
<select id="add_clientedAdd" class="form-control select2bs" style="width: 100%;" >
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
@ -20,25 +20,25 @@
|
|||||||
<label for="add_cantidad" class="form-label">
|
<label for="add_cantidad" class="form-label">
|
||||||
<?= lang('PresupuestosDirecciones.cantidad') ?>*
|
<?= lang('PresupuestosDirecciones.cantidad') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="number" id="add_cantidad" tabindex="1" class="form-control">
|
<input type="number" id="add_cantidad" class="form-control">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="add_att" class="form-label">
|
<label for="add_att" class="form-label">
|
||||||
<?= lang('PresupuestosDirecciones.att') ?>*
|
<?= lang('PresupuestosDirecciones.att') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="add_att" tabindex="1" maxLength="100" class="form-control new-address">
|
<input type="text" id="add_att" maxLength="100" class="form-control new-address">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="add_email" class="form-label">
|
<label for="add_email" class="form-label">
|
||||||
<?= lang('PresupuestosDirecciones.email') ?>*
|
<?= lang('PresupuestosDirecciones.email') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="add_email" tabindex="2" maxLength="100" class="form-control new-address">
|
<input type="text" id="add_email" maxLength="100" class="form-control new-address">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="add_direccion" class="form-label">
|
<label for="add_direccion" class="form-label">
|
||||||
<?= lang('PresupuestosDirecciones.direccion') ?>*
|
<?= lang('PresupuestosDirecciones.direccion') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="add_direccion" tabindex="3" maxLength="255" class="form-control new-address">
|
<input type="text" id="add_direccion" maxLength="255" class="form-control new-address">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
|
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<label for="add_pais_id" class="form-label">
|
<label for="add_pais_id" class="form-label">
|
||||||
<?=lang('PresupuestosDirecciones.pais') ?>*
|
<?=lang('PresupuestosDirecciones.pais') ?>*
|
||||||
</label>
|
</label>
|
||||||
<select id="add_pais_id" tabindex="4" class="form-control select2bs new-address" style="width: 100%;" >
|
<select id="add_pais_id" class="form-control select2bs new-address" style="width: 100%;" >
|
||||||
<option value="" disabled selected><?=lang('PresupuestosDirecciones.selectPais') ?></option>
|
<option value="" disabled selected><?=lang('PresupuestosDirecciones.selectPais') ?></option>
|
||||||
<?php foreach ($paisList as $item) : ?>
|
<?php foreach ($paisList as $item) : ?>
|
||||||
<option value="<?=$item->id ?>"<?=$item->id==1 ? ' selected':'' ?>>
|
<option value="<?=$item->id ?>"<?=$item->id==1 ? ' selected':'' ?>>
|
||||||
@ -65,7 +65,7 @@
|
|||||||
<label for="add_municipio" class="form-label">
|
<label for="add_municipio" class="form-label">
|
||||||
<?=lang('PresupuestosDirecciones.municipio') ?>*
|
<?=lang('PresupuestosDirecciones.municipio') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="add_municipio" tabindex="6" maxLength="100" class="form-control new-address">
|
<input type="text" id="add_municipio" maxLength="100" class="form-control new-address">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -74,7 +74,7 @@
|
|||||||
<label for="add_provincia" class="form-label">
|
<label for="add_provincia" class="form-label">
|
||||||
<?=lang('PresupuestosDirecciones.provincia') ?>*
|
<?=lang('PresupuestosDirecciones.provincia') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="add_provincia" tabindex="7" maxLength="100" class="form-control new-address">
|
<input type="text" id="add_provincia" maxLength="100" class="form-control new-address">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -87,7 +87,7 @@
|
|||||||
<label for="add_cp" class="form-label">
|
<label for="add_cp" class="form-label">
|
||||||
<?=lang('PresupuestosDirecciones.cp') ?>*
|
<?=lang('PresupuestosDirecciones.cp') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="add_cp" tabindex="8" maxLength="100" class="form-control new-address">
|
<input type="text" id="add_cp" maxLength="100" class="form-control new-address">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<label for="add_telefono" class="form-label">
|
<label for="add_telefono" class="form-label">
|
||||||
<?=lang('PresupuestosDirecciones.telefono') ?>*
|
<?=lang('PresupuestosDirecciones.telefono') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="add_telefono" tabindex="9" maxLength="100" class="form-control new-address"></input>
|
<input type="text" id="add_telefono" maxLength="100" class="form-control new-address"></input>
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -104,14 +104,14 @@
|
|||||||
|
|
||||||
<div class="col-md-12 col-lg-6 pl-4">
|
<div class="col-md-12 col-lg-6 pl-4">
|
||||||
<div class="form-check form-switch mb-2">
|
<div class="form-check form-switch mb-2">
|
||||||
<input class="form-check-input" type="checkbox" id="add_entregaPieCalle" name="add_entregaPieCalle" tabindex="10" value="1" >
|
<input class="form-check-input" type="checkbox" id="add_entregaPieCalle" name="add_entregaPieCalle" value="1" >
|
||||||
<label class="form-check-label" for="add_entregaPieCalle"><?= lang('PresupuestosDirecciones.entregaPieCalle') ?></label>
|
<label class="form-check-label" for="add_entregaPieCalle"><?= lang('PresupuestosDirecciones.entregaPieCalle') ?></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-6 pl-4">
|
<div class="col-md-12 col-lg-6 pl-4">
|
||||||
<div class="form-check form-switch mb-2">
|
<div class="form-check form-switch mb-2">
|
||||||
<input class="form-check-input" type="checkbox" id="add_saveDirection" name="add_saveDirection" tabindex="10" value="1" >
|
<input class="form-check-input" type="checkbox" id="add_saveDirection" name="add_saveDirection" value="1" >
|
||||||
<label class="form-check-label" for="add_saveDirection"><?= lang('PresupuestosDirecciones.saveDirection') ?></label>
|
<label class="form-check-label" for="add_saveDirection"><?= lang('PresupuestosDirecciones.saveDirection') ?></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -120,7 +120,7 @@
|
|||||||
<label style="display:none" for="add_alias" class="form-label save-alias">
|
<label style="display:none" for="add_alias" class="form-label save-alias">
|
||||||
<?= lang('PresupuestosDirecciones.alias') ?>*
|
<?= lang('PresupuestosDirecciones.alias') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="add_alias" tabindex="1" maxLength="100" class="form-control new-address save-alias" style='display: none;'>
|
<input type="text" id="add_alias" maxLength="100" class="form-control new-address save-alias" style='display: none;'>
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -72,33 +72,12 @@ $('#compPaginasColorhq').on("change", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#compRetractilado').on("change", function () {
|
|
||||||
checkRetractiladoComparador(this);
|
$('#prototipo').on("change", function () {
|
||||||
|
$('#ferro').prop('checked', true)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#compRetractilado5').on("change", function () {
|
|
||||||
checkRetractiladoComparador(this);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$('#imagenesBnInterior').on("change", function () {
|
|
||||||
var e = document.getElementById('tipoImpresion');
|
|
||||||
var optionToHide = e.querySelector("option[value='negro']");
|
|
||||||
|
|
||||||
if (document.getElementById('imagenesBnInterior').checked) {
|
|
||||||
optionToHide.setAttribute('disabled', 'disabled')
|
|
||||||
|
|
||||||
if (e.value == 'negro') {
|
|
||||||
e.value = 'negrohq';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
optionToHide.removeAttribute('disabled');
|
|
||||||
}
|
|
||||||
$('#tipoImpresion').select2();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$('#compPosPaginasColor').on("keyup", function () {
|
$('#compPosPaginasColor').on("keyup", function () {
|
||||||
computarPaginasColor(this.value);
|
computarPaginasColor(this.value);
|
||||||
@ -230,14 +209,14 @@ function computarPaginasColor(string) {
|
|||||||
function checkRetractiladoComparador(element) {
|
function checkRetractiladoComparador(element) {
|
||||||
|
|
||||||
switch (element.id) {
|
switch (element.id) {
|
||||||
case 'compRetractilado':
|
case 'retractilado':
|
||||||
if (document.getElementById(element.id).checked) {
|
if ($('#' + element.id).prop('checked')) {
|
||||||
document.getElementById('compRetractilado5').checked = false;
|
$('#retractilado5').prop('checked', false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'compRetractilado5':
|
case 'retractilado5':
|
||||||
if (document.getElementById(element.id).checked) {
|
if ($('#' + element.id).prop('checked')) {
|
||||||
document.getElementById('compRetractilado').checked = false;
|
$('#retractilado').prop('checked', false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -551,8 +530,7 @@ function generateCompJSON(){
|
|||||||
|
|
||||||
data = {}
|
data = {}
|
||||||
|
|
||||||
if( $('#tipoImpresion').select2('data')[0].id == 'negro' || $('#tipoImpresion').select2('data')[0].id == 'color')
|
if ($('#tipoImpresion').select2('data')[0].id == 'negro' || $('#tipoImpresion').select2('data')[0].id == 'color') {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
bn_obj = {
|
bn_obj = {
|
||||||
"bn": {
|
"bn": {
|
||||||
@ -568,8 +546,7 @@ function generateCompJSON(){
|
|||||||
$.extend(data, bn_obj);
|
$.extend(data, bn_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $('#tipoImpresion').select2('data')[0].id == 'negrohq' || $('#tipoImpresion').select2('data')[0].id == 'colorhq')
|
if ($('#tipoImpresion').select2('data')[0].id == 'negrohq' || $('#tipoImpresion').select2('data')[0].id == 'colorhq') {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
bnhq_obj = {
|
bnhq_obj = {
|
||||||
"bnhq": {
|
"bnhq": {
|
||||||
@ -585,8 +562,7 @@ function generateCompJSON(){
|
|||||||
$.extend(data, bnhq_obj);
|
$.extend(data, bnhq_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($('#tipoImpresion').select2('data')[0].id == 'color')
|
if ($('#tipoImpresion').select2('data')[0].id == 'color') {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
color_obj = {
|
color_obj = {
|
||||||
"color": {
|
"color": {
|
||||||
@ -604,8 +580,7 @@ function generateCompJSON(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($('#tipoImpresion').select2('data')[0].id == 'colorhq')
|
if ($('#tipoImpresion').select2('data')[0].id == 'colorhq') {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
colorhq_obj = {
|
colorhq_obj = {
|
||||||
"colorhq": {
|
"colorhq": {
|
||||||
|
|||||||
Reference in New Issue
Block a user