añadido footer con los usuarios en facturas

This commit is contained in:
2025-03-19 19:38:05 +01:00
parent 8f6c86bad5
commit 63ec2c8bf0
2 changed files with 22 additions and 1 deletions

View File

@ -208,8 +208,13 @@ class Facturas extends \App\Controllers\BaseResourceController
['title' => lang("Facturas.facturaList"), 'route' => route_to('facturasList'), 'active' => true]
];
$userModel = model('App\Models\UserModel');
$factura->created_by = $userModel->getFullName($factura->user_created_id);
$factura->updated_by = $userModel->getFullName($factura->user_updated_id);
$factura->created_at_footer = $factura->created_at ? date(' H:i d/m/Y', strtotime($factura->created_at)) : '';
$factura->updated_at_footer = $factura->updated_at ? date(' H:i d/m/Y', strtotime($factura->updated_at)) : '';
$this->viewData['facturaEntity'] = $factura;
$this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('Facturas.factura') . ' ' . lang('Basic.global.edit3');
return $this->displayForm(__METHOD__, $id);

View File

@ -61,6 +61,22 @@
]
) ?>
</div><!-- /.card-footer -->
<div class="container-fluid d-flex flex-md-row flex-column justify-content-between align-items-md-center gap-1 container-p-x py-3">
<div class="col-md-6">
<p>
<strong><?= lang("Presupuestos.created_by_at") ?></strong>
<span id="created_by"><?= $facturaEntity->created_by ?></span>,
<span id="created_at"><?= $facturaEntity->created_at_footer ?></span>
</p>
</div>
<div class="col-md-6">
<p>
<strong><?= lang("Presupuestos.updated_by_at") ?></strong>
<span id="updated_by"><?= $facturaEntity->updated_by ?></span>,
<span id="updated_at_footer"><?= $facturaEntity->updated_at_footer ?></span>
</p>
</div>
</div>
</form>
</div><!-- //.card -->
</div><!--//.col -->