Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function fnMostrarTipoCosteo(unidad){
  2.    var tipoProd = $("#tipo_producto_id").val();
  3.    if (tipoProd == "2" || tipoProd ==  "6" || tipoProd == "7") {
  4.       $("#section_tipo_costeo").show();
  5.       $("#section_costo_unitario").removeClass("hide");
  6.       $(".especificacion").removeClass("hide");
  7.       fnCargarUnidadesMedida(unidad);
  8.    } else {
  9.       $("#section_tipo_costeo").hide();
  10.       $("#section_costo_unitario").addClass("hide");
  11.       if (tipoProd == "1") {
  12.          if (unidad == "ACT") {
  13.             fnCargarUnidadesMedida(unidad);
  14.             $("#cve_sat_um").select2().val("ACT").trigger("change");
  15.          } else {
  16.             fnCargarUnidadesMedida("E48");
  17.          }
  18.          $("#cve_sat_um").select2().val("E48").trigger("change");
  19.          $(".especificacion").addClass("hide");
  20.       } else if (tipoProd == "4") {
  21.          fnCargarUnidadesMedida("H87");
  22.          $("#cve_sat_um").select2().val("H87").trigger("change");
  23.          $(".especificacion").addClass("hide");
  24.       } else {
  25.          $("#cve_sat_um").select2().val("").trigger("change");
  26.          $(".especificacion").removeClass("hide");
  27.          fnCargarUnidadesMedida(unidad);
  28.       }
  29.    }
  30.    if (tipoProd == "1" || tipoProd == "4") {
  31.       tabla_precios.clear();
  32.       fnCargarPrecios(0);
  33.    } else {
  34.       tabla_precios.clear();
  35.       fnCargarPrecios(1);
  36.    }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement