finished order and sales in setting

This commit is contained in:
Aung Myo
2017-06-12 00:45:59 +06:30
parent eb001275c7
commit 0943808ac8
27 changed files with 876 additions and 65 deletions

View File

@@ -0,0 +1,9 @@
<div class="form-group">
<select class="selectpicker form-control col-md-12" name="membership_id">
<option>Select Member Group</option>
<% @member_group.each do |member| %>
<option value="<%= member["id"] %>">
<%= member["name"] %></option>
<%end %>
</select>
</div>

View File

@@ -51,7 +51,7 @@
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
<td>
<%= link_to 'Destroy', crm_customer_path(crm_customer), method: :delete, data: { confirm: 'Are you sure?' } %>
<%= link_to 'Show', crm_customer_path(crm_customer) %>
</td>

View File

@@ -1,40 +1,84 @@
<p id="notice"><%= notice %></p>
<p>
<strong>Name:</strong>
<%= @crm_customer.name %>
</p>
<p>
<strong>Company:</strong>
<%= @crm_customer.company %>
</p>
<p>
<strong>Contact no:</strong>
<%= @crm_customer.contact_no %>
</p>
<p>
<strong>Email:</strong>
<%= @crm_customer.email %>
</p>
<p>
<strong>Date of birth:</strong>
<%= @crm_customer.date_of_birth %>
</p>
<div class="row">
<div class="col-lg-12">
<ol class="breadcrumb">
<li><a href="<%= crm_root_path %>">Home</a></li>
<li class="active">
<a href="<%= crm_customers_path %>">Customer</a>
</li>
<li class="active">Details
</li>
</ol>
</div>
</div>
<p>
<strong>Membership type:</strong>
<%= @crm_customer.membership_type %>
</p>
<div class="row">
<div class="col-lg-12">
<div class="main-box-body clearfix">
<div class="table-responsive">
<hr>
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Contact no</th>
<th>Company</th>
<th>Date Of Birth</th>
</tr>
</thead>
<p>
<strong>Membership authentication code:</strong>
<%= @crm_customer.membership_authentication_code %>
</p>
<tbody>
<tr>
<td><%= @crm_customer.name %></td>
<td><%= @crm_customer.email %></td>
<td><%= @crm_customer.contact_no %></td>
<td><%= @crm_customer.company %></td>
<td><%= @crm_customer.date_of_birth %> </td>
</tr>
</tbody>
</table>
<br>
<h3>Order Details</h3>
<table class="table table-striped">
<thead>
<tr>
<th>Created at </th>
<th>Menu Item</th>
<th>QTY</th>
<th>Unit Price </th>
<th>Option</th>
<th>Status</th>
<th>Waiter</th>
</tr>
</thead>
<tbody>
<% @order_items.each do |order_item| %>
<tr>
<td><%= order_item.created_at %></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>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<%= link_to 'Edit', edit_crm_customer_path(@crm_customer) %> |
<%= link_to 'Back', crm_customers_path %>