//para agregar servicios (valores en campos ocultos)
$("#btn-agregar-servicio").on("click",function(){
data = $(this).val();
if (data !='') {
infoservicio = data.split("*");
html = "";
html += ""+infoservicio1+"";
html += ""+infoservicio[2]+"";
html += "";
html += ""+infoservicio[2]+"";
html += ""; html += "";
$("#tbordenes tbody").append(html);
sumarOrden();
$("#btn-agregar-servicio").val(null);
$("#servicio").val(null);
}else{
alert("Seleccione un servicio válido ...");
}
});
// columna de detalle servicio para tabla
$(document).on("keyup","#tbordenes input.cantidades", function(){
cantidad = $(this).val();
precio = $(this).closest("tr").find("td:eq(1)").text();
importe = cantidad * precio;
$(this).closest("tr").find("td:eq(3)").children("p").text(importe.toFixed(2));
$(this).closest("tr").find("td:eq(3)").children("input").val(importe);
sumar();
});