function setVerificarDocumentosVencidos($fecha_de_verificacion = false) { $xCO = new cPersonas_documentacion(); $xF = new cFecha(); $where = $xCO->clave_de_persona()->get() . "=" . $this->mClaveDePersona; $where .= " AND " . $xCO->resultado_de_la_verificacion()->get() . "=" . AML_KYC_DOCTO_NO_VERIFICADO; $q = $xCO->query()->select(); $data = $q->exec($where); $fecha_actual = $xF->getInt($fecha_de_verificacion); $markT = AML_KYC_DIAS_PARA_REVISAR_DOCTOS * SYS_FACTOR_DIAS; $TipoDeAlerta = 801006; $PersonaDeDestino = AML_OFICIAL_DE_CUMPLIMIENTO; $msg = ""; //$this->mMessages .= $q->log(); foreach ($data as $datos) { $xCO->setData($datos); $persona = $xCO->clave_de_persona()->v(); //checar los dias sin verificar $fecha_limite = $xCO->fecha_de_carga()->v() + $markT; $clave_docto = $xCO->clave_de_control()->v(); if ($fecha_limite < $fecha_actual) { $msg .= "ERROR\t{$persona}\tDocumento {$clave_docto} VENCIDO " . $xF->getFechaByInt($fecha_limite) . "\r\n"; } else { $msg .= "WARN\t{$persona}\tDocumento {$clave_docto} no verificado al " . $xF->getFechaByInt($fecha_actual) . " limite al " . $xF->getFechaByInt($fecha_limite) . "\r\n"; } } $this->mMessages .= $msg; if ($this->mForceAvisos == true) { //generar aviso $xAml = new cAML(); $xAml->setForceAlerts(true); $xAml->sendAlerts(getUsuarioActual(), $PersonaDeDestino, $TipoDeAlerta, $msg); } }