1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
<!-- #include file="Connexion_SQL.asp"-->
<%
' sélectionne les informations relatives à notre article renseigné dans le formulaire AVK
dim Cstd ,Cpmp,CpmpD,Gart,KvM,KV,DLERP,DAPP,Conso, coutU , DelaiA 'variable qui stocke le données selon les différentes cas
code= request("Code_Article")
sql="select b.Description, b.[Coût STd], b.[Coût PMP], b.[Coût PMP déporté],a.[Groupe_art],a.[Unite],b.[Kv modifiée],b.[Kv],b.[Delai LREP (j)],b.[Delai d appro (j)]" & _
"from T_EXTR_BASAMONT b,T_CALCUL_ARTICLE_AMONT a " & _
"where A.ARTICLE = b.code_article and b.code_article ='" & code & "'"
set rs=conn.execute(sql)
do while not rs.EOF
Cstd=rs("Coût STd")
Cpmp=rs("Coût PMP")
CpmpD=rs("Coût PMP déporté")
Gart=rs("Groupe_art")
KvM=rs("Kv modifiée")
KV=rs("KV")
DLERP=rs("Delai LREP (j)")
DAPP=rs("Delai d appro (j)")
If Gart="MRPRM" or Gart="MRPRMD" then
coutU=Cstd
elseif CpmpD<>"" or CpmpD<>999999 then
coutU = CpmpD
else coutU=Cpmp
end if
If rs("Kv modifiée")<>"" then
ConsoM = rs("Kv modifiée")
Else
ConsoM = rs("Kv")
End If
If rs("Delai LREP (j)")<>"" then
DelaiA = rs("Delai LREP (j)")
Else DelaiA=rs("Delai d appro (j)")
End If
monRetourHTML = "<td width=340><font size=2><b>Désignation :</b></font><br>" & rs("description") & "</td>
<td width=340><font size=2><b>Prix unitaire : </b></font><br>" & CoutU & "</td>
<td width=340><font size=2><b>Délai d'approvisionnement :</b></font><br>" & DelaiA& "</td>
<tr><td width=340><font size=2><b>Consommation mensuelle moyenne actuelle :</b></font><br> " & consoM & "</td>
<td width=340></td></tr><tr><td colspan=2 width=682><font size=2><b><font color=red>Soit :</font>consommation mensuelle moyenne à prévoir (exprimée dans l'unité de mesure standard PSFT) :<br>
<input name='Conso_Mens_APrev' size=20 maxlength=30>" & rs("Unite") & "<br>"
rs.movenext
Loop
Set rs=Nothing
Response.Write monRetourHTML
%> |
Partager