function oIntegralComercio_class() { //this.EXTERNALUSER=""; //this.EXTERNALUSERFLAG=""; this.WORKFLOWREFERENCENUMBER = ""; //es el nro del workflow cuando se ejecuta el referal, se usa para aprobar o desaprobar el referal this.PRODUCTO = ""; this.NROCOT = ""; //Nro de Quote this.NROPOL = ""; // Nro de poliza this.RENEWALPOLICYNUMBER = ""; this.CROSSREFERENCENUMBER = ""; this.CROSSREFERENCETYPE = ""; this.TRNBER = "1"; // Nro de transaccion this.MAXTRNBER = "1"; //ultimo numero transaccionado this.TRANSACCION = "NEW_QUOTE"; //tipo de transaccion EJ: NEW_QUOTE, EDIT_QUOTE this.TIPOCOT = ""; /*R = rapida D= detallada*/ this.STATUSCODE = "POLICY_NEW"; /*representa el estado de la cotizacion QQ QU QY etc*/ this.STATUSQUOTE = []; /*Da el resultado de error del quote rate. Puede ser vacio , ERROR, WARNING o REFER.*/ this.TRANSACTIONCATEGORY = "NB"; this.REFERALMESSAGES = []; /*Aca se guardan los mensajes de Referal, ya que se van transladando de una pantalla a otra sin llamar al quote rate. Solo para pantalla cliente*/ this.WARNINGMESSAGES = []; /*Aca se guardan los mensajes de warning, ya que se van transladando de una pantalla a otra sin llamar al quote rate. Solo para pantalla cliente*/ this.ERRORMESSAGES = []; /*Aca se guardan los mensajes de error, ya que se van transladando de una pantalla a otra sin llamar al quote rate. Solo para pantalla cliente*/ this.CODPRODUCTOR = ""; this.PRODUCTORNOMBRE = ""; this.CODORGANIZADOR = ""; this.ORGANIZADORNOMBRE = ""; this.FECHAINICIOVIG = ""; this.PLAZO = ""; this.FECHAFINVIG = ""; this.FECHAFINVIGCOT = moment(oGlobal.sys_date).add(1, 'months').format('DD/MM/YYYY'); this.CODACTIVIDAD = ""; this.ACTIVIDAD = ""; this.ACTIVIDADDESC = ""; this.CLAUSULAEST = ""; this.CLIENTEDOCUMENTO = []; this.UBICACION_ACTUAL = 0; this.UBICACION = []; this.CRC = "" this.COBERTRESPCIVIL = ""; /*se coloca aca rc porque va para todas las ubicaciones*/ this.CSTEEC; this.COBERTSEGTECCONT = ""; /*se coloca aca porque va para todas las ubicaciones*/ this.COBERTSEGTECEEM = ""; /*se coloca aca porque va para todas las ubicaciones*/ this.CSTEEM = ""; this.RISKNUMBERMAX = 0; this.CONVENIOPROD = ""; this.CONVENIOPRODDESC = ""; this.CONVENIOPRODPORCCOM = ""; this.CONVENIOORG = ""; this.CONVENIOORGDESC = ""; this.CONVENIOORGPORCCOM = ""; this.PRIMATOTAL = ""; this.VARIACION = ""; this.PORCENTAJECOMISION = ""; this.PORCENTAJECOMISIONORG = ""; this.COMISION = ""; this.MEDIOPAGO = ""; this.PLANPAGO = ""; this.PLANPAGODESC = ""; this.RECARGOFINANCIERO = ""; this.RECARGOADMINISTRATIVO = ""; this.TARJETA = ""; this.TARJETANRO = ""; this.TIPOPAGO = ""; this.CBU = ""; this.CONDIVA = ""; this.CONDIVADESC = ""; this.CONDIIBB = ""; this.CONDIIBBDESC = ""; this.NROCLIENTE = ""; this.NROCLIENTE_AIS = ""; this.TIPOPERSONA = ""; this.NOMBRECLIENTE = ""; this.APELLIDOCLIENTE = ""; this.NOMBRECOMPANIA = ""; this.DOMICILIOCLIENTE = ""; this.FECHANACCLIENTE = ""; this.LUGARNACCLIENTE = ""; this.NACIONALIDADCLIENTE = ""; this.SEXOCLIENTE = ""; this.CPCLIENTE = ""; this.CALLECLIENTE = ""; this.CALLENROCLIENTE = ""; this.CLIENTEPISO = ""; this.CLIENTEPUERTA = ""; this.CLIENTEEMAIL = ""; this.CLIENTETELEFONO = ""; this.CLIENTECELULAR = ""; this.PPROVINCIACLIENTE = ""; this.CIUDADCLIENTE = ""; this.CALLESINNROCLIENTE = ""; this.CLIENTEFECHAREGISTRO = ""; this.CLIENTENROREGISTRO = ""; this.CLIENTEFECHACONTRATO = ""; this.CLIENTEIVACODE = ""; this.CLIENTEGROSSINCOMETYPE = ""; this.TAXIDGSTNUMBER = ""; this.REPRESENTANTELEGNOMBRE = ""; this.REPRESENTANTELEGAPELLIDO = ""; this.REPRESENTANTELEGDOCUMENTONRO = ""; this.REPRESENTANTELEGDOCUMENTOTIPO = ""; this.REPRESENTANTELEGPRODUCTO = ""; this.REFERAL = ""; this.POLICYPREMIUM = ""; this.PREMIUMRATES = ""; this.PREVIUSPOLICYDETAIL = ""; this.PREVIUSPOLICY = ""; this.CAMPANIA = ""; this.CAMPANIA_DESCUENTO = ""; this.NOTASADICIONALES_Y = ""; this.NOTASADICIONALES_N = ""; // Celso: indica si esta en modo ver o abrir this.PRE_TITULO = ""; // Fernando: se agrega para completar todos los datos necesarios de la prima al momento de emitir. this.POLICYPREMIUMDETAILS = ""; this.REQUIRESREVIEWFLAG = false; this.RENEWALCONVERSIONFLAG = false; this.FLAGOFCLAIM = false; this.FLAGOFDEBT = false; this.POLICYNUMBER = ""; // se carga si viene de la pantalla de consutla de poliza para que no se ejecute el cotizar. this.carteraValida = undefined; this.carteraValidaMsg = ""; } oIntegralComercio_class.prototype.ubicacion = function () { this.RIESGOCODPOSTAL = ""; this.RIESGOLOCALIDAD = ""; this.RIESGOPROVINCIA = ""; this.RIESGOPPROVINCIA = ""; this.RIESGOCALLE = ""; this.RIESGONRO = ""; this.RIESGOSINNRO = ""; this.RIESGOPISO = ""; this.RIESGOPUERTA = ""; this.RIESGOUBICADOSHOP = ""; this.CI = ""; this.COBERTINCENDIO = ""; this.COBERTRIESGOINCENDIO = ""; this.CRI = ""; this.COBERTROBOCONTENIDO = ""; this.CRCONT = ""; this.COBERTROBOVALORES = ""; this.CRV = ""; this.COBERTSEGTECEEF = ""; this.CSTEEF = ""; this.UBICACIONID = ""; /*ESTE DEBERIA LLAMARSE UBICACIONNRO*/ this.SITUATIONID = "";/*ESTE DEBERIA LLAMARSE UBICACIONID*/ this.NOTASADICIONALES_Y = ""; this.NOTASADICIONALES_N = ""; } oIntegralComercio_class.prototype.coberturaIncendio = function () { this.RISKNUMBER = ""; this.RISKREFERENCEID = ""; this.TIPOCONSTRUCCION = ""; this.SUPERFICIE = ""; this.NINGUNOMENSIONADO = ""; this.EXTINTORESPORTATILES = ""; this.CAPACITACIONUSOMATF = ""; this.REDINCENDIO = ""; this.BRIGADAINTPLANTA = ""; this.DETECTAUTHUMO = ""; this.ROCIADORESAUT = ""; this.BOMBEROSPUB5KM = ""; this.INCENDIOEDIFICIO = ""; this.HVCTEDIFICIO = ""; this.GRANIZOEDIFICIO = ""; this.TERREMOTOEDIFICIO = ""; this.INCENDIOCONTENIDO = ""; this.HVCTCONTENIDO = ""; this.GRANIZOCONTENIDO = ""; this.TERREMOTOCONTENIDO = ""; this.RCLINDEROS = ""; this.PERDIDABENEFICIOS = ""; this.PLAZO = ""; this.PLAZODEDUCIBLE = ""; this.REMOCIONESCOMBROS = ""; this.GASTOSEXTRAS = ""; this.REFACCIONESAMPL = ""; this.MODE = "A"; } oIntegralComercio_class.prototype.riesgosAsocIncendio = function () { this.RISKNUMBER = ""; this.RISKREFERENCEID = ""; this.INUNDACIONCONTENIDO = ""; this.INUNDACIONCONTENIDODEDUCIBLE = ""; this.DANIOSXAGUACONTENIDO = ""; this.DANIOSXAGUACONTENIDODEDUCIBLE = ""; this.CRISTALES = ""; this.FALTADEFRIO = ""; this.FALTADEFRIODEDUCIBLE = ""; this.FALTADEFRIODEDUCIBLE = ""; this.HONORARIOSPROF = ""; this.BIENESRECADQ = ""; this.GASTOSEXTINCENDIO = ""; this.MODE = "A"; } oIntegralComercio_class.prototype.responsabilidadCivil = function () { this.RISKNUMBER = ""; this.RISKREFERENCEID = ""; this.FACTURACIONANUAL = ""; this.FACTANDEDUCIBLE = ""; this.CANTEMPLEADOS = ""; this.CANTUBICACIONES = ""; this.CANTALUMNOS =""; this.RESPCIVILCOMPRENSIVA = ""; this.SUBLTEINCENDIO = ""; this.SUBLTECARTELES = ""; this.SUBLTECARGADESCARGAFUERALOCAL = ""; this.SUBLTEPRODINTERNET=""; this.SUBLTEPARTYVENUE=""; this.SUBLTESECURITYCOMPANY=""; this.SUBLTECOLEGIOS =""; this.SUBLTEASCENMONTACARGA = ""; this.SUBLTEGUARDAVEHICULOTITNOONER = ""; this.SUBLTEINSTVAPORAGACCALIENTE = ""; this.SUBLTESUMALIMENTOS = ""; this.SUBLTEVENDAMBYVIAJANTES = ""; this.SUBLTEANIMALESDOMESTICOS = ""; this.SUBLTEROTURACANIERIA = ""; this.SUBLTEARMASFUEGO = ""; this.SUBLTEGRUASGUINCHES = ""; this.SUBLTEEFECTOSTEMPVAPHUM = ""; this.SUBLTECONTRATSUBCONTRATDENTROPREDIO = ""; this.SUBLTEDANIOSLINDERO = ""; this.SUBLTEBSCUIDYCTRLEXCMERCHURTO = ""; this.SUBLTETRANSBSEXCDANIOMERCTRANSP = ""; this.SUBLTEESTAMANIMALES = ""; this.SUBLTEHUELGAPOP = ""; this.SUBLTERESPCIVILCONTRACT = ""; this.SUBLTERESPCIVILUSOVEHNOPROPIO = ""; this.SUBLTERESPCIVILUSOVEHPROPIO = ""; this.RESPCIVILCRUZADA = ""; this.SUBLTERESPCIVILCRUZADA = []; this.ASEGADICIONAL = ""; this.SUBLTEASEGADICIONAL = []; this.SUBROGACION = ""; this.SUBLTESUBROGACION = []; this.SUBLTEACTDEPORTIVAS = ""; this.SUBLTECONTAMINACION = ""; this.SUBLTEDISPENSARIOSENF = ""; this.SUBLTEPERSFISBAJOCONTRATO = ""; this.SUBLTEAMPCOBERRESPCIVILEQ = ""; this.SUBLTEFUNCIONARIOSMUNDENTEXCCUBA = ""; this.SUBLTEVALETPARKING = ""; this.SUBLTEEVENTOS = ""; this.SUBLTEPILETASNATACION = ""; this.SUBLTEFILMEXTERIORES = ""; this.SUBLTEREFACINTERNAS = ""; this.SUBLTEMAQAGRICOLA = ""; this.SUBLTEBSCUIDYCTRLHOTELES = ""; this.SUBLTECLPASANTIASDEPTVAS = ""; this.SUBLTERCGARAGEINCENDIO = ""; this.SUBLTERCGARAGEROBO = ""; this.SUBLTERCGARAGECAIDARAMPAS = ""; this.MODE = "A"; } oIntegralComercio_class.prototype.roboContenido = function () { this.RISKNUMBER = ""; this.RISKREFERENCEID = ""; this.ROBOCONTENIDO = ""; this.ROBOBSUSO = ""; this.ROBOEQUIPAJE = ""; this.ROBOCONTENIDODEDUCIBLE = ""; this.ROBOBSUSODEDUCIBLE = ""; this.ROBOEQUIPAJEDEDUCIBLE = ""; this.MODE = "A"; } oIntegralComercio_class.prototype.roboValores = function () { this.RISKNUMBER = ""; this.RISKREFERENCEID = ""; this.ROBOVALORESCAJA = ""; this.CAJONMOSTRADOR = ""; this.CAJADEDUCIBLE = ""; this.ROBOVALORESTRANSIT = ""; this.ROBOVALORESTRANSITDEDUCIBLE = ""; this.ROBOVALORESCOMENSAL = ""; this.ROBOVALORESRECAUDACION = ""; this.ROBOVALORESRECAUDACIONDEDUCIBLE = ""; this.MODE = "A"; } oIntegralComercio_class.prototype.segTecnicoEef = function () { this.RISKNUMBER = ""; this.RISKREFERENCEID = ""; this.TODORIESGOEEFOFICINA = ""; this.TODORIESGOEEMEDICOS = ""; this.TODORIESGOEETALLER = ""; this.MODE = "A"; } oIntegralComercio_class.prototype.segTecnicoEem = function () { this.RISKNUMBER = ""; this.RISKREFERENCEID = ""; this.ROBOINCEEM = ""; this.TODORIESGOEEM = ""; this.MODE = "A"; } oIntegralComercio_class.prototype.segTecnicoEcont = function () { this.RISKNUMBER = ""; this.RISKREFERENCEID = ""; this.SEGTECEQELECCONT = []; this.SUMATOTAL = ""; this.TOTALEQUIPOS = ""; this.MODE = "A"; } oIntegralComercio_class.prototype.segTecnicoEcontDetalle = function () { this.TIPOEQUIPO = ""; this.DESCRIPCION = ""; this.ANIOFABRICACION = ""; this.TIPOCOBERTURA = ""; this.SUMAASEGURADA = ""; this.SUMAASEGURADADEDUCIBLE = ""; this.RCOPERACIONES = ""; this.RCOPERACIONESDEDUCIBLE = ""; this.RCVIAL = ""; } oIntegralComercio_class.prototype.respCivilIc = function () { this.TIPODOC = ""; this.NRODOC = ""; this.NOMAPE = ""; } oIntegralComercio_class.prototype.subrogacionIc = function () { this.TIPODOC = ""; this.NRODOC = ""; this.NOMAPE = ""; } oIntegralComercio_class.prototype.aseguradoAdicIc = function () { this.TIPODOC = ""; this.NRODOC = ""; this.NOMAPE = ""; } oIntegralComercio_class.prototype.documento = function () { this.CLIENTIPODOC = { CLIENTIPODOC: "", CLIENNRODOC: "" }; this.CLIENNRODOC = { CLIENTIPODOC: "", CLIENNRODOC: "" }; } oIntegralComercio_class.prototype.referalHeader = function () { this.REFERALREASON = "ManualRefer"; if (oGlobal.ambiente === "PROD") this.REFERRALEMAILADDRESS = oGen.nvl(oGlobal.getOneMail(), 'mail_interno_uat@zurich.com'); else this.REFERRALEMAILADDRESS = "mail_interno_uat@zurich.com"; this.REFERRALREASONLINE = ""; this.REFERRALDETAIL = []; this.TEXTOSTATUS = ""; this.COMENTARIO = ""; } oIntegralComercio_class.prototype.referalDetail = function () { this.RISKNUMBER = ""; this.RISKTYPE = ""; this.ERRORCODE = ""; } oIntegralComercio_class.prototype.referalUnderwriterComments = function () { this.TEXTOSTATUS = ""; this.COMENTARIO = ""; } oIntegralComercio_class.prototype.policyPremiumDetails = function () { this.FAPPREMIUM = ""; this.FAPTOTALPREMIUM = ""; this.TOTALTRANSACTIONPREMIUM = ""; this.ISSUINGCHARGES = ""; this.CHARGESPERCENTAGE = ""; this.VAT = ""; this.ADDITIONALVAT = ""; this.VATRETENTION = ""; this.PROVINCESTAMPCHARGES = ""; this.GROSSINCOME = ""; this.OTHERTAXES = ""; this.PRICE = ""; } oIntegralComercio_class.prototype.initialize = function () { //console.warn("Hi, I'm the initialize function by default. That means you don't have a properly initialize function"); }; oIntegralComercio_class.prototype.pantallaNotasAdicioanles = function (impFrentePolizaGral, noImpFrentePolizaGral, impMaxLenth, noImpMaxLenth) { var htmlBuffer = []; var _habilitacion = (oGlobal.usuarioInterno() ? ' ' : ' disabled '); var _visible = (oGlobal.usuarioInterno() ? ' ' : ' hidden '); var onFocusNotasSeImpFP = oGlobal.usuarioInterno() ? 'onFocus="'+"(function(){var notas = $('#notaAdSeImpFP').val().split('\\n'); for(var i = 0; i < notas.length; i++){ notas[i] = notas[i].trim(); } notas = notas.join('\\n'); $('#notaAdSeImpFP').val(notas); $('#btnFormatearNotasAdicionalesSeImpFP').show(); $('#btnEditarNotasAdicionalesSeImpFP').hide();"+'})()"' : ''; var onClickBtnFormatearNotasSeImpFP = 'onClick="'+"(function(){ $('#errorSeImpFP').hide(); oGen.fnDisable('notaAdSeImpFP'); var notas = oGen.fnFormatLinesByLength($('#notaAdSeImpFP').val(), 60); notas = oGen.fnFillString(notas, 60, ' '); $('#notaAdSeImpFP').val(notas); $('#btnFormatearNotasAdicionalesSeImpFP').hide(); $('#btnEditarNotasAdicionalesSeImpFP').show();})()"+'"'; var onClickBtnEditarNotasSeImpFP = 'onClick="'+"(function(){oGen.fnEnable('notaAdSeImpFP'); var notas = $('#notaAdSeImpFP').val().split('\\n'); for(var i = 0; i < notas.length; i++){ notas[i] = notas[i].trim(); } notas = notas.join('\\n'); $('#notaAdSeImpFP').val(notas); $('#btnFormatearNotasAdicionalesSeImpFP').show(); $('#btnEditarNotasAdicionalesSeImpFP').hide();})()"+'"'; var onFocusNotasNoSeImpFP = oGlobal.usuarioInterno() ? 'onFocus="'+"(function(){var notas = $('#notaAdNoSeImpFP').val().split('\\n'); for(var i = 0; i < notas.length; i++){ notas[i] = notas[i].trim(); } notas = notas.join('\\n'); $('#notaAdNoSeImpFP').val(notas); $('#btnFormatearNotasAdicionalesNoSeImpFP').show(); $('#btnEditarNotasAdicionalesNoSeImpFP').hide();"+'})()"' : ''; var onClickBtnFormatearNotasNoSeImpFP = 'onClick="'+"(function(){ $('#errorNoSeImpFP').hide(); oGen.fnDisable('notaAdNoSeImpFP'); var notas = oGen.fnFormatLinesByLength($('#notaAdNoSeImpFP').val(), 60); notas = oGen.fnFillString(notas, 60, ' '); $('#notaAdNoSeImpFP').val(notas); $('#btnFormatearNotasAdicionalesNoSeImpFP').hide(); $('#btnEditarNotasAdicionalesNoSeImpFP').show();})()"+'"'; var onClickBtnEditarNotasNoSeImpFP = 'onClick="'+"(function(){oGen.fnEnable('notaAdNoSeImpFP'); var notas = $('#notaAdNoSeImpFP').val().split('\\n'); for(var i = 0; i < notas.length; i++){ notas[i] = notas[i].trim(); } notas = notas.join('\\n'); $('#notaAdNoSeImpFP').val(notas); $('#btnFormatearNotasAdicionalesNoSeImpFP').show(); $('#btnEditarNotasAdicionalesNoSeImpFP').hide();})()"+'"'; impMaxLenth = impMaxLenth !== undefined ? impMaxLenth : '3000'; noImpMaxLenth = noImpMaxLenth !== undefined ? noImpMaxLenth : '3000'; htmlBuffer.push('
'); htmlBuffer.push('
'); htmlBuffer.push('
'); htmlBuffer.push('
'); htmlBuffer.push('
'); htmlBuffer.push(' '); htmlBuffer.push('
'); htmlBuffer.push('
'); htmlBuffer.push(' '); htmlBuffer.push('
'); if(oGlobal.usuarioInterno()){ htmlBuffer.push('
'); htmlBuffer.push(' '); htmlBuffer.push(' '); htmlBuffer.push(' '); htmlBuffer.push('
'); } htmlBuffer.push('
'); htmlBuffer.push('
'); htmlBuffer.push(' '); htmlBuffer.push('
'); htmlBuffer.push('
'); htmlBuffer.push(' '); htmlBuffer.push('
'); if(oGlobal.usuarioInterno()){ htmlBuffer.push('
'); htmlBuffer.push(' '); htmlBuffer.push(' '); htmlBuffer.push(' '); htmlBuffer.push('
'); } htmlBuffer.push('
'); htmlBuffer.push('
'); htmlBuffer.push('
'); htmlBuffer.push('
'); var htmlNotasAdicionales = htmlBuffer.join(""); return htmlNotasAdicionales; } oIntegralComercio_class.prototype.validarEdicionNotasAdicionales = function (){ if($('#btnFormatearNotasAdicionalesSeImpFP').is(':visible')){ $('#errorSeImpFP').show(); } if($('#btnFormatearNotasAdicionalesNoSeImpFP').is(':visible')){ $('#errorNoSeImpFP').show(); } if($('#errorSeImpFP').is(':visible') || $('#errorNoSeImpFP').is(':visible')){ return false; } else { return true; } } oIntegralComercio_class.prototype.titulo = function (tagTitulo) { // var _titulo = 'Integral de Comercio '; var _footerUnoTipoUsuario; var _act = oGen.nvl(oIntegralComercioGlobal.ACTIVIDAD, oIntegralComercioGlobal.ACTIVIDADDESC); // _titulo = _titulo + (oIntegralComercioGlobal.PRODUCTO == 'ICQ1' ? '($)' : '(U$S)'); if (_act) { _titulo += " - " + _act; } // if (oGlobal.usuarioExterno()) { _footerUnoTipoUsuario = "| Usuario: EXTERNO"; } else { _footerUnoTipoUsuario = "| Usuario: INTERNO"; } // $('#' + tagTitulo).html(_titulo); $('#footerUnoTipoUsuario').html(_footerUnoTipoUsuario) // var _tipoCoti = "Cotización"; if (["QF", "QA", "QI", "QR"].indexOf(oIntegralComercioGlobal.STATUSCODE) >= 0) { _tipoCoti = "Cotización Referida"; } else { if (oIntegralComercioGlobal.TIPOCOT === 'R') { _tipoCoti = "Cotización Rapida"; } else if (oIntegralComercioGlobal.TIPOCOT === 'D') { _tipoCoti = "Cotización Detallada"; } } // if (oIntegralComercioGlobal.PRE_TITULO == "Ver Póliza") { _tipoCoti = ""; } //RENOVAR Renovación Cotización: ICQ200241312 var _linea_tipo_cot = "" if (oGen.nvl(oIntegralComercioGlobal.RENEWALPOLICYNUMBER) !== "") { _linea_tipo_cot = { campo: "RENOVAR Renovación Cotización", valor: oIntegralComercioGlobal.RENEWALPOLICYNUMBER + " / " + oGen.nvl(oIntegralComercioGlobal.NROCOT) }; } else { _linea_tipo_cot = { campo: oIntegralComercioGlobal.PRE_TITULO + " " + _tipoCoti, valor: oGen.nvl(oIntegralComercioGlobal.NROCOT) }; } var prm = { titulo: "", divStyle: "text-align: right;", filas: [ { campo: "Vigencia", valor: "Fecha de Vigencia: " + oIntegralComercioGlobal.FECHAINICIOVIG + " • Período del Seguro: " + oIntegralComercioGlobal.FECHAINICIOVIG + " al " + oIntegralComercioGlobal.FECHAFINVIG }, { campo: "Productor", valor: "[" + oIntegralComercioGlobal.TIPOPRODUCTOR + "-" + oIntegralComercioGlobal.CODPRODUCTOR + "] " + oIntegralComercioGlobal.PRODUCTORNOMBRE }, { campo: "Organizador", valor: "[" + oIntegralComercioGlobal.TIPOORGANIZADOR + "-" + oIntegralComercioGlobal.CODORGANIZADOR + "] " + oIntegralComercioGlobal.ORGANIZADORNOMBRE }, _linea_tipo_cot ] }; oGen.fnShowDetail(prm); $('#ovHome_productor').html(''); // }; //Indica si falta cargar la pantalla de datos fiscales oIntegralComercio_class.prototype.faltanDatosFiscales = function () { try { if (oGen.nvl(this.CONVENIOPROD) === "" || oGen.nvl(this.CONVENIOORG) === "" || oGen.nvl(this.PORCENTAJECOMISION) === "" || oGen.nvl(this.MEDIOPAGO) === "" || oGen.nvl(this.TIPOPAGO) === "" || oGen.nvl(this.PLANPAGO) === "" || oGen.nvl(this.CONDIVA) === "" || oGen.nvl(this.CONDIIBB) === "") { return true; } else { return false; } } catch (error) { return false; } }; //cambia el modo de la cotizacion oIntegralComercio_class.prototype.cambiarModo = function (modo) { // oIntegralComercioGlobal.COBERTRESPCIVIL.MODE = modo; oIntegralComercioGlobal.COBERTSEGTECEEM.MODE = modo; oIntegralComercioGlobal.COBERTSEGTECCONT.MODE = modo; // oIntegralComercioGlobal.UBICACION.forEach(function (reg, index) { reg.COBERTINCENDIO.MODE = modo; reg.COBERTRIESGOINCENDIO.MODE = modo; reg.COBERTROBOCONTENIDO.MODE = modo; reg.COBERTROBOVALORES.MODE = modo; reg.COBERTSEGTECEEF.MODE = modo; }); }; //cambia el modo de la cotizacion oIntegralComercio_class.prototype.renumerarRiskNumber = function () { // var ULTIMO_RISKNUMBER = oIntegralComercioGlobal.RISKNUMBERMAX; getRiskNumber = function (prm_RISKNUMBER) { _valor = oGen.nvl(prm_RISKNUMBER); if (Number(oGen.nvl(oIntegralComercioGlobal.RISKNUMBERMAX)) > 0 && Number(_valor) > 0 && Number(_valor) <= Number(oGen.nvl(oIntegralComercioGlobal.RISKNUMBERMAX))) { return Number(_valor); } else { ULTIMO_RISKNUMBER += 1; return ULTIMO_RISKNUMBER; } } oIntegralComercioGlobal.UBICACION.forEach(function (reg, index) { reg.COBERTINCENDIO.RISKNUMBER = getRiskNumber(reg.COBERTINCENDIO.RISKNUMBER); if (reg.CRI == "S") { reg.COBERTRIESGOINCENDIO.RISKNUMBER = getRiskNumber(reg.COBERTRIESGOINCENDIO.RISKNUMBER); } if (reg.CRCONT == "S") { reg.COBERTROBOCONTENIDO.RISKNUMBER = getRiskNumber(reg.COBERTROBOCONTENIDO.RISKNUMBER); } if (reg.CRV == "S") { reg.COBERTROBOVALORES.RISKNUMBER = getRiskNumber(reg.COBERTROBOVALORES.RISKNUMBER); } if (reg.CSTEEF == "S") { reg.COBERTSEGTECEEF.RISKNUMBER = getRiskNumber(reg.COBERTSEGTECEEF.RISKNUMBER); } }); // if (oIntegralComercioGlobal.CRC == "S") { oIntegralComercioGlobal.COBERTRESPCIVIL.RISKNUMBER = getRiskNumber(oIntegralComercioGlobal.COBERTRESPCIVIL.RISKNUMBER); } if (oIntegralComercioGlobal.CSTEEM == "S") { oIntegralComercioGlobal.COBERTSEGTECEEM.RISKNUMBER = getRiskNumber(oIntegralComercioGlobal.COBERTSEGTECEEM.RISKNUMBER); } if (oIntegralComercioGlobal.CSTEEC == "S") { oIntegralComercioGlobal.COBERTSEGTECCONT.RISKNUMBER = getRiskNumber(oIntegralComercioGlobal.COBERTSEGTECCONT.RISKNUMBER); } // }; //cambia el modo de la cotizacion oIntegralComercio_class.prototype.CampaniaInicial = function (prm_tipoVenta, prm_campania_ant, fnCallback) { // oGen.fnGetStore({ titulo: ' ', params: { prm_dataSource: 'ovQbe', prm_funcion: 'OV.paCampaniaDescuento.campaniaInicial', prm_product: oIntegralComercioGlobal.PRODUCTO, prm_agent_clase: oIntegralComercioGlobal.TIPOPRODUCTOR, prm_agent: oIntegralComercioGlobal.CODPRODUCTOR, prm_transactions: prm_tipoVenta, // NB o RN // prm_anzsic: oIntegralComercioGlobal.CODACTIVIDAD, prm_campania_codigo_act: oGen.nvl(prm_campania_ant) }, fnCallback: function (oResp) { // if (oResp !== undefined) { oIntegralComercioGlobal.CAMPANIA = oGen.nvl(oResp.PRM_CAMPANIA_CODIGO, ""); oIntegralComercioGlobal.CAMPANIA_DESCUENTO = oGen.nvl(oResp.PRM_CAMPANIA_DESCUENTO, ""); } else { oIntegralComercioGlobal.CAMPANIA = ""; oIntegralComercioGlobal.CAMPANIA_DESCUENTO = ""; } if (typeof fnCallback == 'function') { fnCallback(); } } }); // } //Valida la duplicidad de cartera oIntegralComercio_class.prototype.validarCartera = function (prm_tipo_doc, prm_nro_doc) { // oIntegralComercioGlobal.carteraValida = false; oGen.fnGetStore({ titulo: '', params: { prm_dataSource: 'ovQbe', prm_funcion: 'OV.PACLIENTSERVICES.CLIENTSEARCH', prm_userid: oGlobal.cUsuario, prm_userrole: oGen.lPad(oGlobal.productor.CLIENSEC, 9, '0'), prm_userlevel: oGlobal.productor.NIVEL, PRM_PRODUCTCODE: oIntegralComercioGlobal.PRODUCTO, PRM_DOCUMENTTYPECODE: prm_tipo_doc, PRM_DOCUMENTNUMBER: prm_nro_doc, PRM_ACCOUNTNUMBER: oIntegralComercioGlobal.CODPRODUCTOR }, fnCallback: function (oResp) { // if (oResp.PRM_CURSOR !== undefined) { if (oResp.PRM_CURSOR[0].STATUSMESSAGE == 'ER') { oIntegralComercioGlobal.carteraValidaMsg = 'Este cliente pertenece a la cartera de otro productor (POLIZA)'; oGen.fnNoOp({ idComponente: 'validarCartera' }); } else { oIntegralComercioGlobal.NROCLIENTE_AIS = oGen.nvl(oResp.PRM_CURSOR[0].CLIENTNO, ''); // // El cliente esta ok en ais pero valido si esta ok en QXC // oGen.fnGetStore({ titulo: '', params: { prm_dataSource: 'ovQbe', prm_funcion: 'OV.PACLIENTSERVICES.CLIENTSEARCH_QXC', prm_userid: oGlobal.cUsuario, prm_userrole: oGen.lPad(oGlobal.productor.CLIENSEC, 9, '0'), prm_userlevel: oGlobal.productor.NIVEL, PRM_PRODUCTCODE: oIntegralComercioGlobal.PRODUCTO, PRM_DOCUMENTTYPECODE: prm_tipo_doc, PRM_DOCUMENTNUMBER: prm_nro_doc, PRM_ACCOUNTNUMBER: oIntegralComercioGlobal.CODPRODUCTOR }, fnCallback: function (oResp) { // if (oResp.PRM_CURSOR !== undefined) { if (oResp.PRM_CURSOR[0].STATUSMESSAGE == 'ER') { oIntegralComercioGlobal.carteraValidaMsg = 'Este cliente pertenece a la cartera de otro productor (COTIZACIÓN)'; } else { oIntegralComercioGlobal.carteraValida = true; oIntegralComercioGlobal.carteraValidaMsg = ""; } } else { oIntegralComercioGlobal.carteraValidaMsg = 'Inconveniente para validar la existencia del cliente.'; }; oGen.fnNoOp({ idComponente: 'validarCartera' }); } }); } } else { oIntegralComercioGlobal.carteraValidaMsg = 'Inconveniente para validar la existencia del cliente.'; oGen.fnNoOp({ idComponente: 'validarCartera' }); }; } }); }; //Nueva instancia console.log("Incializa oIntegralComercio"); var oIntegralComercioGlobal = oIntegralComercioGlobal || new oIntegralComercio_class();