<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
-
-
- Zone <%= table.zone_id %>
- Table <%= table.name %> ( <%= table.seater %> Seat )
-
-
+
+ Zone <%= table.zone_id %>
+ Table <%= table.name %> ( <%= table.seater %> Seat )
+
+
+
+ Zone <%= table.zone_id %>
+ Table <%= table.name %> ( <%= table.seater %> Seat )
+
+
diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb
index c25c1b2f..9eacac99 100644
--- a/app/views/origami/home/show.html.erb
+++ b/app/views/origami/home/show.html.erb
@@ -38,16 +38,22 @@
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
-
-
- <%= table.name %>
- <% if table.get_booking.nil? %>
- billed
- <% else %>
- new
- <% end %>
-
-
+ <% if table.get_booking.nil? %>
+
+
+ <%= table.name %>
+
billed
+
+
+
+ <% else %>
+
+
+ <%= table.name %>
+ new
+
+
+ <% end %>
<% else %>
@@ -108,9 +114,9 @@
@@ -129,8 +135,8 @@
-
<%= @customer.customer_id %>
-
Customer : <%= @customer.name %>
+
<%= @customer.customer_id rescue "" %>
+
Customer : <%= @customer.name rescue "" %>
diff --git a/app/views/origami/room_invoices/show.html.erb b/app/views/origami/room_invoices/show.html.erb
index 46e9a892..7ea799ae 100644
--- a/app/views/origami/room_invoices/show.html.erb
+++ b/app/views/origami/room_invoices/show.html.erb
@@ -35,8 +35,8 @@
-
<%= @customer.customer_id %>
-
Customer : <%= @customer.name %>
+
<%= @customer.customer_id rescue "" %>
+
Customer : <%= @customer.name rescue "" %>
diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb
index 381edb25..6fa61bd8 100644
--- a/app/views/origami/rooms/show.html.erb
+++ b/app/views/origami/rooms/show.html.erb
@@ -38,16 +38,21 @@
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
-
-
- <%= table.name %>
- <% if table.get_booking.nil? %>
- billed
- <% else %>
- new
- <% end %>
-
-
+ <% if table.get_booking.nil? %>
+
+
+ <%= table.name %>
+ billed
+
+
+ <% else %>
+
+
+ <%= table.name %>
+ new
+
+
+ <% end %>
<% else %>
@@ -108,9 +113,9 @@
@@ -258,28 +263,28 @@ $(document).ready(function(){
$(".tables").on('click', function(){
var customer_id=$(".customer-id").text();
show_customer_details(customer_id);
-
+
var dining_id = $(this).attr("data-id");
window.location.href = '/origami/table/' + dining_id;
})
$(".sales").on('click',function(){
var customer_id=$(".customer-id").text();
show_customer_details(customer_id);
-
+
var sale_id = $(this).attr("data-id");
window.location.href = '/origami/sale/' + sale_id;
})
$(".rooms").on('click', function(){
var customer_id=$(".customer-id").text();
show_customer_details(customer_id);
-
+
var dining_id = $(this).attr("data-id");
window.location.href = '/origami/room/' + dining_id;
})
$(".orders").on('click',function(){
var customer_id=$(".customer-id").text();
show_customer_details(customer_id);
-
+
var order_id = $(this).attr("data-id");
window.location.href = '/origami/order/' + order_id;
})
diff --git a/app/views/origami/table_invoices/show.html.erb b/app/views/origami/table_invoices/show.html.erb
index 065c7f8d..ee66f9a3 100644
--- a/app/views/origami/table_invoices/show.html.erb
+++ b/app/views/origami/table_invoices/show.html.erb
@@ -35,8 +35,8 @@
-
<%= @customer.customer_id %>
-
Customer : <%= @customer.name %>
+
<%= @customer.customer_id rescue "" %>
+
Customer : <%= @customer.name rescue "" %>