function setAvisosPorCreditos360($fecha_operacion = false)
{
    if ($fecha_operacion == false) {
        $fecha_operacion = fechasys();
    }
    $sucursal = getSucursal();
    $fecha = sumardias($fecha_operacion, 1);
    $msg = "====================== GENERAR_AVISOS_POR_CREDITOS_360 \r\n";
    //Generar Notificaciones de creditos por Vencer en los proximos 10 dias
    $msg = "====================== GENERAR_AVISOS_POR_CREDITOS_NO_360 \r\n";
    $msg .= "====================== GENERAR AVISOS CON " . DIAS_A_ESPERAR_POR_NOTIFICACION . " DIAS DE ANTICIPACION \r\n";
    $msg .= "====================== GENERAR AVISOS PARA EL " . getFechaLarga(sumardias($fecha_operacion, DIAS_A_ESPERAR_POR_NOTIFICACION)) . "\r\n";
    $msg .= "\tSocio\tCredito\tObservaciones\r\n";
    $sql = "SELECT\n\t`creditos_solicitud`.`numero_solicitud`,\n\t`creditos_solicitud`.`numero_socio`,\n\t`creditos_solicitud`.`periocidad_de_pago`,\n\t`creditos_solicitud`.`grupo_asociado`,\n\t`creditos_solicitud`.`oficial_seguimiento`\nFROM\n\t`creditos_solicitud` `creditos_solicitud`\nWHERE\n\t(`creditos_solicitud`.`sucursal` ='{$sucursal}') AND\n\t(`creditos_solicitud`.`saldo_actual` >= " . TOLERANCIA_SALDOS . ") AND\n\t(`creditos_solicitud`.`fecha_vencimiento` = DATE_ADD('{$fecha_operacion}', INTERVAL " . DIAS_A_ESPERAR_POR_NOTIFICACION . " DAY))\n\tAND\n\t(`creditos_solicitud`.`periocidad_de_pago` = 360)";
    $rs = mysql_query($sql, cnnGeneral());
    while ($rw = mysql_fetch_array($rs)) {
        $socio = $rw["numero_socio"];
        $credito = $rw["numero_solicitud"];
        $grupo = $rw["grupo_asociado"];
        $hora = "10:00";
        $oficial = $rw["oficial_seguimiento"];
        $observaciones = "AVISOS AUTOMATICOS DE FINAL DE PLAZO";
        $numero = 0;
        $msg .= date("H:i:s") . "\t{$socio}\t{$credito}\tAgregando Aviso al Oficial {$oficial} \r\n";
        setNuevaNotificacion($socio, $credito, $grupo, $numero, $fecha, $hora, $observaciones, $oficial, "pago_unico");
    }
    return $msg;
}
function jsaSetEvent($numero, $socio, $solicitud, $grupo, $fecha, $hora, $observaciones, $oficial)
{
    setNuevaNotificacion($socio, $solicitud, $grupo = 99, $numero, $fecha, $hora, $observaciones, $oficial);
    return "Se Agrego la Notificacion {$numero} al Socio {$socio} por el Credito {$solicitud}";
}