PageRenderTime 20ms CodeModel.GetById 9ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/beta/Inquiry/OtherReports.asp

http://github.com/khaneh/Orders
ASP | 347 lines | 325 code | 12 blank | 10 comment | 21 complexity | bbf5f0552242f734a09dd039efe997be MD5 | raw file
  1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2'AR (6)
  3PageTitle="����� ����"
  4SubmenuItem=11
  5if not Auth("C" , 0) then NotAllowdToViewThisPage()
  6
  7%>
  8<!--#include file="top.asp" -->
  9<!--#include File="../include_farsiDateHandling.asp"-->
 10<!--#include File="../include_JS_InputMasks.asp"-->
 11<!--#include File="../include_UtilFunctions.asp"-->
 12<STYLE>
 13	.RepTable {font-family:tahoma; font-size:9pt; direction: RTL; }
 14	.RepTable td {border:1pt solid white;vertical-align:top;}
 15	.RepTable a {text-decoration:none; color:#222288;}
 16	.RepTable a:hover {text-decoration:underline;}
 17	.RepTable2 th {font-size:9pt; padding:5px; background-color:#0080C0;height:25px;}
 18	.RepTable2 td {height:25px;}
 19	.RepTable2 input {font-family:tahoma; font-size:9pt; border:1 solid black;}
 20	.RepTable2 select {font-family:tahoma; font-size:9pt; border:1 solid black;}
 21</STYLE>
 22<BR>
 23<%
 24'-----------------------------------------------------------------------------------------------------
 25'----------------------------------------------------------------------------------------- Search Form
 26'-----------------------------------------------------------------------------------------------------
 27if request("act")="" then
 28
 29StartOfTheYear = left(shamsiToday(),4) & "/01/01"
 30%>
 31
 32<TABLE class="RepTable" align=center cellspacing=10 >
 33	<TR height=110>
 34		<TD style="border:1pt solid white;width:130pt" align=center>
 35		<% if Auth("C" , 1) then %>
 36			<FORM METHOD=POST ACTION="?act=dailySale">
 37			<table class="RepTable2" id="AInvoices">
 38			<tr>
 39				<th colspan="2">����� ���� ������</td>
 40			</tr>
 41			<tr>
 42				<td colspan="2">&nbsp;</td>
 43			</tr>
 44			<% 
 45			if Auth("C" , 2) then 
 46			%>
 47				<tr>
 48					<td align=left>��&nbsp;�����</td>
 49					<td><INPUT TYPE="text" NAME="input_date_start" value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 50				</tr>
 51				<tr>
 52					<td align=left>��&nbsp;�����</td>
 53					<td><INPUT TYPE="text" NAME="input_date_end"  value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 54				</tr>
 55			<%
 56			else
 57			%>
 58				<tr>
 59					<td colspan="2" align=left>
 60					<SELECT NAME="input_date">
 61						<option value="<%=shamsiToday()%>">			�����		<%=replace(shamsitoday(),"/" ,".")%> </option>
 62						<option value="<%=shamsidate(date()-1)%>">	�����		<%=replace(shamsidate(date()-1),"/" ,".")%> </option>
 63						<option value="<%=shamsidate(date()-2)%>">	2 ��� ���	<%=replace(shamsidate(date()-2),"/" ,".")%> </option>
 64						<option value="<%=shamsidate(date()-3)%>">	3 ��� ���	<%=replace(shamsidate(date()-3),"/" ,".")%> </option>
 65						<option value="<%=shamsidate(date()-4)%>">	4 ��� ���	<%=replace(shamsidate(date()-4),"/" ,".")%> </option>
 66					</SELECT>
 67					</td>
 68				</tr>
 69			<%
 70			end if
 71			%>
 72			<tr>
 73				<td colspan="2">&nbsp;</td>
 74			</tr>
 75			</table>
 76			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
 77			</FORM>
 78		<% end if %>
 79		&nbsp;
 80		</TD>
 81		<TD style="border:1pt solid white;width:130pt" align=center>
 82		<% if Auth("C" , 3) then %>
 83			<FORM METHOD=POST ACTION="Rep_InvoiceItems.asp?act=show">
 84			<table class="RepTable2" id="InvoiceItems">
 85			<tr>
 86				<th colspan="2">����� ���� ��� ����</td>
 87			</tr>
 88			<tr>
 89				<td align=left>��&nbsp;�����</td>
 90				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 91			</tr>
 92			<tr>
 93				<td align=left>��&nbsp;�����</td>
 94				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 95			</tr>
 96			<tr>
 97				<td align=left>����</td>
 98				<td align=left>
 99					<SELECT NAME="Category" style="width:120px;">
100						<option value="">--- ������ ���� ---</option>
101						<option value="0" <%if Category=0 then response.write "selected " : GroupName="[ ��� ] "%>>���</option>
102<%
103					mySQL = "SELECT * FROM InvoiceItemCategories WHERE ID > 0"
104					Set RS1 = Conn.Execute(mySQL)
105					Do Until RS1.eof
106%>				
107						<option value="<%=RS1("ID")%>" <%if RS1("ID")=Category then response.write "selected "%>><%=RS1("Name")%></option>
108<%
109						RS1.moveNext
110					Loop
111%>
112					</SELECT>
113				</td>
114			</tr>
115			<tr>
116				<td align=left>�����</td>
117				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
118			</tr>
119			<tr>
120				<td align=left>��������</td>
121				<td align=left>
122					<SELECT NAME="isA" style="width:120px;">
123						<option value="0" <%if isA=0 then response.write "selected " %>>��� </option>
124						<option value="1" <%if isA=1 then response.write "selected " %>>�� ��� ���</option>
125						<option value="2" <%if isA=2 then response.write "selected " %>>���� ��� ���</option>
126					</SELECT>
127				</td>
128			</tr>
129			</table>
130			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
131			</FORM>
132		<% end if %>
133		&nbsp;
134		</TD>
135		<TD align=center>
136		<% if Auth("C" , 4) then %>
137			<FORM METHOD=POST ACTION="Rep_AInvoices.asp?act=show">
138			<table class="RepTable2" id="AInvoices">
139			<tr>
140				<th colspan="2">����� ������ �� (���)</td>
141			</tr>
142			<tr>
143				<td align=left>�� �����</td>
144				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
145			</tr>
146			<tr>
147				<td align=left>�� �����</td>
148				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
149			</tr>
150			<tr>
151				<td align=left>�����</td>
152				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
153			</tr>
154			</table>
155			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
156			<br><br>
157			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="Button" value=" ����� ������ " onclick="document.forms[2].action='Rep_AInvoices.asp?act=showByDay';document.forms[2].submit();">&nbsp;
158			</FORM>
159		<% end if %>
160		&nbsp;
161		</TD>
162	</TR>
163	<TR height=110>
164		<TD style="border:1pt solid white;width:130pt" align=center>
165		<% if Auth("C" , 5) then %>
166			<FORM METHOD=POST ACTION="Rep_AReceipt.asp?act=show">
167			<table class="RepTable2" id="AInvoices">
168			<tr>
169				<th colspan="2">����� ���� ��</td>
170			</tr>
171			<tr>
172				<td align=left>�� �����</td>
173				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
174			</tr>
175			<tr>
176				<td align=left>�� �����</td>
177				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
178			</tr>
179			<tr>
180				<td align=left>�����</td>
181				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
182			</tr>
183			<tr>
184				<td align=left>���������</td>
185				<td align=left>
186					<SELECT NAME="isA" style="width:90px;">
187						<option value="0" >��� </option>
188						<option value="1" selected >�� ��� ���</option>
189						<option value="2" >���� ��� ���</option>
190					</SELECT>
191				</td>
192			</tr>
193			</table>
194			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
195			</FORM>		
196		<% end if %>
197		&nbsp;
198		</TD>
199		<TD style="border:1pt solid white;width:130pt" align=center>
200		<% if Auth("C" , 7) then %>
201			<FORM METHOD=POST ACTION="Rep_COGS.asp?act=show">
202			<table class="RepTable2" id="AInvoices">
203			<tr>
204				<th colspan="2">����� ���� ���� ���</td>
205			</tr>
206			<tr>
207				<td colspan="2">&nbsp;</td>
208			</tr>
209			<tr>
210				<td align=left>�� �����</td>
211				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
212			</tr>
213			<tr>
214				<td align=left>�� �����</td>
215				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
216			</tr>
217			<tr>
218				<td colspan="2">&nbsp;</td>
219			</tr>
220			</table>
221			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
222			</FORM>		
223		<% end if %>
224		 &nbsp;
225		</TD>
226		
227<%
228		'sam add this!	
229%>
230		<TD align=center>
231		<% if Auth("C" , 4) then %>
232			<FORM METHOD=POST ACTION="Rep_BInvoices.asp?act=show">
233			<table class="RepTable2" id="AInvoices">
234			<tr>
235				<th colspan="2">����� �ǘ����� (�)</td>
236			</tr>
237			<tr>
238				<td align=left>�� �����</td>
239				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
240			</tr>
241			<tr>
242				<td align=left>�� �����</td>
243				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
244			</tr>
245			<tr>
246				<td align=left>�����</td>
247				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
248			</tr>
249			</table>
250			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
251			<br><br>
252			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="Button" value=" ����� ������ " onclick="document.forms[2].action='Rep_BInvoices.asp?act=showByDay';document.forms[2].submit();">&nbsp;
253			</FORM>
254		<% end if %>
255		&nbsp;
256		</TD>
257
258	</TR>
259	<!---------------------------------------------------- SAM -->
260	<TR height=110>
261		<TD style="border:1pt solid white;width:130pt" align=center>
262		<% if Auth("C" , 8) then %>
263			<FORM METHOD=POST ACTION="Rep_4col.asp?act=show">
264			<table class="RepTable2" id="col4">
265			<tr>
266				<th colspan="2">����� ���� ���� �����</td>
267			</tr>
268			<tr>
269				<td colspan="2">&nbsp;</td>
270			</tr>
271				<tr>
272					<td align=left>��&nbsp;�����</td>
273					<td><INPUT TYPE="text" NAME="FromDate" value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
274				</tr>
275				<tr>
276					<td align=left>��&nbsp;�����</td>
277					<td><INPUT TYPE="text" NAME="ToDate"  value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
278				</tr>
279			<tr>
280				<td colspan="2">&nbsp;</td>
281			</tr>
282			</table>
283			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
284			</FORM>
285		<% end if %>
286		&nbsp;
287		</TD>
288		<!---------------------------------------------------------------------------------->
289		<TD style="border:1pt solid white;width:130pt" align=center>
290		<% if Auth("C" , 9) then %>
291			<FORM METHOD=POST ACTION="Rep_CustomerNoCredit.asp?act=show">
292			<table class="RepTable2" id="col8">
293			<tr>
294				<th colspan="2">����� �������� �� ������ ���� ��� ����</td>
295			</tr>
296			<tr>
297				<td colspan="2">&nbsp;</td>
298			</tr>
299				
300			</table>
301			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
302			</FORM>
303		<% end if %>
304		&nbsp;
305		</TD>
306		<TD align=center>
307		
308		&nbsp;
309		</TD>
310	</TR>
311</TABLE>
312<%
313'-----------------------------------------------------------------------------------------------------
314'------------------------------------------------------------------------------------------ Daily Sale
315'-----------------------------------------------------------------------------------------------------
316elseif request("act")="dailySale" then
317	input_date=			sqlSafe(request("input_date"))
318	input_date_start=	sqlSafe(request("input_date_start"))
319	input_date_end=		sqlSafe(request("input_date_end"))
320
321	if Auth("C" , 1) then 
322		if Auth("C" , 2) then 
323			'FrameSrc="/Reports/dailySale.aspx?input_date_start=" & input_date_start & "&input_date_end=" & input_date_end 
324			RepParamValues = input_date_start & "" & input_date_end
325		else
326			'FrameSrc="/Reports/dailySale.aspx?input_date_start=" & input_date & "&input_date_end=" & input_date 
327			RepParamValues = input_date & "" & input_date
328		end if
329		%>
330
331		<BR><BR>
332		<CENTER>
333		<% 	ReportLogRow = PrepareReport ("dailySale.rpt", "input_date_startinput_date_end", RepParamValues, "/beta/dialog_printManager.asp?act=Fin") %>
334		<INPUT TYPE="button" value=" �ǁ " Class="GenButton" style="border:1 solid blue;" onclick="printThisReport(this,<%=ReportLogRow%>);">
335
336		</CENTER>
337		<BR>
338		<BR><iframe name=f1 id=f1 src="/CRReports/?Id=<%=ReportLogRow%>" align=center style="width:750; height:410; border-style: none" border=0 FRAMEBORDER=0 scrollbars=no ></iframe>
339
340		<%
341	else
342		NotAllowdToViewThisPage()
343	end if
344end if
345%>
346
347<!--#include file="tah.asp" -->