From 756578a25105c1f71d7078613d2f25697edaad47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Wed, 19 Mar 2025 19:41:17 +0100 Subject: [PATCH] =?UTF-8?q?a=C3=B1adido=20footer=20con=20los=20usuarios=20?= =?UTF-8?q?en=20pedidos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ci4/app/Controllers/Pedidos/Pedido.php | 8 +++++++- .../vuexy/form/pedidos/viewPedidoForm.php | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ci4/app/Controllers/Pedidos/Pedido.php b/ci4/app/Controllers/Pedidos/Pedido.php index 4cfa2a1d..864933e1 100755 --- a/ci4/app/Controllers/Pedidos/Pedido.php +++ b/ci4/app/Controllers/Pedidos/Pedido.php @@ -273,8 +273,8 @@ class Pedido extends \App\Controllers\BaseResourceController $this->obtenerDatosFormulario($pedidoEntity); - $this->viewData['pedidoEntity'] = $pedidoEntity; + $this->viewData['pedidoEntity'] = $pedidoEntity; $this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('Pedidos.moduleTitle') . ' ' . lang('Basic.global.edit3'); @@ -382,6 +382,12 @@ class Pedido extends \App\Controllers\BaseResourceController $pedidoEntity->fecha_impresion_text = $pedidoEntity->fecha_impresion ? date('d/m/Y', strtotime($pedidoEntity->fecha_impresion)) : ''; $pedidoEntity->fecha_encuadernado_text = $pedidoEntity->fecha_encuadernado ? date('d/m/Y', strtotime($pedidoEntity->fecha_encuadernado)) : ''; $pedidoEntity->fecha_entrega_externo_text = $pedidoEntity->fecha_entrega_externo ? date('d/m/Y', strtotime($pedidoEntity->fecha_entrega_externo)) : ''; + + $userModel = model('App\Models\UserModel'); + $pedidoEntity->created_by = $userModel->getFullName($pedidoEntity->user_created_id); + $pedidoEntity->updated_by = $userModel->getFullName($pedidoEntity->user_updated_id); + $pedidoEntity->created_at_footer = $pedidoEntity->created_at ? date(' H:i d/m/Y', strtotime($pedidoEntity->created_at)) : ''; + $pedidoEntity->updated_at_footer = $pedidoEntity->updated_at ? date(' H:i d/m/Y', strtotime($pedidoEntity->updated_at)) : ''; } public function get_xml_pedido($pedido_id) { diff --git a/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidoForm.php b/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidoForm.php index a0a9bf5f..d9c4e92c 100644 --- a/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidoForm.php +++ b/ci4/app/Views/themes/vuexy/form/pedidos/viewPedidoForm.php @@ -36,7 +36,22 @@ - + + +
+
+

+ + created_by ?>, + created_at_footer ?> +

+
+
+

+ + updated_by ?>, + updated_at_footer ?> +