<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> Volley-Ball Club Tihange - Huy
<% If Request.QueryString("idRelJVModif") <> "" then idRelJVModif = Request.QueryString("idRelJVModif") Client = Request.QueryString("Client") Nombre = Request.QueryString("Nbre") Commentaire = Request.QueryString("Commentaire") PayeJoueur = Request.QueryString("PayeJoueur") LivreClient = Request.QueryString("LivreClient") Set rsModifRelJV = Server.CreateObject("ADODB.Recordset") sqlModifRelJV = "UPDATE RelVenteJoueur_club SET " & _ "Client=" & ToSQL(Client, "Text") & ", " & _ "NbPces=" & Nombre & ", " & _ "Commentaire=" & ToSQL(Commentaire, "Text") & ", " & _ "LivreClient=" & ToSQL(LivreClient, "Text") & ", " & _ "PayeJoueur=" & ToSQL(PayeJoueur, "Text") & " " & _ "WHERE id=" & idRelJVModif openrs rsModifRelJV, sqlModifRelJV end if IDJ = Request.QueryString("idJ") IDV = request.QueryString("idV") NomVente = DLookUp("Ventes_club", "Description", "id=" & idV) PrixVente = DLookUp("Ventes_club", "PrixVente", "id=" & idV) DateButoire = DLookUp("Ventes_club", "DateButoire", "id=" & idV) ChkDateButoire = DateButoire dayDateButoire = day(DateButoire) monthDateButoire = month(DateButoire) yearDateButoire = year(DateButoire) nbdayDateButoire = Weekday(DateButoire,2) jourDateButoire = DLookUp("jours_semaine", "DayFr", "id=" & nbdayDateButoire) DateButoire = dayDateButoire & "/" & monthDateButoire & "/" & yearDateButoire PrenomJ = DLookUp("Joueurs_club", "Prenom", "id=" & idJ) NomJ = DLookUp("Joueurs_club", "Nom", "id=" & idJ) Response.Write("

Vente " & NomVente & " (" & PrixVente & " €/pce)

") Response.Write("

" & NomJ & " " & PrenomJ & "

") Response.Write("

Bons de commandes et argent à rentrer pour le " & jourDateButoire & " " & DateButoire & "

") Response.Write("Télécharger le document de commande

") Set rsVentesJ = Server.CreateObject("ADODB.Recordset") sqlVentesJ = "SELECT * FROM RelVenteJoueur_club WHERE idJ=" & IDJ & " AND idV=" & IDV & " ORDER BY Client" openrs rsVentesJ, sqlVentesJ If not rsVentesJ.eof then %> <% If date() <= ChkDateButoire then %> <% end if %> <% TotalVenteGlobal = 0 TotalJNB = 0 TotalEuroRecu = 0 While not rsVentesJ.eof TotalVente = 0 TotalVente = (PrixVente * rsVentesJ("NbPces")) TotalVenteGlobal = TotalVenteGlobal + TotalVente TotalJNB = TotalJNB + rsVentesJ("NbPces") If isnull(rsVentesJ("Commentaire")) OR rsVentesJ("Commentaire") = "" then Comment = " " else Comment = rsVentesJ("Commentaire") end if LivreClient = rsVentesJ("LivreClient") PayeJoueur = rsVentesJ("PayeJoueur") If PayeJoueur = "oui" then TotalEuroRecu = TotalEuroRecu + TotalVente end if %> <% If date() <= ChkDateButoire then %> <% end if %> <% rsVentesJ.movenext Wend rsVentesJ.close set rsVentesJ = nothing %> <% If date() <= ChkDateButoire then %> <% else %> <% end if %>
Client Nbre Total Reçu client Livré client Commentaire   
<%=rsVentesJ("Client")%> <%=rsVentesJ("NbPces")%> <%=TotalVente%> € <%=PayeJoueur%> <%=LivreClient%> <%=Comment%>&IDJ=<%=IDJ%>&IDV=<%=IDV%>" target="_self">Modifier &IDJ=<%=IDJ%>&IDV=<%=IDV%>&location=admin" target="_self">Supprimer
Total : <%=TotalJNB%> pces - <%=TotalVenteGlobal%> € (<%=TotalEuroRecu%> € reçu)Total : <%=TotalJNB%> pces - <%=TotalVenteGlobal%> € (<%=TotalEuroRecu%> € reçu)


<% end if Client = "" Nombre = "" Commentaire = "" LivreClient = "non" PayeJoueur = "non" If Request.QueryString("idRelJV") <> "" then idRelJV = Request.QueryString("idRelJV") TitreForm = "Modifier commande" Set rsRelJV = Server.CreateObject("ADODB.Recordset") sqlRelJV = "SELECT * FROM RelVenteJoueur_club WHERE id=" & idRelJV openrs rsRelJV, sqlRelJV Client = rsRelJV("Client") Nombre = rsRelJV("NbPces") Commentaire = rsRelJV("Commentaire") LivreClient = rsRelJV("LivreClient") PayeJoueur = rsRelJV("PayeJoueur") targetform = "myvente.asp" submitvalue = "Modifier" else TitreForm = "Ajouter commande" targetform = "addmyvente.asp" submitvalue = "Ajouter" end if If date() <= ChkDateButoire then %> <% If Request.QueryString("idRelJV") <> "" then Response.Write("") end if %>

<%=TitreForm%>

Client :
Nombre :
Commentaire :
Reçu client :
Livré client :
 
<% else Response.Write("

La date limite des commandes est dépassée

") end if %>