// Inicializo los objetos
var oSearchOE = oSearchOE || {};
oSearchOE.abrirReportePdf = function(sFileId , sIdOe) {
//alert(sIdOe);
//Abrir pdf
oGen.fnGetStore({
titulo : ' ',
params : {
prm_dataSource : 'ovQbe',
prm_funcion : 'PABPM.retrieveReport',
prm_id : sIdOe,
prm_fieldId : sFileId
},
fnCallback : function(data) {
$.each(data.records, function(pos, reg) {
console.log(reg);
if (reg != undefined) {
var extension = reg.NOMBRE.split('.')[1];
oReporte.fnDownload(reg.NOMBRE, reg.REPORT,extension);
}
});
}
});
};
oSearchOE.abrirListaReportes = function(sIdOe) {
// Abrir grilla desde OV_REPORTLIST_BPM
"use strict";
oConsulta.show({
consulta : "OV_REPORTLIST_BPM",
dataSource : "ovQbe",
titulo : "Reportes",
exportar : false,
estilo : "grillaSmall",
top : 40,
paramsDefault : {
PRM_ID : sIdOe
}
});
};
oSearchOE.fnBotonPdfOE = function(val,reg,idx){
var sBoton = "";
var sIdOe = "" + reg.IDOE;
sBoton = '';
return sBoton;
};
oSearchOE.btnAbrirReportePdf = function(val,reg,idx){
var sBoton = "";
var sFileID = reg.FILEID + "";
var sIdOe = reg.IDOE + "";
var _href = '../bsh/OVReporte?prm_dataSource=ovQbe&prm_funcion=PABPM.retrieveReport&prm_id='+ sIdOe +'&prm_fieldId='+ sFileID +'&prm_nombreReporte=NOMBRE&prm_dataReporte=REPORT';
sBoton = '';
//sBoton = '';
return sBoton;
};
oSearchOE.fnPrticualirdadesSF = function () {
if (oSalesForce.ORIGEN == 'SALESFORCE') {
if (oGlobal.historial && oGlobal.historial.length > 0) {
$('#OE_panel_volver').show();
}
} else {
$('#OE_panel_volver').show();
}
}
$(document).ready(function () {
oGen.fnInicioForms();
oSalesForce.fnObtenerParametrosOrigen("Operaciones Emitidas", oSearchOE.fnPrticualirdadesSF);
});