Guest User

Untitled

a guest
Mar 14th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     $.ajax({
  2.         url: 'maskpos/cotiza.forma.php',
  3.         type: "POST",
  4.         data: "submit="+varSubmit,
  5.         async: false,
  6.         success: function(datos){
  7.             cotizaId = datos.replace(/(\r\n|\n|\r)/gm,"");
  8.             $('.fila').each(function(i) {
  9.                 filaId = $(this).attr("id");
  10.                 var tmpPos = filaId.search("-");
  11.                 var tmpId = filaId.substr(tmpPos+1);
  12.                
  13.                
  14.                 varSubmitDet = varSubmitDet + "&filaDet-" + i + "=";
  15.                 varSubmitDet = varSubmitDet + "," + $("#producto_id-"+tmpId).attr('name') + "=" + $("#producto_id-"+tmpId).val();
  16.                 varSubmitDet = varSubmitDet + "," + $("#descrip-"+tmpId).attr('name') + "=" + $("#descrip-"+tmpId).val();
  17.                 varSubmitDet = varSubmitDet + "," + $("#cantidad-"+tmpId).attr('name') + "=" + $("#cantidad-"+tmpId).val();
  18.                 varSubmitDet = varSubmitDet + "," + $("#precio-"+tmpId).attr('name') + "=" + $("#precio-"+tmpId).val();
  19.                 varSubmitDet = varSubmitDet + "," + $("#importe-"+tmpId).attr('name') + "=" + $("#importe-"+tmpId).val();              
  20.             });
  21.            
  22.             $.ajax({
  23.                 url: 'maskpos/cotiza.forma.php',
  24.                 type: "POST",
  25.                 async: false,
  26.                 data: "status="+status+"&cotizaId="+cotizaId+"&bodegaId="+bodegaId+"&submitdet="+varSubmitDet,
  27.                 success: function(debug){
  28.                     console.log(debug);
  29.                 }
  30.             });    
  31.         }      
  32.     });
Add Comment
Please, Sign In to add comment