mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadidos totales a tarifas de clientes
This commit is contained in:
@ -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',
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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') ?>
|
||||
|
||||
@ -141,10 +141,12 @@ class tarifasClienteView {
|
||||
name: "precio_hora"
|
||||
}, {
|
||||
name: "margen"
|
||||
}, {
|
||||
name: "total_precio_hora",
|
||||
type: 'hidden',
|
||||
}, {
|
||||
name: "user_updated_id",
|
||||
type: 'hidden',
|
||||
|
||||
}, {
|
||||
name: "updated_at",
|
||||
type: 'hidden',
|
||||
@ -365,10 +367,17 @@ class tarifasClienteView {
|
||||
return window.language.ClientePrecios.colorhq;
|
||||
}
|
||||
},
|
||||
{ 'data': 'tiempo_min' },
|
||||
{ 'data': 'tiempo_max' },
|
||||
{ 'data': 'precio_hora' },
|
||||
{ 'data': 'tiempo_min', render: (d) => `<span class="autonumeric">${d}</span>`},
|
||||
{ 'data': 'tiempo_max', render: (d) => `<span class="autonumeric">${d}</span>`},
|
||||
{ 'data': 'precio_hora', render: (d) => `<span class="autonumeric">${d}</span>`},
|
||||
{ 'data': 'margen' },
|
||||
{
|
||||
'data': 'total_precio_hora',
|
||||
'render': function (data, type, row, meta) {
|
||||
const value = row.precio_hora*(1+row.margen/100.0);
|
||||
return `<span class="autonumeric">${value}</span>`;
|
||||
}
|
||||
},
|
||||
{ 'data': 'user_updated' },
|
||||
{ 'data': 'updated_at' },
|
||||
{
|
||||
|
||||
@ -192,7 +192,11 @@ class PlantillasTarifasClienteForm {
|
||||
name: "precio_hora"
|
||||
}, {
|
||||
name: "margen"
|
||||
}, {
|
||||
},{
|
||||
name: "total_precio_hora",
|
||||
type: "hidden"
|
||||
},
|
||||
{
|
||||
name: "user_updated",
|
||||
type: "hidden",
|
||||
def: ''
|
||||
@ -560,10 +564,14 @@ class PlantillasTarifasClienteForm {
|
||||
return window.language.ClientePrecios.colorhq;
|
||||
}
|
||||
},
|
||||
{ 'data': 'tiempo_min' },
|
||||
{ 'data': 'tiempo_max' },
|
||||
{ 'data': 'precio_hora' },
|
||||
{ 'data': 'tiempo_min', render: (d) => `<span class="autonumeric">${d}</span>` },
|
||||
{ 'data': 'tiempo_max', render: (d) => `<span class="autonumeric">${d}</span>` },
|
||||
{ 'data': 'precio_hora', render: (d) => `<span class="autonumeric">${d}</span>` },
|
||||
{ 'data': 'margen' },
|
||||
{ 'data': 'total_precio_hora', render: (d, t, r) => {
|
||||
const value = r.precio_hora*(1+r.margen/100.0);
|
||||
return `<span class="autonumeric">${value}</span>`;
|
||||
}},
|
||||
{ 'data': 'user_updated' },
|
||||
{ 'data': 'updated_at' },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user