-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsalesreport.jsp
111 lines (86 loc) · 2.51 KB
/
salesreport.jsp
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
<%@ include file = 'header.jsp' %>
<%@ page import="java.util.*" %>
</div>
<%
ArrayList<String> rentedcars = (ArrayList<String>) session.getAttribute("rentedcars");
ArrayList<String> dailytrans = (ArrayList<String>) session.getAttribute("dailytrans");
if (request.getParameter("task")!=null){
if (request.getParameter("task").equals("availability")){
%>
</div>
<div class="container-fluid"><center>
<table align="center" border="1px" style='border:1px solid orange'>
<br/><br/><br/><br/><br/><br/><tr> Total Revenue by Rented Cars</tr>
<tr>
<th style='font-size:16px;border:1px solid orange'>Car ID</th>
<th style='font-size:16px;border:1px solid orange'>orderDate</th>
<th style='font-size:16px;border:1px solid orange'>Amount</th>
</tr>
<br/>
<br/>
<tr>
<td>
</td>
</tr>
<%int count = 0;
while(count<rentedcars.size()){%>
<tr>
<td style='font-size:14px;border:1px solid orange'>
<center><%out.print(rentedcars.get(count));%></center>
</td>
<td style='font-size:14px;border:1px solid orange'>
<center><%out.print(rentedcars.get(count+1));%></center>
</td>
<td style='font-size:14px;border:1px solid orange'>
<center><%out.print(rentedcars.get(count+2));%></center>
</td>
</tr>
<%count=count+3;
}%>
</table>
</center>
</div>
</center>
<%
}
else if (request.getParameter("task").equals("daily")){%>
</div>
<div class="container-fluid"><center>
<table align="center" border="1px" style='border:1px solid orange'>
<br/><br/><br/><br/><br/><br/><tr> Total Daily Transactions</tr>
<tr>
<th style='font-size:16px;border:1px solid orange'>OrderDate</th>
<th style='font-size:16px;border:1px solid orange'>Total Transactions</th>
</tr>
<br/>
<br/>
<tr>
<td>
</td>
</tr>
<%int count = 0;
while(count<dailytrans.size()){%>
<tr>
<td style='font-size:14px;border:1px solid orange'>
<center><%out.print(dailytrans.get(count));%></center>
</td>
<td style='font-size:14px;border:1px solid orange'>
<center><%out.print(dailytrans.get(count+1));%></center>
</td>
</tr>
<%count=count+2;
}%>
</table>
</center>
</div>
<%
}
}else {%>
<div class="container" style="margin-top:150px">
<a href="salesreport.jsp?task=availability" style="font-size:20px"> Total Revenue by Rented Cars </a><br/><br/>
<a href="salesreport.jsp?task=daily" style="font-size:20px"> Total Daily Transaction </a><br/><br/>
<a href="ChartGeneration" style="font-size:20px"> Graphs </a>
</div>
<%
}
%>