añadidos totales a tarifas de clientes

This commit is contained in:
2025-04-06 19:35:39 +02:00
parent e5b2bc19d4
commit 2de72e4278
6 changed files with 33 additions and 13 deletions

View File

@ -20,6 +20,7 @@ return [
'tiempo_max' => 'Tiempo Máx.',
'precio_hora' => 'Precio hora',
'margen' => 'Margen',
'total_precio_hora' => 'Total precio h.',
'cliente_id' => 'Cliente',
'user_updated_id' => 'Usuario edición',
'updated_at' => 'Fecha edición',

View File

@ -147,7 +147,7 @@ class ClientePlantillaPreciosLineasModel extends \App\Models\BaseModel
"t1.id as id, t1.tipo AS tipo, t1.tipo_maquina AS tipo_maquina, t1.tipo_impresion AS tipo_impresion,
t1.tiempo_min AS tiempo_min, t1.tiempo_max AS tiempo_max, t1.precio_hora AS precio_hora, t1.margen AS margen,
t1.user_updated_id AS user_updated_id, t1.updated_at AS updated_at, CONCAT(t2.first_name, ' ', t2.last_name) AS user_updated,
t1.id AS DT_RowId"
t1.id AS DT_RowId, t1.precio_hora*(1+t1.margen/100.0) as total_precio_hora"
);
$builder->join("users t2", "t1.user_updated_id = t2.id", "left");

View File

@ -601,8 +601,9 @@
<th><?= lang('ClientePrecios.tipo_impresion') ?></th>
<th><?= lang('ClientePrecios.tiempo_min') ?></th>
<th><?= lang('ClientePrecios.tiempo_max') ?></th>
<th><?= lang('ClientePrecios.precio_hora') ?></th>
<th><?= lang('ClientePrecios.margen') ?></th>
<th class="noFilter"><?= lang('ClientePrecios.precio_hora') ?></th>
<th class="noFilter"><?= lang('ClientePrecios.margen') ?></th>
<th class="noFilter"><?= lang('ClientePrecios.total_precio_hora') ?></th>
<th class="noFilter"><?= lang('ClientePrecios.user_updated_id') ?></th>
<th class="noFilter"><?= lang('ClientePrecios.updated_at') ?></th>
<th class="noFilter noVis">plantilla_id</th>

View File

@ -62,8 +62,9 @@
<th><?= lang('ClientePrecios.tipo_impresion') ?></th>
<th><?= lang('ClientePrecios.tiempo_min') ?></th>
<th><?= lang('ClientePrecios.tiempo_max') ?></th>
<th><?= lang('ClientePrecios.precio_hora') ?></th>
<th><?= lang('ClientePrecios.margen') ?></th>
<th class="noFilter"><?= lang('ClientePrecios.precio_hora') ?></th>
<th class="noFilter"><?= lang('ClientePrecios.margen') ?></th>
<th class="noFilter"><?= lang('ClientePrecios.total_precio_hora') ?></th>
<th><?= lang('ClientePrecios.user_updated_id') ?></th>
<th class="noFilter"><?= lang('ClientePrecios.updated_at') ?></th>
<th class="text-nowrap noFilter" style="min-width:100px"><?= lang('Basic.global.Action') ?>