Lots of stuff, I got too tired to keep perfect revision history
[cs356-p2-videostore.git] / app / views / purchase / menu.rhtml
index ce8a646..a57bc22 100644 (file)
@@ -1,14 +1,32 @@
 <h1>Purchase Menu</h1>
 
+<h3>Customer Information</h3>
 <ul>
   <li>Customer ID: <%= @customer.id %></li>
   <li>Customer Name: <%= @customer.name %></li>
-  <li>Total Price: <%= @total_price %></li>
+  <li>Customer Debt: <%= number_to_currency(@customer.debt) %></li>
+  <li>Price for this transaction: <%= number_to_currency(@total_price) %></li>
+  <li>Total Amount Owed: <%= number_to_currency(@customer.debt + @total_price) %></li>
 </ul>
 
+<h3>Items Purchased</h3>
+<% if @items.empty? %>
+  None
+<% else %>
 <ul>
-  <li><%=link_to 'Rent an Item', :action => 'rent_begin' %></li>
-  <li><%=link_to 'Buy Merchandise', :action => 'buy_begin' %></li>
+<% for item in @items %>
+  <li><%= item.title %></li>
+<% end %>
+</ul>
+<% end %>
+
+<h3>Actions</h3>
+<ul>
+  <li><%=link_to 'Rent an Item', :action => 'rent' %></li>
+  <li><%=link_to 'Buy Merchandise', :action => 'buy_merch' %></li>
+  <br/>
+  <br/>
+  <br/>
+  <li><%=link_to 'Checkout', :action => 'receipt' %></li>
 </ul>
 
-<%=link_to 'End Purchase', :action => 'index' %>