mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'add/guardas_negro_hq' into 'main'
añadida posibilidad de guardas negrohq See merge request jjimenez/safekat!541
This commit is contained in:
@ -720,8 +720,7 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
|||||||
$tipo_impresion_id = $this->request->getPost('tipo_impresion_id');
|
$tipo_impresion_id = $this->request->getPost('tipo_impresion_id');
|
||||||
$uso = $this->request->getPost('uso');
|
$uso = $this->request->getPost('uso');
|
||||||
|
|
||||||
// cubierta y sobrecubierta siempre colorhq
|
// guardas siempre hq
|
||||||
$isColor = true;
|
|
||||||
$isHq = true;
|
$isHq = true;
|
||||||
|
|
||||||
// Para el caso de Fresado y Cosido tapa dura, las guardas son un diptico
|
// Para el caso de Fresado y Cosido tapa dura, las guardas son un diptico
|
||||||
@ -1096,6 +1095,8 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
|||||||
$guardas = false;
|
$guardas = false;
|
||||||
if ($uso == 'guardas') {
|
if ($uso == 'guardas') {
|
||||||
$guardas = true;
|
$guardas = true;
|
||||||
|
$isColor = $this->request->getGet("isColor") ?? 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
$rotativa = false;
|
$rotativa = false;
|
||||||
if ($uso == 'rotativa') {
|
if ($uso == 'rotativa') {
|
||||||
|
|||||||
@ -2247,7 +2247,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
$input_data['datosPedido']->paginas_impresion = $datos_guardas['caras'] ?? 0;
|
$input_data['datosPedido']->paginas_impresion = $datos_guardas['caras'] ?? 0;
|
||||||
$input_data['datosPedido']->solapas_ancho = 0;
|
$input_data['datosPedido']->solapas_ancho = 0;
|
||||||
$input_data['datosPedido']->solapas = 0;
|
$input_data['datosPedido']->solapas = 0;
|
||||||
$input_data['isColor'] = 1;
|
$input_data['isColor'] = $isColor;
|
||||||
$input_data['isHq'] = 1;
|
$input_data['isHq'] = 1;
|
||||||
$input_data['uso'] = 'guardas';
|
$input_data['uso'] = 'guardas';
|
||||||
|
|
||||||
|
|||||||
@ -152,7 +152,7 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
|||||||
$POD = false,
|
$POD = false,
|
||||||
$ancho = 0,
|
$ancho = 0,
|
||||||
$alto = 0,
|
$alto = 0,
|
||||||
$tirada = 0
|
$tirada = 0,
|
||||||
) {
|
) {
|
||||||
/*
|
/*
|
||||||
1.-> Tipo impresion
|
1.-> Tipo impresion
|
||||||
|
|||||||
@ -305,7 +305,7 @@ class PresupuestoAdminEdit {
|
|||||||
|
|
||||||
if (self.cargandoPresupuesto == false) {
|
if (self.cargandoPresupuesto == false) {
|
||||||
|
|
||||||
self.comparador.updateComparador();
|
//self.comparador.updateComparador();
|
||||||
|
|
||||||
// Ejecutar los pasos de forma secuencial si están habilitados
|
// Ejecutar los pasos de forma secuencial si están habilitados
|
||||||
if (update_lineas) {
|
if (update_lineas) {
|
||||||
|
|||||||
@ -544,7 +544,7 @@ class Comparador {
|
|||||||
this.gramajeSobrecubierta.setOption(datos.json_data.sobrecubierta.gramaje, datos.json_data.sobrecubierta.gramaje);
|
this.gramajeSobrecubierta.setOption(datos.json_data.sobrecubierta.gramaje, datos.json_data.sobrecubierta.gramaje);
|
||||||
}
|
}
|
||||||
if (datos.json_data.guardas) {
|
if (datos.json_data.guardas) {
|
||||||
this.carasGuardas.val(datos.json_data.guardas.paginas_impresion).trigger('change');
|
this.carasGuardas.val(datos.json_data.guardas.paginas).trigger('change');
|
||||||
this.papelGuardas.setOption(datos.json_data.guardas.papel_id, datos.json_data.guardas.papel_nombre);
|
this.papelGuardas.setOption(datos.json_data.guardas.papel_id, datos.json_data.guardas.papel_nombre);
|
||||||
this.gramajeGuardas.setOption(datos.json_data.guardas.gramaje, datos.json_data.guardas.gramaje);
|
this.gramajeGuardas.setOption(datos.json_data.guardas.gramaje, datos.json_data.guardas.gramaje);
|
||||||
}
|
}
|
||||||
@ -1023,8 +1023,10 @@ class Comparador {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.cargando)
|
if (!this.cargando){
|
||||||
$('#paginas').trigger('change');
|
$('#paginas').trigger('change');
|
||||||
|
this.updateComparador();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getDataForComp(uso = 'interior') {
|
getDataForComp(uso = 'interior') {
|
||||||
@ -1891,7 +1893,7 @@ class Comparador {
|
|||||||
try {
|
try {
|
||||||
guardas_obj = {
|
guardas_obj = {
|
||||||
"guardas": {
|
"guardas": {
|
||||||
'paginas_impresion': $('#compCarasGuardas option:selected').val(),
|
'paginas': $('#compCarasGuardas option:selected').val(),
|
||||||
'papel_id': $('#compPapelGuardas').select2('data')[0].id,
|
'papel_id': $('#compPapelGuardas').select2('data')[0].id,
|
||||||
'gramaje': $('#compGramajeGuardas').select2('data')[0].text.trim(),
|
'gramaje': $('#compGramajeGuardas').select2('data')[0].text.trim(),
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1507,6 +1507,21 @@ class LineasPresupuesto {
|
|||||||
if (linea == 'lp_bn' || linea == 'lp_bnhq' || linea == 'lp_rot_bn') {
|
if (linea == 'lp_bn' || linea == 'lp_bnhq' || linea == 'lp_rot_bn') {
|
||||||
color = 0;
|
color = 0;
|
||||||
}
|
}
|
||||||
|
else if(linea == 'lp_guardas'){
|
||||||
|
if(fromComparador){
|
||||||
|
color = $('#tipoImpresion').val().includes('color') ? 1 : 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
for (let i = 0; i < this.table.rows().data().length; i++) {
|
||||||
|
let row = this.table.row(i).data();
|
||||||
|
if (row.row_id == 'lp_color' || row.row_id == 'lp_colorhq' || row.row_id == 'lp_rot_color') {
|
||||||
|
color = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
color = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
let hq = 1;
|
let hq = 1;
|
||||||
if (linea == 'lp_bn' || linea == 'lp_color' || linea == 'lp_rot_bn' || linea == 'lp_rot_color') {
|
if (linea == 'lp_bn' || linea == 'lp_color' || linea == 'lp_rot_bn' || linea == 'lp_rot_color') {
|
||||||
hq = 0;
|
hq = 0;
|
||||||
@ -1723,12 +1738,21 @@ class LineasPresupuesto {
|
|||||||
tipo = 'color';
|
tipo = 'color';
|
||||||
break;
|
break;
|
||||||
case 'lp_colorhq':
|
case 'lp_colorhq':
|
||||||
case 'lp_guardas':
|
|
||||||
case 'lp_cubierta':
|
case 'lp_cubierta':
|
||||||
case 'lp_sobrecubierta':
|
case 'lp_sobrecubierta':
|
||||||
case 'lp_faja':
|
case 'lp_faja':
|
||||||
tipo = 'colorhq';
|
tipo = 'colorhq';
|
||||||
break
|
break
|
||||||
|
case 'lp_guardas':
|
||||||
|
tipo = 'negrohq';
|
||||||
|
for (let i = 0; i < this.table.rows().data().length; i++) {
|
||||||
|
let row = this.table.row(i).data();
|
||||||
|
if (row.row_id == 'lp_color' || row.row_id == 'lp_colorhq' || row.row_id == 'lp_rot_color') {
|
||||||
|
tipo = 'colorhq';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1789,7 +1813,7 @@ class LineasPresupuesto {
|
|||||||
papel_impresion.init();
|
papel_impresion.init();
|
||||||
|
|
||||||
let merma = uso == 'interior' ? $('#merma').val() : $('#mermacubierta').val();
|
let merma = uso == 'interior' ? $('#merma').val() : $('#mermacubierta').val();
|
||||||
uso = ((uso == 'guardas') ? 'cubierta' : uso);
|
uso = ((uso == 'guardas') ? 'interior' : uso);
|
||||||
|
|
||||||
let maquinas = new ClassSelect($('#' + tipoLinea + '_maquina'),
|
let maquinas = new ClassSelect($('#' + tipoLinea + '_maquina'),
|
||||||
'/presupuestoadmin/maquinas', 'Seleccione maquina', false,
|
'/presupuestoadmin/maquinas', 'Seleccione maquina', false,
|
||||||
|
|||||||
Reference in New Issue
Block a user