mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'bug/gramaje' into 'main'
solucionado el bug con los gramajes See merge request jjimenez/safekat!224
This commit is contained in:
@ -14,11 +14,10 @@ class TarifaEncuadernacionTiradaModel extends \App\Models\GoBaseModel
|
|||||||
|
|
||||||
const SORTABLE = [
|
const SORTABLE = [
|
||||||
0 => "t3.nombre",
|
0 => "t3.nombre",
|
||||||
1 => "t1.precio_min",
|
1 => "t1.tirada_min",
|
||||||
2 => "t1.importe_fijo",
|
2 => "t1.tirada_max",
|
||||||
3 => "t1.tirada_min",
|
3 => "t1.precio_min",
|
||||||
4 => "t1.tirada_max",
|
4 => "t1.importe_fijo",
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
|||||||
@ -1504,7 +1504,17 @@ $('#btn_addLinea').on("click", function (e) {
|
|||||||
/***********************
|
/***********************
|
||||||
* Funciones LP BN
|
* Funciones LP BN
|
||||||
************************/
|
************************/
|
||||||
async function set_lp_bn_gramaje(){
|
function change_papelGenerico_lp_bn(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_bn_papel option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_bn(true)
|
||||||
|
set_lp_bn_gramaje()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function set_lp_bn_gramaje(mantenerSeleccion = false){
|
||||||
|
|
||||||
var previous = $('#lp_bn_gramaje option:selected').text()
|
var previous = $('#lp_bn_gramaje option:selected').text()
|
||||||
$('#lp_bn_gramaje').data('val', previous);
|
$('#lp_bn_gramaje').data('val', previous);
|
||||||
|
|
||||||
@ -1520,7 +1530,6 @@ async function set_lp_bn_gramaje(){
|
|||||||
type: 'post',
|
type: 'post',
|
||||||
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
//clear_lp_bn(true)
|
|
||||||
$('#lp_bn_gramaje').empty()
|
$('#lp_bn_gramaje').empty()
|
||||||
},
|
},
|
||||||
data: datos,
|
data: datos,
|
||||||
@ -1531,9 +1540,15 @@ async function set_lp_bn_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_bn_gramaje').append(option);
|
$('#lp_bn_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_bn_gramaje option').filter(function() {
|
if(mantenerSeleccion){
|
||||||
return $(this).html() == previous;
|
$('#lp_bn_gramaje option').filter(function() {
|
||||||
}).prop('selected', true);
|
return $(this).html() == previous;
|
||||||
|
}).prop('selected', true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#lp_bn_gramaje').val('')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1836,8 +1851,9 @@ function fill_lp_bn(row, fromComparator=false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function eventos_lp_bn(isInkjet = false){
|
function eventos_lp_bn(isInkjet = false){
|
||||||
$('#lp_bn_papel').bind("change", {clear_selectors: true}, clear_lp_bn);
|
|
||||||
$('#lp_bn_gramaje').bind("click", set_lp_bn_gramaje);
|
$('#lp_bn_papel').bind("change", change_papelGenerico_lp_bn);
|
||||||
|
$('#lp_bn_gramaje').bind("focus", {mantenerSeleccion: true}, set_lp_bn_gramaje);
|
||||||
$('#lp_bn_gramaje').on('change', function(){
|
$('#lp_bn_gramaje').on('change', function(){
|
||||||
var previous = $(this).data('val');
|
var previous = $(this).data('val');
|
||||||
const selected = $("select#lp_bn_gramaje option:selected");
|
const selected = $("select#lp_bn_gramaje option:selected");
|
||||||
@ -1862,7 +1878,17 @@ function eventos_lp_bn(isInkjet = false){
|
|||||||
/***********************
|
/***********************
|
||||||
* Funciones LP COLOR
|
* Funciones LP COLOR
|
||||||
************************/
|
************************/
|
||||||
async function set_lp_color_gramaje(){
|
function change_papelGenerico_lp_color(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_color_papel option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_color(true)
|
||||||
|
set_lp_color_gramaje()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function set_lp_color_gramaje(mantenerSeleccion = false){
|
||||||
|
|
||||||
var previous = $('#lp_color_gramaje option:selected').text()
|
var previous = $('#lp_color_gramaje option:selected').text()
|
||||||
$('#lp_color_gramaje').data('val', previous);
|
$('#lp_color_gramaje').data('val', previous);
|
||||||
@ -1889,9 +1915,14 @@ async function set_lp_color_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_color_gramaje').append(option);
|
$('#lp_color_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_color_gramaje option').filter(function() {
|
if(mantenerSeleccion){
|
||||||
return $(this).html() == previous;
|
$('#lp_color_gramaje option').filter(function() {
|
||||||
}).prop('selected', true);
|
return $(this).html() == previous;
|
||||||
|
}).prop('selected', true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#lp_color_gramaje').val('')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2186,8 +2217,8 @@ function fill_lp_color(row, fromComparator=false){
|
|||||||
|
|
||||||
function eventos_lp_color(isInkjet = false){
|
function eventos_lp_color(isInkjet = false){
|
||||||
|
|
||||||
$('#lp_color_papel').bind("change", {clear_selectors: true}, clear_lp_color);
|
$('#lp_color_papel').bind("change", change_papelGenerico_lp_color);
|
||||||
$('#lp_color_gramaje').bind("click", set_lp_color_gramaje);
|
$('#lp_color_gramaje').bind("focus", {mantenerSeleccion: true}, set_lp_color_gramaje);
|
||||||
$('#lp_color_gramaje').on('change', function(){
|
$('#lp_color_gramaje').on('change', function(){
|
||||||
var previous = $(this).data('val');
|
var previous = $(this).data('val');
|
||||||
const selected = $("select#lp_color_gramaje option:selected");
|
const selected = $("select#lp_color_gramaje option:selected");
|
||||||
@ -2213,7 +2244,17 @@ function eventos_lp_color(isInkjet = false){
|
|||||||
/***********************
|
/***********************
|
||||||
* Funciones LP BNHQ
|
* Funciones LP BNHQ
|
||||||
************************/
|
************************/
|
||||||
async function set_lp_bnhq_gramaje(){
|
function change_papelGenerico_lp_bnhq(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_bnhq_papel option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_bnhq(true)
|
||||||
|
set_lp_bnhq_gramaje()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function set_lp_bnhq_gramaje(mantenerSeleccion = false){
|
||||||
|
|
||||||
var previous = $('#lp_bnhq_gramaje option:selected').text()
|
var previous = $('#lp_bnhq_gramaje option:selected').text()
|
||||||
$('#lp_bnhq_gramaje').data('val', previous);
|
$('#lp_bnhq_gramaje').data('val', previous);
|
||||||
@ -2240,9 +2281,14 @@ async function set_lp_bnhq_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_bnhq_gramaje').append(option);
|
$('#lp_bnhq_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_bnhq_gramaje option').filter(function() {
|
if(mantenerSeleccion){
|
||||||
return $(this).html() == previous;
|
$('#lp_bnhq_gramaje option').filter(function() {
|
||||||
}).prop('selected', true);
|
return $(this).html() == previous;
|
||||||
|
}).prop('selected', true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#lp_bnhq_gramaje').val('')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2536,8 +2582,8 @@ function fill_lp_bnhq(row, fromComparator=false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function eventos_lp_bnhq(isInkjet = false){
|
function eventos_lp_bnhq(isInkjet = false){
|
||||||
$('#lp_bnhq_papel').bind("change", {clear_selectors: true}, clear_lp_bnhq);
|
$('#lp_bnhq_papel').bind("change", change_papelGenerico_lp_bnhq);
|
||||||
$('#lp_bnhq_gramaje').bind("click", set_lp_bnhq_gramaje);
|
$('#lp_bnhq_gramaje').bind("focus", {mantenerSeleccion: true}, set_lp_bnhq_gramaje);
|
||||||
$('#lp_bnhq_gramaje').on('change', function(){
|
$('#lp_bnhq_gramaje').on('change', function(){
|
||||||
var previous = $(this).data('val');
|
var previous = $(this).data('val');
|
||||||
const selected = $("select#lp_bnhq_gramaje option:selected");
|
const selected = $("select#lp_bnhq_gramaje option:selected");
|
||||||
@ -2562,7 +2608,17 @@ function eventos_lp_bnhq(isInkjet = false){
|
|||||||
/***********************
|
/***********************
|
||||||
* Funciones LP COLORHQ
|
* Funciones LP COLORHQ
|
||||||
************************/
|
************************/
|
||||||
async function set_lp_colorhq_gramaje(){
|
function change_papelGenerico_lp_colorhq(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_colorhq_papel option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_colorhq(true)
|
||||||
|
set_lp_colorhq_gramaje()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function set_lp_colorhq_gramaje(mantenerSeleccion = false){
|
||||||
|
|
||||||
var previous = $('#lp_colorhq_gramaje option:selected').text()
|
var previous = $('#lp_colorhq_gramaje option:selected').text()
|
||||||
$('#lp_colorhq_gramaje').data('val', previous);
|
$('#lp_colorhq_gramaje').data('val', previous);
|
||||||
@ -2589,16 +2645,19 @@ async function set_lp_colorhq_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_colorhq_gramaje').append(option);
|
$('#lp_colorhq_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_colorhq_gramaje option').filter(function() {
|
if(mantenerSeleccion){
|
||||||
return $(this).html() == previous;
|
$('#lp_colorhq_gramaje option').filter(function() {
|
||||||
}).prop('selected', true);
|
return $(this).html() == previous;
|
||||||
|
}).prop('selected', true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#lp_colorhq_gramaje').val('')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function set_lp_colorhq_papelImpresion(){
|
async function set_lp_colorhq_papelImpresion(){
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
@ -2895,8 +2954,8 @@ function fill_lp_colorhq(row, fromComparator=false){
|
|||||||
|
|
||||||
function eventos_lp_colorhq(isInkjet = false){
|
function eventos_lp_colorhq(isInkjet = false){
|
||||||
|
|
||||||
$('#lp_colorhq_papel').bind("change", {clear_selectors: true}, clear_lp_colorhq);
|
$('#lp_colorhq_papel').bind("change", change_papelGenerico_lp_colorhq);
|
||||||
$('#lp_colorhq_gramaje').bind("click", set_lp_colorhq_gramaje);
|
$('#lp_colorhq_gramaje').bind("focus", {mantenerSeleccion: true}, set_lp_colorhq_gramaje);
|
||||||
$('#lp_colorhq_gramaje').on('change', function(){
|
$('#lp_colorhq_gramaje').on('change', function(){
|
||||||
var previous = $(this).data('val');
|
var previous = $(this).data('val');
|
||||||
const selected = $("select#lp_colorhq_gramaje option:selected");
|
const selected = $("select#lp_colorhq_gramaje option:selected");
|
||||||
@ -2922,7 +2981,15 @@ function eventos_lp_colorhq(isInkjet = false){
|
|||||||
/***********************
|
/***********************
|
||||||
* Funciones LP ROT_BN
|
* Funciones LP ROT_BN
|
||||||
************************/
|
************************/
|
||||||
async function set_lp_rot_bn_gramaje(){
|
function change_papelGenerico_lp_rot_bn(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_rot_bn_papel option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_rot_bn(true)
|
||||||
|
set_lp_rot_bn_gramaje()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function set_lp_rot_bn_gramaje(mantenerSeleccion = false){
|
||||||
|
|
||||||
var previous = $('#lp_rot_bn_gramaje option:selected').text()
|
var previous = $('#lp_rot_bn_gramaje option:selected').text()
|
||||||
$('#lp_rot_bn_gramaje').data('val', previous);
|
$('#lp_rot_bn_gramaje').data('val', previous);
|
||||||
@ -2949,8 +3016,13 @@ async function set_lp_rot_bn_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_rot_bn_gramaje').append(option);
|
$('#lp_rot_bn_gramaje').append(option);
|
||||||
});
|
});
|
||||||
const option = $("select#lp_rot_bn_gramaje option:equal('" + previous + "')");
|
if(mantenerSeleccion){
|
||||||
option.prop('selected', true);
|
const option = $("select#lp_rot_bn_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#lp_rot_bn_gramaje').val('')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3255,8 +3327,8 @@ function fill_lp_rot_bn(row, fromComparador=false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function eventos_lp_rot_bn(){
|
function eventos_lp_rot_bn(){
|
||||||
$('#lp_rot_bn_papel').bind("change", {clear_selectors: true}, clear_lp_rot_bn);
|
$('#lp_rot_bn_papel').bind("change", change_papelGenerico_lp_rot_bn);
|
||||||
$('#lp_rot_bn_gramaje').bind("focus", set_lp_rot_bn_gramaje);
|
$('#lp_rot_bn_gramaje').bind("focus", {mantenerSeleccion: true}, set_lp_rot_bn_gramaje);
|
||||||
$('#lp_rot_bn_gramaje').on('change', function(){
|
$('#lp_rot_bn_gramaje').on('change', function(){
|
||||||
var previous = $(this).data('val');
|
var previous = $(this).data('val');
|
||||||
const selected = $("select#lp_rot_bn_gramaje option:selected");
|
const selected = $("select#lp_rot_bn_gramaje option:selected");
|
||||||
@ -3279,7 +3351,17 @@ function eventos_lp_rot_bn(){
|
|||||||
/***********************
|
/***********************
|
||||||
* Funciones LP ROT_COLOR
|
* Funciones LP ROT_COLOR
|
||||||
************************/
|
************************/
|
||||||
async function set_lp_rot_color_gramaje(){
|
function change_papelGenerico_lp_rot_color(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_rot_color_papel option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_rot_color(true)
|
||||||
|
set_lp_rot_color_gramaje()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function set_lp_rot_color_gramaje(mantenerSeleccion = false){
|
||||||
|
|
||||||
var previous = $('#lp_rot_color_gramaje option:selected').text()
|
var previous = $('#lp_rot_color_gramaje option:selected').text()
|
||||||
$('#lp_rot_color_gramaje').data('val', previous);
|
$('#lp_rot_color_gramaje').data('val', previous);
|
||||||
@ -3306,8 +3388,13 @@ async function set_lp_rot_color_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_rot_color_gramaje').append(option);
|
$('#lp_rot_color_gramaje').append(option);
|
||||||
});
|
});
|
||||||
const option = $("select#lp_rot_color_gramaje option:equal('" + previous + "')");
|
if(mantenerSeleccion){
|
||||||
option.prop('selected', true);
|
const option = $("select#lp_rot_color_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#lp_rot_color_gramaje').val('')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3617,8 +3704,8 @@ function fill_lp_rot_color(row, fromComparador=false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function eventos_lp_rot_color(){
|
function eventos_lp_rot_color(){
|
||||||
$('#lp_rot_color_papel').bind("change", {clear_selectors: true}, clear_lp_rot_color);
|
$('#lp_rot_color_papel').bind("change", change_papelGenerico_lp_rot_color);
|
||||||
$('#lp_rot_color_gramaje').bind("focus", set_lp_rot_color_gramaje);
|
$('#lp_rot_color_gramaje').bind("focus", {mantenerSeleccion: true}, set_lp_rot_color_gramaje);
|
||||||
$('#lp_rot_color_gramaje').on('change', function(){
|
$('#lp_rot_color_gramaje').on('change', function(){
|
||||||
var previous = $(this).data('val');
|
var previous = $(this).data('val');
|
||||||
const selected = $("select#lp_rot_color_gramaje option:selected");
|
const selected = $("select#lp_rot_color_gramaje option:selected");
|
||||||
@ -3641,7 +3728,17 @@ function eventos_lp_rot_color(){
|
|||||||
/***********************
|
/***********************
|
||||||
* Funciones LP CUBIERTA
|
* Funciones LP CUBIERTA
|
||||||
************************/
|
************************/
|
||||||
async function set_lp_cubierta_gramaje(){
|
function change_papelGenerico_lp_cubierta(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_cubierta_papel option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_cubierta(true)
|
||||||
|
set_lp_cubierta_gramaje()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function set_lp_cubierta_gramaje(mantenerSeleccion = false){
|
||||||
|
|
||||||
var previous = $('#lp_cubierta_gramaje option:selected').text()
|
var previous = $('#lp_cubierta_gramaje option:selected').text()
|
||||||
$('#lp_cubierta_gramaje').data('val', previous);
|
$('#lp_cubierta_gramaje').data('val', previous);
|
||||||
@ -3668,9 +3765,14 @@ async function set_lp_cubierta_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_cubierta_gramaje').append(option);
|
$('#lp_cubierta_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_cubierta_gramaje option').filter(function() {
|
if(mantenerSeleccion){
|
||||||
return $(this).html() == previous;
|
$('#lp_cubierta_gramaje option').filter(function() {
|
||||||
}).prop('selected', true);
|
return $(this).html() == previous;
|
||||||
|
}).prop('selected', true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#lp_cubierta_gramaje').val('')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3911,8 +4013,8 @@ function fill_lp_cubierta(row, fromComparador=false){
|
|||||||
|
|
||||||
function eventos_lp_cubierta(){
|
function eventos_lp_cubierta(){
|
||||||
|
|
||||||
$('#lp_cubierta_papel').bind("change", {clear_selectors: true}, clear_lp_cubierta);
|
$('#lp_cubierta_papel').bind("change", change_papelGenerico_lp_cubierta);
|
||||||
$('#lp_cubierta_gramaje').bind("click", set_lp_cubierta_gramaje);
|
$('#lp_cubierta_gramaje').bind("focus", {mantenerSeleccion: true}, set_lp_cubierta_gramaje);
|
||||||
$('#lp_cubierta_gramaje').on('change', function(){
|
$('#lp_cubierta_gramaje').on('change', function(){
|
||||||
var previous = $(this).data('val');
|
var previous = $(this).data('val');
|
||||||
const selected = $("select#lp_cubierta_gramaje option:selected");
|
const selected = $("select#lp_cubierta_gramaje option:selected");
|
||||||
@ -3939,7 +4041,17 @@ function check_update_cubierta(){
|
|||||||
/***********************
|
/***********************
|
||||||
* Funciones LP SOBRECUBIERTA
|
* Funciones LP SOBRECUBIERTA
|
||||||
************************/
|
************************/
|
||||||
async function set_lp_sobrecubierta_gramaje(){
|
function change_papelGenerico_lp_sobrecubierta(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_sobrecubierta_papel option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_sobrecubierta(true)
|
||||||
|
set_lp_sobrecubierta_gramaje()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function set_lp_sobrecubierta_gramaje(mantenerSeleccion = false){
|
||||||
|
|
||||||
var previous = $('#lp_sobrecubierta_gramaje option:selected').text()
|
var previous = $('#lp_sobrecubierta_gramaje option:selected').text()
|
||||||
$('#lp_sobrecubierta_gramaje').data('val', previous);
|
$('#lp_sobrecubierta_gramaje').data('val', previous);
|
||||||
@ -3966,9 +4078,14 @@ async function set_lp_sobrecubierta_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_sobrecubierta_gramaje').append(option);
|
$('#lp_sobrecubierta_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_sobrecubierta_gramaje option').filter(function() {
|
if(mantenerSeleccion){
|
||||||
return $(this).html() == previous;
|
$('#lp_sobrecubierta_gramaje option').filter(function() {
|
||||||
}).prop('selected', true);
|
return $(this).html() == previous;
|
||||||
|
}).prop('selected', true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#lp_sobrecubierta_gramaje').val('')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -4195,8 +4312,8 @@ function fill_lp_sobrecubierta(row, fromComparador=false){
|
|||||||
|
|
||||||
function eventos_lp_sobrecubierta(){
|
function eventos_lp_sobrecubierta(){
|
||||||
|
|
||||||
$('#lp_sobrecubierta_papel').bind("change", {clear_selectors: true}, clear_lp_sobrecubierta);
|
$('#lp_sobrecubierta_papel').bind("change", change_papelGenerico_lp_sobrecubierta);
|
||||||
$('#lp_sobrecubierta_gramaje').bind("click", set_lp_sobrecubierta_gramaje);
|
$('#lp_sobrecubierta_gramaje').bind("focus", {mantenerSeleccion: true}, set_lp_sobrecubierta_gramaje);
|
||||||
$('#lp_sobrecubierta_gramaje').on('change', function(){
|
$('#lp_sobrecubierta_gramaje').on('change', function(){
|
||||||
var previous = $(this).data('val');
|
var previous = $(this).data('val');
|
||||||
const selected = $("select#lp_sobrecubierta_gramaje option:selected");
|
const selected = $("select#lp_sobrecubierta_gramaje option:selected");
|
||||||
@ -4256,6 +4373,14 @@ function getLomoCubiertaLineasPresupuesto(){
|
|||||||
/***********************
|
/***********************
|
||||||
* Funciones LP GUARDAS
|
* Funciones LP GUARDAS
|
||||||
************************/
|
************************/
|
||||||
|
function change_papelGenerico_lp_guardas(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_guardas_papel option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_guardas(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function clear_lp_guardas(clear_selectors){
|
function clear_lp_guardas(clear_selectors){
|
||||||
let pags = $("#lp_guardas_paginas option:selected" ).val()
|
let pags = $("#lp_guardas_paginas option:selected" ).val()
|
||||||
$(".lp-guardas-input" ).val("0")
|
$(".lp-guardas-input" ).val("0")
|
||||||
@ -4409,7 +4534,7 @@ function fill_lp_guardas(row, fromComparador=false){
|
|||||||
|
|
||||||
function eventos_lp_guardas(isInkjet = false){
|
function eventos_lp_guardas(isInkjet = false){
|
||||||
|
|
||||||
$('#lp_guardas_papel').bind("change", {clear_selectors: true}, clear_lp_guardas);
|
$('#lp_guardas_papel').bind("change", change_papelGenerico_lp_guardas);
|
||||||
$('#lp_guardas_papelImpresion').focus("focus", set_lp_guardas_papelImpresion);
|
$('#lp_guardas_papelImpresion').focus("focus", set_lp_guardas_papelImpresion);
|
||||||
$('#lp_guardas_maquina').bind("focus", set_lp_guardas_maquina);
|
$('#lp_guardas_maquina').bind("focus", set_lp_guardas_maquina);
|
||||||
$('#lp_guardas_maquina').bind("change", calcularPresupuesto_guardas);
|
$('#lp_guardas_maquina').bind("change", calcularPresupuesto_guardas);
|
||||||
|
|||||||
14261
xdebug.log
14261
xdebug.log
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user