<%@ Language=VBScript%> <% Option Explicit Response.Expires = 0 Response.Buffer = true Session.LCID = &h40c %> TANGUY FINANCES - Vos comptes

<% Dim objCon, strValeur, charTrading, blnOPCVM, strURL strValeur = "FR0000988685" Set objCon = Server.CreateObject("ADODB.Connection") objCon.Open "provider=sqloledb;server=basefour;database=db_web;uid=web_public;pwd=oddoweb" With Response .Write("") .Write("") .Write(" " & vbCrLf) .Write(" " & vbCrLf) .Write("" & vbCrLf) .Write("" & vbCrLf) '-- Espace de séparation .Write("" & vbCrLf) '-- Zone de perf et de graphiques .Write(" " & vbCrLf) .Write("" & vbCrLf) '-- Fin de fichier Call GetEndOfFile() .Write("
") .Write("") .Write("
") Call GetEnTete() .Write("
" & vbCrLf) '-- Zone de transactions Call OPCVMTransactionsTable(objCon, strValeur) .Write("
" & vbCrLf) '-- Zone d'informations Call OPCVMLeftTable(objCon, strValeur) .Write("" & vbCrLf) .Write("" & vbCrLf) Call OPCVMRightTable(objCon, strValeur, strURL) .Write("
") Set objCon = Nothing End With %>
Consultez les informations légales.
RENNES / 16, RUE DE LA MONNAIE BP 60515 - 35005 RENNES CEDEX / TÉL. : 02 99 78 19 19 - FAX : 02 99 79 58 63
NANTES / 2 , PLACE DELORME - 44000 NANTES / TÉL. : 02 40 20 28 29 - FAX : 02 40 08 24 12
PARIS / 33, AVENUE DU MAINE - 75755 PARIS CEDEX 15 / TÉL. : 01 44 10 40 01 - FAX : 01 44 10 40 02
<% Private Sub OPCVMTransactionsTable(ByRef pCon, ByVal pValeur) Dim nbCol Dim strLibE, strSicoE, strCoeffE, strLibM, strSicoM, strCoeffM, blnSousc, strFiles, dtmEffet, numCours, charPEA Dim strDiagr '-- code DGRA pour les fiches cob et produits nbCol=4 With Response .Write("") '-- En-tête de colonnes .Write(" ") .Write("") .Write("") .Write("") .Write("") If GetOPCVMDec(pCon, pValeur, strLibE, strSicoE, strCoeffE, strLibM, strSicoM, strCoeffM, blnSousc, charPEA, dtmEffet, strFiles, numCours) Then Dim numRowSpan, blnPartM '-- Présence d'une part décimale If Not IsNull(strSicoM) And strSicoM<>"" Then blnPartM=True numRowSpan=2 Else blnPartM = False numRowSpan=1 End If .Write("") strDiagr = Right(strFiles, Len(strFiles)-2) '-- Part entière .Write(" ") 'code de la part entiere .Write("") 'libelle de la part entiere .Write("") '-- Fiches strFiles=XYDGRA : X (0/1 pour fiche PROD); Y (0/1 pour fiche COB) ; DGRA code diagram 'fiche Produit .Write("") 'fiche COB .Write("") .Write("") '-- Part 1000è si elle existe If blnPartM Then 'code de la part 1000e .Write("") 'libelle de la part 1000e .Write("") .Write("") End If Else '-- Pb récupération données transaction .Write("") End If .Write("
Code IsinLibelléFiche ProduitFiche COB
" & strSicoE & "" & strLibE & "
" & strSicoM & "" & strLibM & "

") End With End Sub '-- Tableau de gauche Private Sub OPCVMLeftTable(ByRef pCon, ByVal pValeur) With Response '-- Tableau global comprenant 2 tableaux : Cours / Informations .Write("") .Write(" ") .Write("") .Write("") '-- Espace de séparation .Write(" ") .Write("") .Write(" ") '-- Tableau des infos génériques .Write(" ") .Write("") .Write("") .Write("
") '-- Tableau des cours, variation, perf., fiches Call GetOPCVMTradingDatas(pCon, pValeur) .Write("
") Call GetOPCVMGenericDatas(pCon, pValeur) .Write("
") End With End Sub '-- Tableau de droite Private Sub OPCVMRightTable(ByRef pCon, ByVal pValeur, ByVal pURL) With Response '-- Tableau global comprenant 2 tableaux : Perf / Graphique .Write("") .Write(" ") .Write(" ") .Write("") '-- Espace de séparation .Write(" ") .Write("") .Write(" ") '-- Tableau des graphiques .Write(" ") .Write("") .Write("") .Write("
") '-- Tableau des cours, variation, perf., fiches Call GetOPCVMPerfDatas(pCon, pValeur) .Write("
") Call GetOPCVMGraphDatas(pValeur, pURL) .Write("
") End With End Sub '-- Procédure de récupération des derniers cours, ... d'un OPCVM Private Sub GetOPCVMTradingDatas(ByRef pCon, ByVal pValeur) Dim numRow, objRS numRow = 0 '-- Récupération des données With Response .Write("") .Write(" ") .Write("") .Write("") Set objRS = pCon.Execute("db_web..ps_WEB_GetOPCVMTradingDatas_isin @isin='" & pValeur & "'") '.Write "ps_WEB_GetOPCVMTradingDatas @isin='" & pValeur& "'" If pCon.Errors.Count = 0 Then If Not (objRS.EOF Or objRS.BOF) Then '-- Dernier Cours .Write(" ") .Write("") .Write("") .Write("") '-- Cours précédent .Write(" ") .Write("") .Write("") .Write("") '-- Variation / avec indicateur par fleche .Write(" ") .Write("") .Write(""& vbCrLf) .Write("") '-- Perf. depuis le 01/01 .Write(" ") .Write("") .Write("") .Write("") '-- Perf. sur 12 mois .Write(" ") .Write("") .Write("") .Write("") Else 'Call ErrHandler(2, pValeur) Call wtxErrorHandler(pValeur,2) End If '-- Libération des objets objRS.Close Set objRS = Nothing Else Call ErrHandler(2, pValeur) End If .Write("
 Dernières données
Dernier Coursau " & FormatFrenchDate(objRS(0)) & " :   " & FormatMontant(objRS(1)) & " € 
Cours précédent" & FormatMontant(objRS(2)) & " € 
Variation") .Write(" ") .Write("") .Write("") .Write("") .Write("") .Write("
") Session.LCID = 1033 If CDbl(objRS(3))>0 Then .Write("") ElseIf CDbl(objRS(3)) < 0 Then .Write("") Else .Write("") End If Session.LCID = 1036 .Write("" & FormatMontant(objRS(3)) & " % 
"& vbCrLf) .Write("
Perf. depuis 01/01" & FormatMontant(objRS(4)) & " % 
Perf. sur 12 mois" & FormatMontant(objRS(5)) & " % 
") End With End Sub Private Sub GetOPCVMGenericDatas(ByRef pCon, ByVal pValeur) '-- Récupération des données Dim numRow, objRS, objRS2, objConnection numRow=0 Set objRS = pCon.Execute("db_web..ps_WEB_GetOPCVMGenericDatas_isin @isin='" & pValeur & "'") set objConnection=server.createobject("ADODB.Connection") objConnection.open "provider=sqloledb;server=basefour;database=db_web;uid=web_public;pwd=oddoweb" With Response .Write("") .Write(" ") .Write("") .Write("") ' .Write "ps_WEB_GetOPCVMGenericDatas @isin='" & pValeur & "'" If pCon.Errors.Count = 0 Then If Not (objRS.EOF Or objRS.BOF) Then Set objRS2 = objConnection.Execute ("Exec db_web..ps_WEB_COM_Select @id='" & objRS(9) & "'") '-- Date de création .Write(" ") .Write("") .Write("") .Write("") '-- Durée conseillée de placement .Write(" ") .Write("") .Write("") .Write("") '-- Fréquence de valorisation .Write(" ") .Write("") .Write("") .Write("") '-- Eligible au PEA .Write(" ") .Write("") .Write("") '-- Orientation de Gestion .Write(" ") .Write("") .Write("") objRS2.Close Set objRS2 = Nothing Else 'Call ErrHandler(2, pValeur) Call wtxErrorHandler(pValeur,2) End If objRS.Close Set objRS = Nothing objConnection.close set objConnection=nothing Else 'Call ErrHandler(2, pValeur) Call wtxErrorHandler(pValeur,2) End If .Write("
 Informations Générales
Date de Création" & FormatFrenchDate(objRS(0))& "
Durée conseillée de placement" & objRS(1)& "
Fréquence de valorisation") Select Case objRS(4) Case "J" .Write("Quotidienne") Case "S" .Write("Hebdomadaire") Case "M" .Write("Mensuelle") Case "Q" .Write("Bimensuelle") Case "H" .Write("Semestrielle") Case Else .Write("N/A") End Select .Write("
Eligible au PEA") If objRS(2) Then .Write "Oui" Else .Write "Non" End If .Write("
Orientation de Gestion :") .Write(" " & Trim(objRS(8))& "
") End With End Sub Private Sub GetOPCVMPerfDatas(ByRef pCon, ByVal pValeur) Dim objRS Const C_NUM_YEARS = 3 '-- Nombre d'années pour l'affichage des perf With Response .Write("") .Write("") .Write("") .Write("") .Write(" ") .Write("") .Write("") .Write("") '-- Récupération des perf '.Write "Exec db_web..ps_WEB_GetOPCVMPerf_isin @isin ='" & Trim(pValeur) &"', @numYears=" & C_NUM_YEARS Set objRS = pCon.Execute("Exec db_web..ps_WEB_GetOPCVMPerf_isin @isin ='" & Trim(pValeur) &"', @numYears=" & C_NUM_YEARS ) If pCon.Errors.Count = 0 Then If Not (objRS.EOF Or objRS.BOF) Then Dim noLigne noLigne=0 Do While Not objRS.EOF .Write(" ") '-- Date .Write("") '-- Performance If Not IsNull(objRS(1)) Then .Write("") Else .Write("") End If .Write("") objRS.MoveNext noLigne=noLigne+1 Loop Else 'Call ErrHandler(2, pValeur) Call wtxErrorHandler(pValeur,2) End If Set objRS = Nothing Else Call ErrHandler(2, pValeur) End If .Write("
 Performances
AnnéePerformances  
" & Year(objRS(0))) '-- 1ere date If noLigne=0 Then .Write ", jusqu'au " & Right("0"&Day(objRS(0)),2) & "/" & Right("0"&Month(objRS(0)),2) End If .Write("  " & FormatMontant(objRS(1))& " %  Non Disponible
") End With End Sub Private Sub GetOPCVMGraphDatas(ByVal pValeur, ByVal pURL) Dim strLib Dim charGraph Dim numDate strLib = Request.QueryString("lib") With Response .Write("") .Write("") .Write("") 'Bouton pour agrandir graph .Write("") '-- Formulaire de la période du graph .Write("") .Write("") .Write("") '-- graph .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write("
") If Request.QueryString("graph")<>"" Then charGraph=Request.QueryString("graph") Else charGraph=0 End If .Write("") .Write(" ") .Write("
"& vbCrLf) numDate = Request.QueryString("graph") '-- Graphes historiques (sur 6 mois, 1 an, 2 an) Call OPCVMHistoData(333, 200, numDate, CStr(pValeur)) .Write("
") .Write("") End With End Sub Private Sub OPCVMHistoData (numLargeur, numHauteur, numG, strValue) 'On error resume next Dim numIndex, numCount , strDateEnd, strDateBegin, numMonth, strSQL, objCon, objRS Select Case numG Case 1 numMonth=12 Case 2 numMonth=24 Case Else numMonth=6 End Select strDateEnd = month(date)&"/" & day(date) &"/" & year(date) strDateBegin = month(DateAdd("m",-numMonth,Date))&"/" & day(DateAdd("m",-numMonth,Date)) &"/" & year(DateAdd("m",-numMonth,Date)) 'Response.Write "strDateEnd" & strDateEnd &"
" 'Response.Write "strDateBegin" & strDateBegin &"
" Set objCon = Server.CreateObject("ADODB.Connection") objCon.Open "provider=sqloledb;server=basefour;database=db_web;uid=web_public;pwd=oddoweb" If objCon.Errors.Count <> 0 Then Response.Write("

 

") Response.Write("  Information momentanement non disponible") Else 'Response.Write ("db_web..ps_WEB_GetOPCVMGraphDatas_isin @isin='" & strValue & "', @dtmBegin='" & strDateBegin & "', @dtmEnd='" & strDateEnd & "', @count=1") Set objRS = objCon.Execute("db_web..ps_WEB_GetOPCVMGraphDatas_isin @isin='" & strValue & "', @dtmBegin='" & strDateBegin & "', @dtmEnd='" & strDateEnd & "', @count=1") numCount=CLng(objRS(0)) Set objRS = objCon.Execute("db_web..ps_WEB_GetOPCVMGraphDatas_isin @isin='" & strValue & "', @dtmBegin='" & strDateBegin & "', @dtmEnd='" & strDateEnd & "', @count=0") 'requete SQL qui recupere un cours à une date de valorisation 'les donnees sont converties pour etre interpretées 'comme des parametres de l'applet histo2000c.class If objCon.Errors.Count <> 0 Then Response.Write("Information momentanement non disponible") Else ' numCount=objRS.RecordCount With Response .Write("
"& vbCrLf) .Write("
"& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) .Write(""& vbCrLf) 'si on dépasse le nbre limité de points 'on prend les 397 dernieres valeurs à partir de la date la plus recente Dim numStep, numMaxData numMaxData=numCount numStep=1 If numCount>400 Then If numCount Mod 400 > 0 Then numStep = 1+ Fix(numCount/400) 'If numCount Mod numStep > 0 Then numCount = 1+ Fix(numCount/numStep) 'Else ' numCount = Fix(numCount/numStep) 'End If Else numStep = Fix(numCount/400) numCount = Fix(numCount/numStep) End If End If .Write(""& vbCrLf) .Write(""& vbCrLf) Dim numData numData=0 numIndex=0 Do While Not objRS.EOF If (numData Mod numStep = 0 Or (numIndex=numCount-1 And numData=numMaxData-1))Then .Write (""& vbCrLf) .Write (""& vbCrLf) numIndex=numIndex+1 End If objRS.MoveNext numData=numData+1 Loop .Write("
"& vbCrLf) End With End If Set objRS = Nothing End If Set objCon = Nothing End Sub Private Sub GetEnTete() With Response .Write("") .Write("") .Write("") .Write("") .Write("") .Write("") .Write("
") .Write("") End With End Sub Private Sub GetEndOfFile() With Response .Write("
") .Write("
") End With End Sub Private Function GetRowColor(pRow) If pRow Mod 2 = 0 Then GetRowColor ="#C2DEF4" Else GetRowColor ="#DAECFB" End If pRow = pRow + 1 End Function Private Function OPCVMExistsInGL(ByVal pIsin) OPCVMExistsInGL = True Exit Function Dim wtxValeur Set wtxValeur = Server.CreateObject( "wtx.wtapi" ) wtxValeur.Set "valeur", pIsin 'wtxValeur.Set "Place", 1 wtxValeur.Set "Fonction", 0 wtxValeur.Ask("Cours.asp") If wtxValeur.Error <> 0 Then 'gestion des erreurs envoi d'un mail pour signaler que l'opcvm n'existe pas chez GL Call SendMail("","",Application("aparamAdminParticuliersName"),Application("aparamAdminParticuliersAddress"),"Particuliers: opcvm " & pValeur,"L'opcvm " & pValeur &" n'est pas enregistré chez GL") OPCVMExistsInGL = False Else 'pIsin = wtxValeur.Get(10) OPCVMExistsInGL = True End If Set wtxvaleur = Nothing End Function Private Function DateIsValid(ByRef pCon, ByRef pdtmEffet, ByVal pValeur) 'On Error Resume Next 'Response.Write pdtmEffet 'Response.end If (DateDiff("n",Now(),pdtmEffet)<0 Or IsNull(pdtmEffet)) Then DateIsValid = False '-- Envoi éventuel d'un mail d'alerte sur la réplication si cette larte n'a pas encoré été signalée pCon.Execute "ps_WEB_App_InserOPCVMHorairesAlerte @pIsin =" & pValeur ,,128 If pCon.Errors.Count= 0 Then Dim strSubject, strMsg strSubject =">>KO : Pb. réplication DATASIX..db_valeur -> BASEONE..db_web" strMsg="Erreur Application Web Particuliers." & vbCrLf _ & "OPCVM " & pValeur & " (pb. d'heure) " & vbCrLf _ & "Table BASEONE..DB_WEB..OPCVMWEB : Le champ OPCVM_DT_HEURE_ENREG contient des dates non contractuelles."_ & "Ce problème survient lorsqu'il y a un problème de réplication de la table vl_opcvm entre "_ & "DATASIX..db_valeur et BASEONE..db_web, ou lorsque que le trigger tg_VAL_UpdateDTHeureEnregForWeb "_ & "de la table BASEONE..db_web..vl_opcvm a été désactivé." pCon.Errors.Clear End If Else DateIsValid = True End If End Function '-- parts Entière et Décimale d'un OPCVM (C ou D) Private Function GetOPCVMDec(ByRef pCon, ByVal pIsin, ByRef pLibE, ByRef pIsinE, ByRef pCoeffE,_ ByRef pLibM, ByRef pIsinM, ByRef pCoeffM,_ ByRef pSousc, ByRef pPEA, ByRef pEffet, ByRef pFiles, ByRef pCours) Dim numCount, objRS, blnOK blnOK = False numCount=0 Set objRS = objCon.Execute("db_web..ps_WEB_GetOPCVMProperties_isin @isin='" & pIsin & "'") If pCon.Errors.Count = 0 Then If Not (objRS.EOF Or objRS.BOF) Then pIsinE = objRS(0).Value '-- sico part 1 pLibE=Trim(objRS(1).Value) '-- libellé part 1 pCoeffE=objRS(2).Value '-- coeff part 1 pIsinM = objRS(3).Value '-- sico part 1000 pLibM=Trim(objRS(4).Value) '-- libellé part 1000 pCoeffM=objRS(5).Value '-- coeff part 1000 pSousc = CBool(objRS(6).Value) '-- souscription on-line pPEA = CInt(objRS(7).Value) '-- éligible PEA pEffet = Trim(objRS(8).Value) '-- date d'effet () pFiles = Trim(objRS(9).Value) '-- XYDGRA : X (0/1 pour fiche PROD); Y (0/1 poyr fiche COB) ; DGRA code diagram pCours = objRS(10).Value '-- dernier cours blnOK = True End If End If Set objRS = Nothing GetOPCVMDec = blnOK End Function 'Fonction qui formate la date à la française Public Function FormatFrenchDate(ByVal dtm) Dim d, m If dtm="" Or IsNull(dtm) Or Not IsDate(dtm) Then FormatFrenchDate="--" Else dtm=CDate(dtm) d=Day(dtm) If d < 10 Then d="0"&d m=Month(dtm) If m < 10 Then m="0"&m FormatFrenchDate = d & "/" & m & "/" & Year(dtm) End If End Function 'Fonction de formatage des montants (2 chiffres après la virgule) Public Function FormatMontant(ByVal mnt) If isNull(mnt) Then FormatMontant="--" Exit Function End If mnt = Replace(mnt, ".", ",") If mnt="" Or isNull(mnt) Or Not IsNumeric(mnt) Then FormatMontant="--" Else FormatMontant=Replace(FormatNumber(mnt,2,-1,0,-1),",", ".") End If End Function 'formate la date de la requete au format francais Function CreationDate(RS) Dim intDay, intMonth, strDate intDay = Day(RS(1)) intMonth = Month(RS(1)) If intDay < 10 Then intDay = "0" & intDay If intMonth < 10 Then intMonth = "0" & intMonth strDate = strDate & intDay & "/" & intMonth & "/" & Year(RS(1)) CreationDate = strDate End Function 'Fonction qui formate une date au format SSAAMMJJ Public Function FormatDateSSAAMMJJ(ByVal dtm) If dtm="" Or IsNull(dtm) Then FormatDateSSAAMMJJ="--" Else Dim d, m dtm=CDate(dtm) d=Day(dtm) If d < 10 Then d="0"&d m=Month(dtm) If m < 10 Then m="0"&m FormatDateSSAAMMJJ = Year(dtm) & m & d End If End Function %>