Merge branch 'crm' of bitbucket.org:code2lab/sxrestaurant into staging

This commit is contained in:
Yan
2017-06-16 13:45:23 +06:30
15 changed files with 235 additions and 116 deletions

View File

@@ -1,16 +1,25 @@
<%= simple_form_for([:crm,@dining_queue]) do |f| %>
<%= f.error_notification %>
<p class="hidden generate_no"><%= @queue_no %></p>
<div class="form-inputs">
<%= f.input :name %>
<%= f.input :contact_no %>
<%= f.input :queue_no %>
<%= f.input :queue_no , :class => "dining",:id => "dining", :readonly => true%>
</div>
<br>
<div class="form-actions">
<%= f.button :submit %>
</div>
<% end %>
<script type="text/javascript">
$(document).ready(function(){
if($('form').attr('id') == "new_dining_queue"){
var queue_no = $('.generate_no').text();
$('#dining_queue_queue_no').val(queue_no);
}
});
</script>

View File

@@ -383,6 +383,6 @@
<button type="button" id="discount" class="btn btn-primary btn-lg btn-block">Discount</button>
<!-- <button type="button" class="btn btn-primary btn-lg btn-block" disabled>Tax</button> -->
<button type="button" id="pay-bill" class="btn btn-primary btn-lg btn-block">Pay</button>
<button type="button" class="btn btn-primary btn-lg btn-block" disabled>Re.Print</button>
<button type="button" id="re-print" class="btn btn-primary btn-lg btn-block">Re.Print</button>
</div>
</div>

View File

@@ -160,67 +160,7 @@
<div class="tab-pane" id="customer" role="tabpanel">
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<th width="20%"><h4>Customer Details</h4></th>
<th width="20%"></th>
<td></td>
</tr>
<tr>
<th width="20%"></th>
<th width="20%">Name</th>
<td><%= @customer.name %></td>
</tr>
<tr>
<th width="20%"></th>
<th width="20%">Email</th>
<td><%= @customer.email %></td>
</tr>
<tr>
<th width="20%"></th>
<th width="20%">Contact no</th>
<td><%= @customer.contact_no %></td>
</tr>
<tr>
<th width="20%"></th>
<th width="20%">Company</th>
<td><%= @customer.company rescue '-' %></td>
</tr>
<tr>
<th width="20%"></th>
<th width="20%">Date Of Birth</th>
<td><%= @customer.date_of_birth rescue '-' %> </td>
</tr>
<tr>
<th width="20%"><h4>Membership Details</h4></th>
<td width="20%"></td>
<td></td>
</tr>
<% if @membership == 0 %>
<tr>
<td colspan="2">"There is no membership data"</td>
</tr>
<% else %>
<% @membership.each do |member| %>
<tr>
<td width="20%"></td>
<th width="20%"><%= member["accountable_type"] %></th>
<td><%= member["balance"] %></td>
</tr>
<% end %>
<% end %>
</tr>
</tbody>
</table>
<!-- -->
</div>
</div>
@@ -238,9 +178,9 @@
<i class="fa fa-trash fa-lg"></i> Void Sale
</a>
<!-- <a href="<%= transactions_manual_complete_sale_path(@sale)%>" style="margin-top: 10px " class="btn btn-success pull-right btn-lg">
<a href="<%= transactions_manual_complete_sale_path(@sale)%>" style="margin-top: 10px " class="btn btn-success pull-right btn-lg">
<i class="fa fa-invoice fa-lg"></i> Complete Sale
</a> -->
</a>
</div>
</div>