mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'bug/tiempo_t_enc_presupuestos' into 'main'
arreglado que no se mostraba el tiempo cuando se añadian los servicios por defecto See merge request jjimenez/safekat!307
This commit is contained in:
@ -527,7 +527,7 @@ function init_servicio_encuadernado(){
|
||||
'</option>' +
|
||||
'</select>',
|
||||
'<span id="precio_unidad_encuadernado_' + element.tarifa_encuadernado_id + '">' + parseFloat(element.precio_unidad).toFixed(2) + '</span>',
|
||||
'<span id="tiempo_encuadernado_' + element.tiempo + '">' + convertirTiempo(element.tiempo) + '</span>',
|
||||
'<span id="tiempo_encuadernado_' + element.tarifa_encuadernado_id + '">' + convertirTiempo(element.tiempo) + '</span>',
|
||||
'<input class="update-totales-servicios" id="precio_total_encuadernado_' + element.tarifa_encuadernado_id +'" value="' + parseFloat(element.precio_total).toFixed(2) + '"></input>',
|
||||
'<span style="display: none;" class="update-totales" id="enc_margen_' + element.tarifa_encuadernado_id + '">' + parseFloat(element.margen).toFixed(2) + '</span>',
|
||||
'<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete-serv mx-2" data-id="' + element.tarifa_encuadernado_id +'"></i></a>'
|
||||
@ -590,7 +590,7 @@ function init_servicio_encuadernado(){
|
||||
}
|
||||
|
||||
function convertirTiempo(horas){
|
||||
if(horas != null && horas.length>0){
|
||||
if(horas != null){
|
||||
if(parseFloat(horas)>0){
|
||||
const seconds = parseFloat(horas) * 3600;
|
||||
// se convierte a formato hh:mm:ss
|
||||
@ -598,7 +598,7 @@ function convertirTiempo(horas){
|
||||
const minutos = Math.floor((seconds % 3600) / 60);
|
||||
const segundos = seconds % 60;
|
||||
return h + ':' + minutos + ':' + segundos;
|
||||
}
|
||||
}
|
||||
else{
|
||||
return "";
|
||||
}
|
||||
@ -719,7 +719,7 @@ async function get_tarifas_enc(tipo=null, tarifa_id = -1){
|
||||
'</option>' +
|
||||
'</select>',
|
||||
'<span id="precio_unidad_encuadernado_' + row.tarifa_id + '">' + parseFloat(row.precio_unidad).toFixed(2) + '</span>',
|
||||
'<span id="tiempo_encuadernado_' + row.tiempo + '">' + convertirTiempo(row.tiempo) + '</span>',
|
||||
'<span id="tiempo_encuadernado_' + row.tarifa_id + '">' + convertirTiempo(row.tiempo) + '</span>',
|
||||
'<input class="update-totales-servicios" id="precio_total_encuadernado_' + row.tarifa_id +'" value="' + parseFloat(row.total).toFixed(2) + '"></input>',
|
||||
'<span style="display: none;" class="update-totales" id="enc_margen_' + row.tarifa_id + '">' + parseFloat(row.margen).toFixed(2) + '</span>',
|
||||
'<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete-serv mx-2" data-id="' + row.tarifa_id +'"></i></a>'
|
||||
|
||||
Reference in New Issue
Block a user