diff --git a/ci4/app/Controllers/Albaranes/Albaran.php b/ci4/app/Controllers/Albaranes/Albaran.php index 3531c2c4..109d00f0 100755 --- a/ci4/app/Controllers/Albaranes/Albaran.php +++ b/ci4/app/Controllers/Albaranes/Albaran.php @@ -175,6 +175,13 @@ class Albaran extends \App\Controllers\BaseResourceController return $this->respond($data); } + if($fieldName == 'fecha_albaran'){ + if($fieldValue == null || $fieldValue == '') + $fieldValue = null; + else + $fieldValue = date('Y-m-d H:i:s', strtotime($fieldValue)); + } + $albaranEntity->fill([ $fieldName => $fieldValue, 'user_updated_id' => auth()->user()->id, diff --git a/ci4/app/Entities/Albaranes/AlbaranEntity.php b/ci4/app/Entities/Albaranes/AlbaranEntity.php index 6c2d61e3..b5928c10 100755 --- a/ci4/app/Entities/Albaranes/AlbaranEntity.php +++ b/ci4/app/Entities/Albaranes/AlbaranEntity.php @@ -14,6 +14,7 @@ class AlbaranEntity extends \CodeIgniter\Entity\Entity 'mostrar_precios' => null, 'direccion_albaran' => null, 'att_albaran' => null, + 'fecha_albaran' => null, 'user_created_id' => null, 'user_updated_id' => null, 'created_at' => null, @@ -38,6 +39,7 @@ class AlbaranEntity extends \CodeIgniter\Entity\Entity 'att_albaran' => '?string', 'user_created_id' => 'integer', 'user_updated_id' => 'integer', + 'fecha_albaran' => '?datetime', ]; // Agrega tus métodos personalizados aquí diff --git a/ci4/app/Models/Albaranes/AlbaranModel.php b/ci4/app/Models/Albaranes/AlbaranModel.php index acd67487..42b492f2 100644 --- a/ci4/app/Models/Albaranes/AlbaranModel.php +++ b/ci4/app/Models/Albaranes/AlbaranModel.php @@ -22,6 +22,7 @@ class AlbaranModel extends \App\Models\BaseModel 'numero_albaran', 'mostrar_precios', 'direccion_albaran', + 'fecha_albaran', 'att_albaran', 'user_created_id', 'user_updated_id', diff --git a/ci4/app/Views/themes/vuexy/form/logistica/viewEnvioEditForm.php b/ci4/app/Views/themes/vuexy/form/logistica/viewEnvioEditForm.php index 4214feea..d9016dc6 100644 --- a/ci4/app/Views/themes/vuexy/form/logistica/viewEnvioEditForm.php +++ b/ci4/app/Views/themes/vuexy/form/logistica/viewEnvioEditForm.php @@ -283,6 +283,7 @@ +"> = $this->endSection() ?> @@ -290,7 +291,5 @@ - - = $this->endSection() ?> \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/pdfs/albaran.php b/ci4/app/Views/themes/vuexy/pdfs/albaran.php index f7effbe6..00ebc343 100755 --- a/ci4/app/Views/themes/vuexy/pdfs/albaran.php +++ b/ci4/app/Views/themes/vuexy/pdfs/albaran.php @@ -52,7 +52,7 @@ FECHA: