Merge branch 'crm' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -55,7 +55,9 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<% if @response["status"] == true && $response["data"] != "[]"%>
|
||||
<% puts "'''''''''''''''''''"
|
||||
puts @response
|
||||
if @response["status"] == true %>
|
||||
<tr>
|
||||
<th colspan="5">Membership Transactions</th>
|
||||
<% if @response["status"] == true %>
|
||||
@@ -101,28 +103,22 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order ID</th>
|
||||
<th>Menu Item</th>
|
||||
<th>QTY</th>
|
||||
<th>Unit Price </th>
|
||||
<th>Option</th>
|
||||
<th>Status</th>
|
||||
<th>Waiter</th>
|
||||
<th>Created at </th>
|
||||
<th>Order ID </th>
|
||||
<th>Type</th>
|
||||
<th>Order status</th>
|
||||
<th>Order date</th>
|
||||
<th>Items Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @order_items.each do |order_item| %>
|
||||
<% @orders.each do |order| %>
|
||||
<tr>
|
||||
<td><%= order_item.order_id %></td>
|
||||
<td><%= order_item.item_name %></td>
|
||||
<td><%= order_item.qty %></td>
|
||||
<td><%= order_item.price %></td>
|
||||
<td><%= order_item.options %></td>
|
||||
<td><%= order_item.order_item_status %></td>
|
||||
<td><%= order_item.item_order_by %> </td>
|
||||
<td><%= order_item.created_at.strftime("%d-%m-%y") %></td>
|
||||
<td><%= order.order_id %></td>
|
||||
<td><%= order.order_type %></td>
|
||||
<td><%= order.status %></td>
|
||||
<td><%= order.date.strftime("%d-%m-%Y") %> </td>
|
||||
<td><%= order.item_count %> </td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
@@ -137,62 +133,33 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sale ID </th>
|
||||
<th>Menu Item</th>
|
||||
<th>QTY</th>
|
||||
<th>Unit Price </th>
|
||||
<th>Tax Price</th>
|
||||
<th>Created At</th>
|
||||
<th>Sale Id </th>
|
||||
<th>Receipt no </th>
|
||||
<th>Grand total</th>
|
||||
<th>Tax amount</th>
|
||||
<th>Cashier</th>
|
||||
<th>Sales status</th>
|
||||
<th>Receipt Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @sale_items.each do |sale_item| %>
|
||||
<tr>
|
||||
<td><%= sale_item.sale_id %></td>
|
||||
<td><%= sale_item.product_name %></td>
|
||||
<td><%= sale_item.qty %></td>
|
||||
<td><%= sale_item.unit_price %></td>
|
||||
|
||||
<td><%= sale_item.taxable_price %></td>
|
||||
<td><%= sale_item.created_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% @sales.each do |sale| %>
|
||||
<tr>
|
||||
<td><%= sale.sale_id %></td>
|
||||
<td><%= sale.receipt_no %></td>
|
||||
<td><%= sale.grand_total rescue '-' %></td>
|
||||
<td><%= sale.total_tax %></td>
|
||||
<td><%= sale.cashier_name rescue '-' %></td>
|
||||
<td> <%= sale.sale_status %> </td>
|
||||
<td> <%= sale.receipt_date.strftime("%d-%m-%Y") %> </td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="customer" role="tabpanel">
|
||||
<h3>Sale Details</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sale ID </th>
|
||||
<th>Menu Item</th>
|
||||
<th>QTY</th>
|
||||
<th>Unit Price </th>
|
||||
<th>Tax Price</th>
|
||||
<th>Created At</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @sale_items.each do |sale_item| %>
|
||||
<tr>
|
||||
<td><%= sale_item.sale_id %></td>
|
||||
<td><%= sale_item.product_name %></td>
|
||||
<td><%= sale_item.qty %></td>
|
||||
<td><%= sale_item.unit_price %></td>
|
||||
|
||||
<td><%= sale_item.taxable_price %></td>
|
||||
<td><%= sale_item.created_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -49,10 +49,13 @@
|
||||
<% if current_login_employee %>
|
||||
<div class="right">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<%if current_login_employee.role !="waiter" %>
|
||||
<li style="color: #959595"><%= current_login_employee.name %> </li>
|
||||
|
||||
<li style="padding-right:10px;padding-left:10px"> | </li>
|
||||
<li ><%= link_to 'Logout', logout_path, method: :delete, data: { confirm: 'Are you sure?' } %>
|
||||
</li>
|
||||
<%end%>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user