-
- = lang("Presupuestos.tipoImpresion") ?>
-
+ = lang('Presupuestos.tipoImpresion') ?>
-
+
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
- = lang("Presupuestos.papelesComparadorPresupuestoAdmin") ?>
-
-
-
-
-
-
-
-
- = lang("Presupuestos.numeroPaginas") ?>
-
-
-
-
- = lang("Presupuestos.papel") ?>
-
-
-
-
- = lang("Presupuestos.gramaje") ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- = lang('MaquinasTarifasImpresions.negro') ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- = lang('MaquinasTarifasImpresions.color') ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- = lang('PapelImpresion.cubierta') ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- = lang('PapelImpresion.sobrecubierta') ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ // Función única para renderizar cualquier fila, con clase opcional
+ $renderRow = function (array $cellsHtml, string $rowClass = '') use ($cols) {
+ $classAttr = $rowClass ? " {$rowClass}-line" : '';
+ echo "
";
+ foreach ($cellsHtml as $i => $cell) {
+ $w = $cols[$i] ?? 2;
+ echo "
{$cell}
";
+ }
+ echo '
';
+ };
+ ?>
+
+
+
+
= lang('Presupuestos.papelesComparadorPresupuestoAdmin') ?>
-
+
+
+ ' . ($lbl ? lang("Presupuestos.$lbl") : '') . '';
+ }
+ echo '
';
+ foreach ($hdr as $i => $html) {
+ echo '
' . $html . '
';
+ }
+ echo '
';
+ ?>
+
+
+ {"{$tipo}_paginas"});
+ $papId = $catalogoLibrosEntity->{"{$tipo}_papel_id"};
+ $papNm = $catalogoLibrosEntity->{"{$tipo}PapelName"};
+ $gram = $catalogoLibrosEntity->{"{$tipo}_gramaje"};
+
+ $cells = [
+ '
' . lang("MaquinasTarifasImpresions.$tipo") . '
',
+ "
",
+ "
",
+ "
",
+ '', // solapas
+ '' // acabados
+ ];
+ $renderRow($cells, $tipo);
+ endforeach; ?>
+
+
+ ['faces' => [2 => 'unaCara', 4 => 'dosCaras'], 'disable' => false],
+ 'sobrecubierta' => ['faces' => [0 => 'no', 1 => 'si'], 'disable' => in_array($catalogoLibrosEntity->tipo_impresion_id, [5, 6, 7, 8, 21])]
+ ];
+ foreach ($especiales as $tipo => $cfg):
+ $pag = $catalogoLibrosEntity->{"{$tipo}_paginas"};
+ $papId = $catalogoLibrosEntity->{"{$tipo}_papel_id"};
+ $papNm = $catalogoLibrosEntity->{"{$tipo}PapelName"};
+ $gram = $catalogoLibrosEntity->{"{$tipo}_gramaje"};
+ $sol = old("{$tipo}_solapas_ancho", $catalogoLibrosEntity->{"{$tipo}_solapas_ancho"});
+ $acId = $catalogoLibrosEntity->{"{$tipo}_acabado_id"};
+ $acNm = $catalogoLibrosEntity->{"{$tipo}AcabadoName"};
+
+ $optPag = '';
+ foreach ($cfg['faces'] as $v => $lbl) {
+ $sel = $pag == $v ? ' selected' : '';
+ $optPag .= "
";
+ }
+
+ $cells = [
+ '
' . lang("PapelImpresion.$tipo") . '
',
+ "
",
+ "
",
+ "
",
+ "
",
+ "
",
+ ];
+ $renderRow($cells);
+ endforeach;
+ ?>
diff --git a/httpdocs/assets/js/safekat/pages/catalogo/catalogo.js b/httpdocs/assets/js/safekat/pages/catalogo/catalogo.js
index 8110d9d0..66d6a074 100644
--- a/httpdocs/assets/js/safekat/pages/catalogo/catalogo.js
+++ b/httpdocs/assets/js/safekat/pages/catalogo/catalogo.js
@@ -10,9 +10,9 @@ class Catalogo {
this.cliente = new ClassSelect($("#cliente_id"), '/catalogo/libros/clientlist', "Seleccione un cliente");
this.tipo_impresion = $("#tipo_impresion");
- this.caras_cubierta = $("#compCarasCubierta");
+ this.paginas_cubierta = $("#cubierta_paginas");
- this.encuadernacion = new ClassSelect($("#encuadernacion"), '/importador/getencuadernacion', "Seleccione una encuadernación");
+ this.encuadernacion = new ClassSelect($("#encuadernacion_id"), '/importador/getencuadernacion', "Seleccione una encuadernación");
this.compPapelNegro = new ClassSelect($("#negro_papel_id"), '/presupuestoadmin/papelgenerico', "Seleccione un papel", false,
{
@@ -26,7 +26,7 @@ class Catalogo {
tipo: () => this.tipo_impresion.val().includes('hq') ? 'negrohq' : 'negro',
});
- this.compPapelNegroPod = new ClassSelect($("#compPapelNegroPod"), '/presupuestoadmin/papelgenerico', "Seleccione un papel", false,
+ this.compPapelNegroPod = new ClassSelect($("#negro_pod_papel_id"), '/presupuestoadmin/papelgenerico', "Seleccione un papel", false,
{
tipo_impresion: () => this.encuadernacion.getVal(),
tirada: () => this.tirada_pod,
@@ -150,12 +150,13 @@ class Catalogo {
this.cliente.init();
this.tipo_impresion.select2();
- this.caras_cubierta.select2();
+ this.paginas_cubierta.select2();
this.paginasSobrecubierta.select2();
this.encuadernacion.init();
this.compPapelNegro.init();
+ this.compPapelNegroPod.init();
this.compGramajeNegro.init();
this.compPapelColor.init();
this.compGramajeColor.init();
@@ -202,8 +203,8 @@ class Catalogo {
$('.color_items').off('change');
const selValue = this.tipo_impresion.val();
- const elements_negro = $('.negro-selected');
- const elements_color = $('.color-selected');
+ const elements_negro = $('.negro-line');
+ const elements_color = $('.color-line');
if (selValue.includes('color')) {
Array.from(elements_color).forEach(element => {