diff --git a/ci4/app/Controllers/Presupuestos/Presupuestocliente.php b/ci4/app/Controllers/Presupuestos/Presupuestocliente.php
index 6cc24b8e..f4a2d642 100755
--- a/ci4/app/Controllers/Presupuestos/Presupuestocliente.php
+++ b/ci4/app/Controllers/Presupuestos/Presupuestocliente.php
@@ -114,9 +114,9 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
$datosPresupuesto->tapa = 'blanda';
$datosPresupuesto->clienteList = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
- $presupuestoEntity->estado = 1;
+ $presupuestoEntity->estado_id = 1;
- $this->viewData['formAction'] = route_to('crearPresupuestoCliente');
+ $this->viewData['formAction'] = 'add';
$this->viewData['paisList'] = $this->getPaisListItems();
@@ -131,8 +131,6 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
public function edit($requestedId = null)
{
- // JJO
- $session = session();
if ($requestedId == null) :
return $this->redirect2listView();
@@ -145,8 +143,6 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
return $this->redirect2listView('sweet-error', $message);
endif;
- $requestMethod = $this->request->getMethod();
-
$datosPresupuesto = (object)array();
$datosPresupuesto->POD = model('App\Models\Configuracion\ConfiguracionSistemaModel')->getPOD();
$datosPresupuesto->paisList = model('App\Models\Configuracion\PaisModel')->getAllForMenu('id, nombre', 'nombre', true);
@@ -181,7 +177,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
$this->generarResumen($presupuestoEntity);
}
- $this->viewData['formAction'] = route_to('updateCosidotapablanda', $id);
+ $this->viewData['formAction'] = 'edit';
$this->viewData['paisList'] = $this->getPaisListItems();
diff --git a/ci4/app/Controllers/Sistema/Intranet.php b/ci4/app/Controllers/Sistema/Intranet.php
index 48cb27a5..99d3b206 100644
--- a/ci4/app/Controllers/Sistema/Intranet.php
+++ b/ci4/app/Controllers/Sistema/Intranet.php
@@ -7,8 +7,6 @@ use CodeIgniter\Controller;
class Intranet extends Controller
{
-
-
function presupuestos($resource_name)
{
helper('file');
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_resumenItems.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_resumenItems.php
index 073147c5..aefaea35 100644
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_resumenItems.php
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_resumenItems.php
@@ -200,7 +200,7 @@ window.routes_resumen = {
duplicarPresupuesto: "= route_to('duplicarPresupuesto') ?>",
}
-estado_id==2): ?>
+estado_id===2): ?>
previewEsquemaCubierta(true);
const previewTemplate = `
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_tipoLibroItems.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_tipoLibroItems.php
index 41dc47e2..54cf1280 100644
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_tipoLibroItems.php
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/_tipoLibroItems.php
@@ -1,7 +1,7 @@
-
-
+
+
lomo_cubierta ?>>
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/disenioLibro.js b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/disenioLibro.js
index 10eb0d72..55bd31c1 100644
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/disenioLibro.js
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/disenioLibro.js
@@ -770,7 +770,15 @@ async function calcularPresupuesto() {
$('#divTiradasPrecio').append(html);
}
- }
+ }
+
+ if($('#resumen-libro').hasClass('active')) {
+ initDirecciones();
+ initTiradasDirecciones();
+ generarResumen();
+ previewEsquemaCubierta(true);
+ }
+
}
},
error: function (error) {
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/presupuestoCliente.js b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/presupuestoCliente.js
index bc660769..6c79f0ee 100644
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/presupuestoCliente.js
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/presupuestoCliente.js
@@ -344,7 +344,12 @@
}
});
});
-
+
+ var url = $(location).attr('href'); // Obtener URL actual
+ if (url.includes('/edit/')) { // Comprobar si la URL contiene 'edit'
+ validationStepper.to(4);
+ }
+
}
})();
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/previews.js b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/previews.js
index 67eb63fa..3ce56031 100644
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/previews.js
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/previews.js
@@ -811,6 +811,7 @@ function getObjetoToPreview() {
anchoLibro: parseInt(tamanio[0])
};
}
- //console.log(pvObj);
+ console.log($('#lomo_cubierta').val());
+
}
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php
index c0aa0184..e30c2454 100644
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoList.php
@@ -114,19 +114,40 @@ $('#tableOfPresupuestos thead tr:eq(1) th').each(function (i) {
$(this).html('');
// Agregar opciones al selector
- var selector = $('select', this);
- selector.append(''); // Opción vacía
- selector.append('');
- selector.append('');
- selector.append('');
- selector.append('');
- selector.append('');
- selector.append('');
- selector.append('');
- selector.append('');
- selector.append('');
+ var selectorTipo = $('select', this);
+ selectorTipo.append(''); // Opción vacía
+ selectorTipo.append('');
+ selectorTipo.append('');
+ selectorTipo.append('');
+ selectorTipo.append('');
+ selectorTipo.append('');
+ selectorTipo.append('');
+ selectorTipo.append('');
+ selectorTipo.append('');
+ selectorTipo.append('');
- selector.on('change', function () {
+ selectorTipo.on('change', function () {
+ var val = $.fn.dataTable.util.escapeRegex(
+ $(this).val()
+ );
+ theTable.column(i).search(val).draw();
+ });
+ }
+
+ else if (i == 8) {
+
+ else if (i == 7) {
+
+ // Agregar un selector en la tercera columna
+ $(this).html('');
+
+ // Agregar opciones al selector
+ var selectorEstado = $('select', this);
+ selectorEstado.append(''); // Opción vacía
+ selectorEstado.append('');
+ selectorEstado.append('');
+
+ selectorEstado.on('change', function () {
var val = $.fn.dataTable.util.escapeRegex(
$(this).val()
);
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php
index 247cd02b..20b52216 100644
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php
@@ -276,6 +276,8 @@ window.token_ajax= {= csrf_token() ?? "token" ?>: = csrf_token() ?>v};
});
initDisenioLibro();
+
+