Fix spelling of 'receipt' in the Purchase Controller
[cs356-p2-videostore.git] / app / views / purchase / receipt.rhtml
1 <h1>Receipt</h1>
2
3 <p><b>Customer ID: </b><%= @customer.id.to_s %></p>
4 <p><b>Customer Name: </b><%= @customer.name.to_s %></p>
5 <br/>
6 <p><b>Transaction Date: </b><%= @time %></p>
7 <br/>
8
9 <p><b>Purchases:</b></p>
10 <table border="1">
11   <!-- Header -->
12   <tr>
13     <th>Item</th>
14     <th>Due Date</th>
15     <th>Price</th>
16   </tr>
17
18   <!-- Debt -->
19   <% if @debt %>
20   <tr>
21     <td><b>Overdue Item Fees</b></td>
22     <td></td>
23     <td><%= number_to_currency(@debt) %></td>
24   </tr>
25   <% end %>
26 <% for item in @items %>
27   <tr>
28     <td><%=h item.title %></td>
29   <% if item.class == Video or item.class == Game %>
30     <td><%=h item.due_date %></td>
31     <td><%=h number_to_currency(item.calculated_price) %></td>
32   <% else %>
33     <td></td>
34     <td><%=h number_to_currency(item.price) %></td>
35   <% end %>
36   </tr>
37 <% end %>
38   <tr>
39     <td><b>Total</b></td>
40     <td></td>
41     <td><b><%= number_to_currency(@total) %></b></td>
42   </tr>
43 </table>
44
45 <br/>
46
47 <%= link_to 'Start a new Purchase', :action => 'begin' %>
48
49