Arreglado precio ud en tabla

This commit is contained in:
Ignacio Martinez Navajas
2025-06-05 09:28:30 +02:00
parent 5058ae488b
commit b1cd63f665
2 changed files with 8 additions and 3 deletions

View File

@ -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">