mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'bug/catalogo_historico' into 'main'
Arreglado precio ud en tabla See merge request jjimenez/safekat!848
This commit is contained in:
@ -252,11 +252,12 @@ class CatalogoLibros extends BaseResourceController
|
||||
't1.id',
|
||||
't1.created_at',
|
||||
't1.tirada',
|
||||
'(CASE WHEN t1.tirada > 0 THEN t1.total / t1.tirada ELSE 0 END)',
|
||||
't1.total',
|
||||
't1.estado'
|
||||
])
|
||||
->edit('total', fn($row) => number_format((float) $row->total, 2, ',', '.') . ' €')
|
||||
->edit('precio_ud', fn($row) => number_format((float) $row->total, 2, ',', '.') . ' €')
|
||||
->edit('precio_ud', fn($row) => number_format((float) $row->precio_ud, 2, ',', '.') . ' €')
|
||||
->edit('created_at', fn($row) => date('d/m/Y', strtotime($row->created_at)))
|
||||
->add('actionBtns', function ($row) {
|
||||
return '<div class="btn-group btn-group-sm">
|
||||
|
||||
@ -299,7 +299,11 @@ class Catalogo {
|
||||
|
||||
// Ajustar al ancho de contenendor la tabla de historizo de pedidos
|
||||
$('#collapsePedidos').on('shown.bs.collapse', function () {
|
||||
$('#tablaPedidosAntiguos').DataTable().columns.adjust().responsive.recalc();
|
||||
const table = $('#tablaPedidosAntiguos').DataTable();
|
||||
table.columns.adjust();
|
||||
if (typeof table.responsive !== 'undefined') {
|
||||
table.responsive.recalc();
|
||||
}
|
||||
});
|
||||
|
||||
// Al cargar la página
|
||||
@ -371,7 +375,7 @@ class Catalogo {
|
||||
{ data: 'id' },
|
||||
{ data: 'created_at' },
|
||||
{ data: 'tirada' },
|
||||
{ data: 'precio_ud' , searchable: false, orderable: false },
|
||||
{ data: 'precio_ud' },
|
||||
{ data: 'total' },
|
||||
{ data: 'estado' },
|
||||
{ data: 'actionBtns' }
|
||||
|
||||
Reference in New Issue
Block a user