PageRenderTime 34ms CodeModel.GetById 18ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/beta/AR/OtherReports.old.asp

http://github.com/khaneh/Orders
ASP | 294 lines | 275 code | 9 blank | 10 comment | 17 complexity | 10031a9e64d3bbe70b2ce4760c13d744 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<TABLE class="RepTable" align=center cellspacing=10>
 32	<TR height=110>
 33		<TD style="border:1pt solid white;width:130pt" align=center>
 34		<% if Auth("C" , 1) then %>
 35			<FORM METHOD=POST ACTION="?act=dailySale">
 36			<table class="RepTable2" id="AInvoices">
 37			<tr>
 38				<th colspan="2">����� ���� ������</td>
 39			</tr>
 40			<tr>
 41				<td colspan="2">&nbsp;</td>
 42			</tr>
 43			<% 
 44			if Auth("C" , 2) then 
 45			%>
 46				<tr>
 47					<td align=left>��&nbsp;�����</td>
 48					<td><INPUT TYPE="text" NAME="input_date_start" value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 49				</tr>
 50				<tr>
 51					<td align=left>��&nbsp;�����</td>
 52					<td><INPUT TYPE="text" NAME="input_date_end"  value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 53				</tr>
 54			<%
 55			else
 56			%>
 57				<tr>
 58					<td colspan="2" align=left>
 59					<SELECT NAME="input_date">
 60						<option value="<%=shamsiToday()%>">			�����		<%=replace(shamsitoday(),"/" ,".")%> </option>
 61						<option value="<%=shamsidate(date()-1)%>">	�����		<%=replace(shamsidate(date()-1),"/" ,".")%> </option>
 62						<option value="<%=shamsidate(date()-2)%>">	2 ��� ���	<%=replace(shamsidate(date()-2),"/" ,".")%> </option>
 63						<option value="<%=shamsidate(date()-3)%>">	3 ��� ���	<%=replace(shamsidate(date()-3),"/" ,".")%> </option>
 64						<option value="<%=shamsidate(date()-4)%>">	4 ��� ���	<%=replace(shamsidate(date()-4),"/" ,".")%> </option>
 65					</SELECT>
 66					</td>
 67				</tr>
 68			<%
 69			end if
 70			%>
 71			<tr>
 72				<td colspan="2">&nbsp;</td>
 73			</tr>
 74			</table>
 75			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
 76			</FORM>
 77		<% end if %>
 78		&nbsp;
 79		</TD>
 80		<TD style="border:1pt solid white;width:130pt" align=center>
 81		<% if Auth("C" , 3) then %>
 82			<FORM METHOD=POST ACTION="Rep_InvoiceItems.asp?act=show">
 83			<table class="RepTable2" id="InvoiceItems">
 84			<tr>
 85				<th colspan="2">����� ���� ��� ����</td>
 86			</tr>
 87			<tr>
 88				<td align=left>��&nbsp;�����</td>
 89				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 90			</tr>
 91			<tr>
 92				<td align=left>��&nbsp;�����</td>
 93				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 94			</tr>
 95			<tr>
 96				<td align=left>����</td>
 97				<td align=left>
 98					<SELECT NAME="Category" style="width:120px;">
 99						<option value="">--- ������ ���� ---</option>
100						<option value="0" <%if Category=0 then response.write "selected " : GroupName="[ ��� ] "%>>���</option>
101<%
102					mySQL = "SELECT * FROM InvoiceItemCategories WHERE ID > 0"
103					Set RS1 = Conn.Execute(mySQL)
104					Do Until RS1.eof
105%>				
106						<option value="<%=RS1("ID")%>" <%if RS1("ID")=Category then response.write "selected "%>><%=RS1("Name")%></option>
107<%
108						RS1.moveNext
109					Loop
110%>
111					</SELECT>
112				</td>
113			</tr>
114			<tr>
115				<td align=left>�����</td>
116				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
117			</tr>
118			<tr>
119				<td align=left>��������</td>
120				<td align=left>
121					<SELECT NAME="isA" style="width:120px;">
122						<option value="0" <%if isA=0 then response.write "selected " %>>��� </option>
123						<option value="1" <%if isA=1 then response.write "selected " %>>�� ��� ���</option>
124						<option value="2" <%if isA=2 then response.write "selected " %>>���� ��� ���</option>
125					</SELECT>
126				</td>
127			</tr>
128			</table>
129			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
130			</FORM>
131		<% end if %>
132		&nbsp;
133		</TD>
134		<TD align=center>
135		<% if Auth("C" , 4) then %>
136			<FORM METHOD=POST ACTION="Rep_AInvoices.asp?act=show">
137			<table class="RepTable2" id="AInvoices">
138			<tr>
139				<th colspan="2">����� ������ �� (���)</td>
140			</tr>
141			<tr>
142				<td align=left>�� �����</td>
143				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
144			</tr>
145			<tr>
146				<td align=left>�� �����</td>
147				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
148			</tr>
149			<tr>
150				<td align=left>�����</td>
151				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
152			</tr>
153			</table>
154			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
155			<br><br>
156			<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;
157			</FORM>
158		<% end if %>
159		&nbsp;
160		</TD>
161	</TR>
162	<TR height=110>
163		<TD style="border:1pt solid white;width:130pt" align=center>
164		<% if Auth("C" , 5) then %>
165			<FORM METHOD=POST ACTION="Rep_AReceipt.asp?act=show">
166			<table class="RepTable2" id="AInvoices">
167			<tr>
168				<th colspan="2">����� ���� ��</td>
169			</tr>
170			<tr>
171				<td align=left>�� �����</td>
172				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
173			</tr>
174			<tr>
175				<td align=left>�� �����</td>
176				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
177			</tr>
178			<tr>
179				<td align=left>�����</td>
180				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
181			</tr>
182			<tr>
183				<td align=left>���������</td>
184				<td align=left>
185					<SELECT NAME="isA" style="width:90px;">
186						<option value="0" >��� </option>
187						<option value="1" selected >�� ��� ���</option>
188						<option value="2" >���� ��� ���</option>
189					</SELECT>
190				</td>
191			</tr>
192			</table>
193			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
194			</FORM>		
195		<% end if %>
196		&nbsp;
197		</TD>
198		<TD style="border:1pt solid white;width:130pt" align=center>
199		<% if Auth("C" , 7) then %>
200			<FORM METHOD=POST ACTION="Rep_COGS.asp?act=show">
201			<table class="RepTable2" id="AInvoices">
202			<tr>
203				<th colspan="2">����� ���� ���� ���</td>
204			</tr>
205			<tr>
206				<td colspan="2">&nbsp;</td>
207			</tr>
208			<tr>
209				<td align=left>�� �����</td>
210				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
211			</tr>
212			<tr>
213				<td align=left>�� �����</td>
214				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
215			</tr>
216			<tr>
217				<td colspan="2">&nbsp;</td>
218			</tr>
219			</table>
220			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
221			</FORM>		
222		<% end if %>
223		 &nbsp;
224		</TD>
225		
226<%
227		'sam add this!	
228%>
229		<TD align=center>
230		<% if Auth("C" , 4) then %>
231			<FORM METHOD=POST ACTION="Rep_BInvoices.asp?act=show">
232			<table class="RepTable2" id="AInvoices">
233			<tr>
234				<th colspan="2">����� �ǘ����� (�)</td>
235			</tr>
236			<tr>
237				<td align=left>�� �����</td>
238				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
239			</tr>
240			<tr>
241				<td align=left>�� �����</td>
242				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
243			</tr>
244			<tr>
245				<td align=left>�����</td>
246				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
247			</tr>
248			</table>
249			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
250			<br><br>
251			<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;
252			</FORM>
253		<% end if %>
254		&nbsp;
255		</TD>
256
257	</TR>
258</TABLE>
259<%
260'-----------------------------------------------------------------------------------------------------
261'------------------------------------------------------------------------------------------ Daily Sale
262'-----------------------------------------------------------------------------------------------------
263elseif request("act")="dailySale" then
264	input_date=			sqlSafe(request("input_date"))
265	input_date_start=	sqlSafe(request("input_date_start"))
266	input_date_end=		sqlSafe(request("input_date_end"))
267
268	if Auth("C" , 1) then 
269		if Auth("C" , 2) then 
270			'FrameSrc="/Reports/dailySale.aspx?input_date_start=" & input_date_start & "&input_date_end=" & input_date_end 
271			RepParamValues = input_date_start & "" & input_date_end
272		else
273			'FrameSrc="/Reports/dailySale.aspx?input_date_start=" & input_date & "&input_date_end=" & input_date 
274			RepParamValues = input_date & "" & input_date
275		end if
276		%>
277
278		<BR><BR>
279		<CENTER>
280		<% 	ReportLogRow = PrepareReport ("dailySale.rpt", "input_date_startinput_date_end", RepParamValues, "/beta/dialog_printManager.asp?act=Fin") %>
281		<INPUT TYPE="button" value=" �ǁ " Class="GenButton" style="border:1 solid blue;" onclick="printThisReport(this,<%=ReportLogRow%>);">
282
283		</CENTER>
284		<BR>
285		<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>
286
287		<%
288	else
289		NotAllowdToViewThisPage()
290	end if
291end if
292%>
293
294<!--#include file="tah.asp" -->