Primer commit del sistema avantika sin cambios
This commit is contained in:
100
javascript/reportes-inventario.js
Executable file
100
javascript/reportes-inventario.js
Executable file
@@ -0,0 +1,100 @@
|
||||
function Rinventario()
|
||||
{
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/reportes-inventario.php',
|
||||
{
|
||||
method:'post',
|
||||
parameters:$('formInven').serialize(true),
|
||||
onLoading: function(req){
|
||||
$('loadBusqueda').show();
|
||||
$('contenido').innerHTML = "";
|
||||
},
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
$('loadBusqueda').hide();
|
||||
$("contenido").innerHTML = response;
|
||||
TableKit.reloadTable('tblReporte');
|
||||
},
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function ExportInv()
|
||||
{
|
||||
$('formInven').submit();
|
||||
return true;
|
||||
}
|
||||
|
||||
function LoadSubcats(){
|
||||
|
||||
var catId = $("prodCatId").value;
|
||||
|
||||
$("enumSubcats").innerHTML = '';
|
||||
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/reportes-inventario.php',{
|
||||
method:'post',
|
||||
parameters: {type:"loadSubcats", prodCatId:catId},
|
||||
onLoading: function(){
|
||||
$("enumSubcats").innerHTML = LOADER;
|
||||
},
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
var splitResponse = response.split("[#]");
|
||||
|
||||
$("enumSubcats").innerHTML = "";
|
||||
|
||||
if(splitResponse[0] == "ok")
|
||||
$("enumSubcats").innerHTML = splitResponse[1];
|
||||
|
||||
},
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
});
|
||||
|
||||
}//LoadSubcats
|
||||
|
||||
|
||||
function ShowDesc(id){
|
||||
|
||||
var resp = $("totales"+id).style.display;
|
||||
var status;
|
||||
var txt;
|
||||
|
||||
if(resp == "none"){
|
||||
status = "";
|
||||
txt = "[-]";
|
||||
}else{
|
||||
status = "none";
|
||||
txt = "[+]";
|
||||
}
|
||||
|
||||
$("totales"+id).style.display = status;
|
||||
$("showHide"+id).innerHTML = txt;
|
||||
|
||||
}
|
||||
|
||||
function ShowHideGral(){
|
||||
|
||||
var chks = document.getElementsByName('idS[]');
|
||||
var resp = $("showHideG").innerHTML;
|
||||
|
||||
if(resp == "[+] TODOS"){
|
||||
status = "";
|
||||
txt = "[-]";
|
||||
txtG = "[-] TODOS"
|
||||
}else{
|
||||
status = "none";
|
||||
txt = "[+]";
|
||||
txtG = "[+] TODOS";
|
||||
}
|
||||
|
||||
for (var i=0; i<chks.length; i++)
|
||||
{
|
||||
var id = chks[i].value;
|
||||
|
||||
$("totales"+id).style.display = status;
|
||||
$("showHide"+id).innerHTML = txt;
|
||||
}
|
||||
|
||||
$("showHideG").innerHTML = txtG;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user