Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -92,12 +92,13 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :date_of_birth,:class=>"form-control date_of_birth"%>
|
||||
<label>Date Of Birth</label>
|
||||
<%= f.text_field :date_of_birth,:class=>"form-control datepicker"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Select Member Group</label>
|
||||
<select class="selectpicker form-control col-md-12" name="member_group_id">
|
||||
<select class="selectpicker form-control col-md-12" name="member_group_id" >
|
||||
<option>Select Member Group</option>
|
||||
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
|
||||
<option value="<%= member.value %>">
|
||||
@@ -119,6 +120,15 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
$('.datepicker').datepicker({
|
||||
format : 'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
$('.datepicker').attr('ReadOnly','true');
|
||||
$('.datepicker').css('cursor','pointer');
|
||||
});
|
||||
|
||||
$(document).on('click',".checkbox_check",function(){
|
||||
if(this.checked){
|
||||
|
||||
@@ -146,7 +156,7 @@
|
||||
$('#customer_email').val(data.email);
|
||||
$('#customer_date_of_birth').val(data.date_of_birth);
|
||||
$('#customer_membership_type').val(data.membership_type);
|
||||
$('.select > option[value="'+data.membership_id+'"]').attr('selected','selected');
|
||||
// $('.selectpicker > option[value="'+data.membership_id+'"]').attr('selected','selected');
|
||||
$('.membership_authentication_code').val(data.membership_authentication_code);
|
||||
|
||||
$('#update_customer').removeAttr('disabled').val('');
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h3>Order Details</h3>
|
||||
<h3>Order Items</h3>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
@@ -70,6 +70,35 @@
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>Sale Items</h3>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -113,9 +113,9 @@
|
||||
<!-- Column Three--->
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<!-- OQS Buttons -->
|
||||
<button id="crm_print" value="" disabled="disabled" data-type="assign" class="btn crm_print btn-primary btn-lg btn-block" >
|
||||
<!-- <button id="crm_print" value="" disabled="disabled" data-type="assign" class="btn crm_print btn-primary btn-lg btn-block" >
|
||||
Print
|
||||
</button>
|
||||
</button> -->
|
||||
<!-- <button type="button" class="btn btn-primary btn-lg btn-block" disabled>Print <br/>Order<br/>Summary</button> -->
|
||||
<button id="assign" value="" disabled="disabled" data-type="assign" class="btn assign btn-primary btn-lg btn-block">ASSIGN</button>
|
||||
<button id="cancel" value="" disabled="disabled" data-type="cancel" class="btn btn-danger cancel btn-lg btn-block">CANCLE</button>
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :date_of_birth,:class=>"form-control date_of_birth"%>
|
||||
<label>Date Of Birth</label>
|
||||
<%= f.text_field :date_of_birth,:class=>"form-control datepicker"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -117,6 +118,14 @@
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.2.0/jquery-confirm.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.2.0/jquery-confirm.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.datepicker').datepicker({
|
||||
format : 'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
$('.datepicker').attr('ReadOnly','true');
|
||||
$('.datepicker').css('cursor','pointer');
|
||||
});
|
||||
|
||||
$(document).on('click',".checkbox_check",function(){
|
||||
if(this.checked){
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<div id="order-title">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:55%;"><strong>Receipt No : <%=@sale_data.receipt_no rescue ' '%></strong></td>
|
||||
<td style="width:45%;"><strong>Receipt Date : <%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></strong></td>
|
||||
<td style="width:50%;"><strong>Receipt No : <%=@sale_data.receipt_no rescue ' '%></strong></td>
|
||||
<td style="width:50%;"><strong>Receipt Date : <%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Table No</strong> <% if @sale_data%>- <%=@sale_data.receipt_no%><% end %></td>
|
||||
@@ -253,6 +253,6 @@ function update_balance(){
|
||||
var amount_due = $('#amount_due').text();
|
||||
var total = parseFloat(cash) + parseFloat(credit) + parseFloat(card)
|
||||
var result = amount_due - total
|
||||
$('#balance').text(result);
|
||||
$('#balance').text(result.toFixed(2));
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -18,8 +18,11 @@
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
<p class="">You can rebate upto <span style="color:red;" id="food_prices"><%= @food_prices %></span></p>
|
||||
</div>
|
||||
<% if @payparcount > 0 %>
|
||||
<p class="">Last time rebate amount is <%= @payparcount %></p>
|
||||
<% end %>
|
||||
<p class="">You can rebate upto <span style="color:red;" id="food_prices"><%= @food_prices %></span></p>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-7 col-md-7 col-sm-7">
|
||||
@@ -117,7 +120,7 @@ $("#redeem").click(function(){
|
||||
valid_amount = $("#valid_amount").val();
|
||||
sale_id = $("#valid_amount").attr('data-value');
|
||||
membership_id = $("#valid_amount").attr('data-member-value');
|
||||
redeem_amount = parseInt($("#used_amount").text());
|
||||
redeem_amount = parseFloat($("#used_amount").text());
|
||||
if(redeem_amount<=0 ){
|
||||
alert("Please type valid amount");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user