diff --git a/ci4/app/Controllers/Clientes/Clientedirecciones.php b/ci4/app/Controllers/Clientes/Clientedirecciones.php index 5d5e25ec..fe170db6 100755 --- a/ci4/app/Controllers/Clientes/Clientedirecciones.php +++ b/ci4/app/Controllers/Clientes/Clientedirecciones.php @@ -53,7 +53,7 @@ class Clientedirecciones extends \App\Controllers\GoBaseResourceController if ($this->request->isAJAX()) { $reqData = $this->request->getPost(); - $tipo = $reqData['tipo'] ?? 0; + $tipo = $reqData['tipo'] ?? null; if(is_null($tipo)){ if (!isset($reqData['draw']) || !isset($reqData['columns'])) { @@ -81,12 +81,13 @@ class Clientedirecciones extends \App\Controllers\GoBaseResourceController )); } else{ + $id = $reqData['id'] ?? -1; $resourceData = $this->model->getDireccion($id); - return $resourceData; + return $this->respond($resourceData); } } else { return $this->failUnauthorized('Invalid request', 403); diff --git a/ci4/app/Controllers/Test.php b/ci4/app/Controllers/Test.php index 530a847a..8347aae8 100755 --- a/ci4/app/Controllers/Test.php +++ b/ci4/app/Controllers/Test.php @@ -19,7 +19,7 @@ class Test extends BaseController { $model = model('App\Models\Clientes\ClienteDireccionesModel'); echo '
';
- var_dump($model->getMenuDirecciones(1420));
+ var_dump($model->getDireccion(1));
echo '';
}
diff --git a/ci4/app/Language/en/PresupuestosDirecciones.php b/ci4/app/Language/en/PresupuestosDirecciones.php
index 72c5b040..28487dbe 100755
--- a/ci4/app/Language/en/PresupuestosDirecciones.php
+++ b/ci4/app/Language/en/PresupuestosDirecciones.php
@@ -15,6 +15,7 @@ return [
'peso' => 'Weight',
'cantidad' => 'Quantity',
'precio' => 'Price',
+ 'saveDirection' => 'Save to client addresses',
'validation' => [
'max_length' => 'Max. length ',
'required' => 'Field required',
diff --git a/ci4/app/Language/es/PresupuestosDirecciones.php b/ci4/app/Language/es/PresupuestosDirecciones.php
index 9c803d58..6785332b 100755
--- a/ci4/app/Language/es/PresupuestosDirecciones.php
+++ b/ci4/app/Language/es/PresupuestosDirecciones.php
@@ -17,6 +17,7 @@ return [
'peso' => 'Peso',
'cantidad' => 'Cantidad',
'precio' => 'Precio',
+ 'saveDirection' => 'Guardar en direcciones de cliente',
'validation' => [
'max_length' => 'Max. valor caracteres alcanzado',
'required' => 'Campo obligatorio',
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosEnvios.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosEnvios.php
index 360193e8..8219ce4f 100755
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosEnvios.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosEnvios.php
@@ -61,6 +61,7 @@ $('#insertar_direccion').on('click', function(){
var $newAddDialog = $("#addressForm")
var maximaCantidad = parseInt($('#tirada').val())
$("#add_cantidad").attr("max" , maximaCantidad);
+ $("#add_cantidad").val( maximaCantidad);
$("#add_cantidad").on('change', function(){
$("#add_cantidad").val(parseInt($("#add_cantidad").val())>maximaCantidad ? maximaCantidad : $("#add_cantidad").val())
})
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_presupuestoDireccionesForm.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_presupuestoDireccionesForm.php
index ef737def..c3820ade 100755
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_presupuestoDireccionesForm.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_presupuestoDireccionesForm.php
@@ -120,6 +120,20 @@
+