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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
| <!-- #Include virtual="/Scripts/eStockFuncs.asp" -->
<%
If IsValid(Request("User"), Request("Valid")) Then
Dim sSQL
Dim RS
Dim RS2
Dim RS3
Dim iCount
Dim sType
Dim cType
Dim fSubTot
Dim iQtyTot
Dim fTot
Dim iQty
On Error Resume Next
%>
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Eurosource Stock Report</title>
<%
If Request("Print") <> "" Then
%>
<OBJECT ID="PTLauncher" CLASSID="CLSID:B43D3361-D975-4BE2-87FE-438AB8E74394" codebase="/Scripts/Printing/brochuremachine.dll#Version=1.1.0.7"></OBJECT>
<%
End If
%>
</head>
<body>
<input type="hidden" id="PrintPage" value="stock_report">
<div id="layoutrect" align="left" style="position: absolute; left: 0; top: 0; width: 700px; height: 450px; overflow: auto; word-wrap: break-word;">
<table border="0" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td width="50%" colspan="5" align="center">
<p style="padding-bottom: 25"><b><font face="Arial" size="5">Eurosource
Stock ReportTEST
</font></b></p>
</td>
</tr>
<tr>
<td width="50%" colspan="5" align="center">
<p style="padding-bottom: 25"><b><font face="Arial" size="4">Date <%=Date()%>
</font></b></p>
</td>
</tr>
<tr>
<td width="20%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2"><font face="Arial" size="1">Ref</font></td>
<td width="40%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2"><font face="Arial" size="1">Description</font></td>
<td width="10%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2"><font face="Arial" size="1">Quality</font></td>
<td width="10%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2"><font face="Arial" size="1">Quantity</font></td>
<td width="20%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2" align="right"><font face="Arial" size="1">Value</font></td>
</tr>
<%
fTot = 0
iQty = 0
For iCount = 0 To 2
Select Case iCount
Case 0
sType = "Laser"
cType = "L"
Case 1
sType = "Inkjet"
cType = "I"
Case Else
sType = "Mobile"
cType = "M"
End Select
fSubTot = 0
iQtyTot = 0
%>
<tr>
<td width="50%" colspan="5">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="25">
<tr>
<td><b><font face="Arial" size="2"><%=sType%> Product</font></b></td>
</tr>
</table>
</td>
</tr>
<%
sSQL = "Select Distinct S.ProductName, P.ProductDesc From Stock S Left Join Products P On (S.ProductName = P.ProductName) Where P.Type = '" & cType & "' And S.Quality <> 'S' Order By S.ProductName Asc"
Set RS = NewRS(sSQL)
While Not RS.EOF
sSQL = "Select Distinct Quality From Stock Where ProductName = '" & SQLString(RS("ProductName")) & "' And Quality <> 'S' Order By Quality Asc"
Set RS2 = NewRS(sSQL)
While Not RS2.EOF
sSQL = "Select Sum(Quantity) As Qty From Stock Where ProductName = '" & SQLString(RS("ProductName")) & "' And Quality = '" & SQLString(RS2("Quality")) & "'"
Set RS3 = NewRS(sSQL)
iTempQ = RS3("Qty")
If IsNull(iTempQ) Then
iTempQ = 0
End If
iTempQ = CInt(iTempQ)
iTempP = RS("ProductPrice")
If IsNull(iTempP) Then
iTempP = 0
End If
iTempP = CDbl(iTempP)
iTempP = iTempP * iTempQ
fSubTot = fSubTot + iTempP
iQtyTot = iQtyTot + iTempQ
%>
<tr>
<td width="50%" colspan="5">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="25">
<tr>
<td width="20%" nowrap><font face="Arial" size="1"><%=Server.HTMLEncode(RS("ProductName"))%></font></td>
<td width="45%"><font face="Arial" size="1"><%=Server.HTMLEncode(RS("ProductDesc"))%></font></td>
<td width="10%" nowrap><font face="Arial" size="1"><%=Server.HTMLEncode(RS2("Quality"))%></font></td>
<td width="10%" nowrap><font face="Arial" size="1"><%=Server.HTMLEncode(iTempQ)%></font></td>
<td width="15%" nowrap>
<p align="right"><font face="Arial" size="1" nowrap>£ <%=FormatNumber(iTempP, 2)%></font></p>
</td>
<!-- <td width="18%"></td>-->
</tr>
</table>
</td>
</tr>
<%
Response.Flush
Set RS3 = Nothing
RS2.MoveNext
Wend
Set RS2 = Nothing
RS.MoveNext
Wend
Set RS = Nothing
%>
<tr>
<td width="50%" colspan="5">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="30">
<tr>
<td width="75%" style="padding-top: 13; padding-bottom: 8" nowrap><font face="Arial" size="2"><b>Total Value of
<%=sType%> Product</b></font></td>
<td width="12%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; padding-top: 13; padding-bottom: 8" nowrap><font face="Arial" size="2"><%=iQtyTot%></font></td>
<td width="13%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; padding-top: 13; padding-bottom: 8" nowrap>
<p align="right"><font face="Arial" size="2">£ <%=FormatNumber(fSubTot, 2)%></font></p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="50%" colspan="5"><br>
</td>
</tr>
<%
fTot = fTot + fSubTot
iQty = iQty + iQtyTot
Next
%>
<tr>
<td width="50%" colspan="5">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="30">
<tr>
<td width="75%" style="padding-top: 13; padding-bottom: 8"><font face="Arial" size="2" nowrap><b>Total
Value of Stock</b></font></td>
<td width="12%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; padding-top: 13; padding-bottom: 8" nowrap><font face="Arial" size="2"><b><%=iQty%></b></font></td>
<td width="13%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; padding-top: 13; padding-bottom: 8" nowrap>
<p align="right"><font face="Arial" size="2"><b>£ <%=FormatNumber(fTot, 2)%></b></font></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<%
If Request("Print") <> "True" Then
%>
<div style="top: 10px; right: 10px; z-index: 200; text-align: right">
<a href="#" onclick="SendCmd('PrintPage');" style="color: navy; cursor: hand;">Print...</a>
</div>
<%
Else
%>
<OBJECT id="printpage" PageSize='A4' PrinterShow="TRUE" Header="2e-Header Text" Footer="Page &p"></OBJECT>
<%
End If
%>
</body>
</html>
<%
Else
%>
<center><h1>Authentication Failure</h1></center>
<%
End If
%> |
Partager