PageRenderTime 22ms CodeModel.GetById 11ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/beta/AR/OtherReports.asp

http://github.com/khaneh/Orders
ASP | 369 lines | 348 code | 10 blank | 11 comment | 22 complexity | 8c4b0e6e4de00142bf6034e41af5231b 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				<br><br>
 78				<input type=hidden name='fullyApplied' value='on'>
 79				<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� " onclick="document.forms[0].action='rep_dailySale.asp';">&nbsp;
 80			</FORM>
 81		<% end if %>
 82		&nbsp;
 83		</TD>
 84		<TD style="border:1pt solid white;width:130pt" align=center>
 85		<% if Auth("C" , 3) then %>
 86			<FORM METHOD=POST ACTION="Rep_InvoiceItems.asp?act=show">
 87			<table class="RepTable2" id="InvoiceItems">
 88			<tr>
 89				<th colspan="2">����� ���� ��� ����</td>
 90			</tr>
 91			<tr>
 92				<td align=left>��&nbsp;�����</td>
 93				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 94			</tr>
 95			<tr>
 96				<td align=left>��&nbsp;�����</td>
 97				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
 98			</tr>
 99			<tr>
100				<td align=left>����</td>
101				<td align=left>
102					<SELECT NAME="Category" style="width:120px;">
103						<option value="">--- ������ ���� ---</option>
104						<option value="0" <%if Category=0 then response.write "selected " : GroupName="[ ��� ] "%>>���</option>
105<%
106					mySQL = "SELECT * FROM InvoiceItemCategories WHERE ID > 0"
107					Set RS1 = Conn.Execute(mySQL)
108					Do Until RS1.eof
109%>				
110						<option value="<%=RS1("ID")%>" <%if RS1("ID")=Category then response.write "selected "%>><%=RS1("Name")%></option>
111<%
112						RS1.moveNext
113					Loop
114%>
115					</SELECT>
116				</td>
117			</tr>
118			<tr>
119				<td align=left>�����</td>
120				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
121			</tr>
122			<tr>
123				<td align=left>��������</td>
124				<td align=left>
125					<SELECT NAME="isA" style="width:120px;">
126						<option value="0" <%if isA=0 then response.write "selected " %>>��� </option>
127						<option value="1" <%if isA=1 then response.write "selected " %>>�� ��� ���</option>
128						<option value="2" <%if isA=2 then response.write "selected " %>>���� ��� ���</option>
129					</SELECT>
130				</td>
131			</tr>
132			</table>
133			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
134			</FORM>
135		<% end if %>
136		&nbsp;
137		</TD>
138		<TD align=center>
139		<% if Auth("C" , 4) then %>
140			<FORM METHOD=POST ACTION="Rep_AInvoices.asp?act=show">
141			<table class="RepTable2" id="AInvoices">
142			<tr>
143				<th colspan="2">����� ������ �� (���)</td>
144			</tr>
145			<tr>
146				<td align=left>�� �����</td>
147				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" 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="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
152			</tr>
153			<tr>
154				<td align=left>�����</td>
155				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
156			</tr>
157			</table>
158			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
159			<br><br>
160			<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;
161			</FORM>
162		<% end if %>
163		&nbsp;
164		</TD>
165	</TR>
166	<TR height=110>
167		<TD style="border:1pt solid white;width:130pt" align=center>
168		<% if Auth("C" , 5) then %>
169			<FORM METHOD=POST ACTION="Rep_AReceipt.asp?act=show">
170			<table class="RepTable2" id="AInvoices">
171			<tr>
172				<th colspan="2">����� ���� ��</td>
173			</tr>
174			<tr>
175				<td align=left>�� �����</td>
176				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" 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="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
181			</tr>
182			<tr>
183				<td align=left>�����</td>
184				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
185			</tr>
186			<tr>
187				<td align=left>���������</td>
188				<td align=left>
189					<SELECT NAME="isA" style="width:90px;">
190						<option value="0" >��� </option>
191						<option value="1" selected >�� ��� ���</option>
192						<option value="2" >���� ��� ���</option>
193					</SELECT>
194				</td>
195			</tr>
196			</table>
197			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
198			</FORM>		
199		<% end if %>
200		&nbsp;
201		</TD>
202		<TD style="border:1pt solid white;width:130pt" align=center>
203		<% if Auth("C" , 7) then %>
204			<FORM METHOD=POST ACTION="Rep_COGS.asp?act=show">
205			<table class="RepTable2" id="AInvoices">
206			<tr>
207				<th colspan="2">����� ���� ���� ���</td>
208			</tr>
209			<tr>
210				<td colspan="2">&nbsp;</td>
211			</tr>
212			<tr>
213				<td align=left>�� �����</td>
214				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
215			</tr>
216			<tr>
217				<td align=left>�� �����</td>
218				<td><INPUT TYPE="text" NAME="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
219			</tr>
220			<tr>
221				<td colspan="2">&nbsp;</td>
222			</tr>
223			</table>
224			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
225			</FORM>		
226		<% end if %>
227		 &nbsp;
228		</TD>
229		
230<%
231		'sam add this!	
232%>
233		<TD align=center>
234		<% if Auth("C" , 4) then %>
235			<FORM METHOD=POST ACTION="Rep_BInvoices.asp?act=show">
236			<table class="RepTable2" id="AInvoices">
237			<tr>
238				<th colspan="2">����� �������� (�)</td>
239			</tr>
240			<tr>
241				<td align=left>�� �����</td>
242				<td><INPUT TYPE="text" NAME="FromDate" Value="<%=StartOfTheYear%>" 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="ToDate" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
247			</tr>
248			<tr>
249				<td align=left>�����</td>
250				<td><INPUT TYPE="text" NAME="ResultsInPage" style="width:75px;direction:LTR;text-align:right;" maxlength=5 value="50"></td>
251			</tr>
252			</table>
253			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
254			<br><br>
255			<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;
256			</FORM>
257		<% end if %>
258		&nbsp;
259		</TD>
260
261	</TR>
262	<!---------------------------------------------------- SAM -->
263	<TR height=110>
264		<TD style="border:1pt solid white;width:130pt" align=center>
265		<% if Auth("C" , 8) then %>
266			<FORM METHOD=POST ACTION="Rep_4col.asp?act=show">
267			<table class="RepTable2" id="col4">
268			<tr>
269				<th colspan="2">����� ���� ���� �����</td>
270			</tr>
271			<tr>
272				<td colspan="2">&nbsp;</td>
273			</tr>
274				<tr>
275					<td align=left>��&nbsp;�����</td>
276					<td><INPUT TYPE="text" NAME="FromDate" value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
277				</tr>
278				<tr>
279					<td align=left>��&nbsp;�����</td>
280					<td><INPUT TYPE="text" NAME="ToDate"  value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
281				</tr>
282			<tr>
283				<td colspan="2">&nbsp;</td>
284			</tr>
285			</table>
286			<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
287			</FORM>
288		<% end if %>
289		&nbsp;
290		</TD>
291		<!---------------------------------------------------------------------------------->
292		<TD style="border:1pt solid white;width:130pt" align=center>
293		<% if Auth("C" , 9) then %>
294			<table class="RepTable2" id="col8">
295			<tr>
296				<td colspan="2"><a href="Rep_CustomerNoCredit.asp?act=show">����� �������� �� ������ ���� ��� ����</a></td>
297			</tr>
298			<tr>
299				<td colspan="2"><a href="arReport.asp">���ȝ��� ������</a></td>
300			</tr>
301			<tr>
302				<td colspan="2"><a href="memoReport.asp">����� ����������</a></td>
303			</tr>
304			</table>
305		<% end if %>
306		&nbsp;
307		</TD>
308		<!------------------------------------------------------------>
309		<TD align=center>
310		&nbsp;
311		<% if Auth("C", "A") then %>
312			<form method="post" action="rep_reversSales.asp?act=show">
313				<table class="RepTable2">
314					<tr>
315						<th colspan="2">����� �ѐ�� �� ����</th>
316					</tr>
317					<tr>
318						<td>�� �����</td>
319						<td><input type="text" name="fromDate" value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
320					</tr>
321					<tr>
322						<td>�� �����</td>
323						<td><input type="text" name="toDate" value="<%=shamsiToday()%>" style="width:75px;direction:LTR;" maxlength=10 OnBlur="return acceptDate(this);"></td>
324					</tr>
325				</table>
326				<INPUT Class="GenButton" style="border:1 solid black;" TYPE="submit" value=" ����� ">&nbsp;
327			</form>
328		<%end if%>
329		</TD>
330		<!------------------------------------------------------------>
331	</TR>
332</TABLE>
333<%
334'-----------------------------------------------------------------------------------------------------
335'------------------------------------------------------------------------------------------ Daily Sale
336'-----------------------------------------------------------------------------------------------------
337elseif request("act")="dailySale" then
338	input_date=			sqlSafe(request("input_date"))
339	input_date_start=	sqlSafe(request("input_date_start"))
340	input_date_end=		sqlSafe(request("input_date_end"))
341
342	if Auth("C" , 1) then 
343		if Auth("C" , 2) then 
344			'FrameSrc="/Reports/dailySale.aspx?input_date_start=" & input_date_start & "&input_date_end=" & input_date_end 
345			RepParamValues = input_date_start & "" & input_date_end
346		else
347			'FrameSrc="/Reports/dailySale.aspx?input_date_start=" & input_date & "&input_date_end=" & input_date 
348			RepParamValues = input_date & "" & input_date
349		end if
350		%>
351
352		<BR><BR>
353		<CENTER>
354		<% 	ReportLogRow = PrepareReport ("dailySale1.rpt", "input_date_startinput_date_end", RepParamValues, "/beta/dialog_printManager.asp?act=Fin") %>
355		<INPUT TYPE="button" value=" �ǁ " Class="GenButton" style="border:1 solid blue;" onclick="printThisReport(this,<%=ReportLogRow%>);">
356
357		</CENTER>
358		<BR>
359		<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>
360
361		<%
362	else
363		NotAllowdToViewThisPage()
364	end if
365'---------------------------------------------------------------
366end if
367%>
368
369<!--#include file="tah.asp" -->