Primer commit del sistema avantika sin cambios
This commit is contained in:
65
javascript/analisis-venta.js
Executable file
65
javascript/analisis-venta.js
Executable file
@@ -0,0 +1,65 @@
|
||||
function Generar(){
|
||||
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/analisis-venta.php',
|
||||
{
|
||||
method:'post',
|
||||
parameters: $('frmAnalisisVta').serialize(),
|
||||
onLoading: function(){
|
||||
$("loader").innerHTML = LOADER2;
|
||||
},
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
var splitResponse = response.split("[#]");
|
||||
|
||||
$("loader").innerHTML = '';
|
||||
|
||||
if(splitResponse[0] == "fail"){
|
||||
ShowStatus(splitResponse[1]);
|
||||
HideFview();
|
||||
}else{
|
||||
$('contenido').innerHTML = splitResponse[1];
|
||||
HideFview();
|
||||
}
|
||||
},
|
||||
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function ShowProveedores(kS){
|
||||
|
||||
var status = $("prov_"+kS).style.display;
|
||||
var icon;
|
||||
|
||||
if(status == "none"){
|
||||
status = "";
|
||||
icon = "[-]";
|
||||
}else{
|
||||
status = "none";
|
||||
icon = "[+]";
|
||||
}
|
||||
|
||||
$("iconSuc_"+kS).innerHTML = icon;
|
||||
$("prov_"+kS).style.display = status;
|
||||
|
||||
}//ShowProveedores
|
||||
|
||||
function ShowProductos(kS, kP){
|
||||
|
||||
var status = $("prod_"+kS+"_"+kP).style.display;
|
||||
var icon;
|
||||
|
||||
if(status == "none"){
|
||||
status = "";
|
||||
icon = "[-]";
|
||||
}else{
|
||||
status = "none";
|
||||
icon = "[+]";
|
||||
}
|
||||
|
||||
$("iconProv_"+kS+"_"+kP).innerHTML = icon;
|
||||
$("prod_"+kS+"_"+kP).style.display = status;
|
||||
|
||||
}//ShowProductos
|
||||
Reference in New Issue
Block a user