33 lines
814 B
JavaScript
Executable File
33 lines
814 B
JavaScript
Executable File
function AjustarInventario(invFisicoId){
|
|
|
|
var resp = confirm("Esta seguro de ajustar el inventario? Los productos se ajustaran a la cantidad fisica.");
|
|
|
|
if(!resp)
|
|
return;
|
|
|
|
new Ajax.Request(WEB_ROOT+'/ajax/inventario-fisico.php',
|
|
{
|
|
method:'post',
|
|
parameters: {type:"ajustarInventario", invFisicoId:invFisicoId},
|
|
onLoading: function(){
|
|
$("loader").show();
|
|
},
|
|
onSuccess: function(transport){
|
|
var response = transport.responseText || "no response text";
|
|
var splitResponse = response.split("[#]");
|
|
|
|
$("loader").hide();
|
|
|
|
if(splitResponse[0] == "ok"){
|
|
|
|
$("btnAjustar").hide();
|
|
|
|
ShowStatus(splitResponse[1]);
|
|
$('contenido').innerHTML = splitResponse[2];
|
|
HideFview();
|
|
}
|
|
},
|
|
onFailure: function(){ alert('Something went wrong...') }
|
|
});
|
|
|
|
} |