food court and Booking ID for order and receipt

This commit is contained in:
phyusin
2018-10-08 17:41:22 +06:30
parent 5535a5db81
commit 03fd7c79b8
44 changed files with 1155 additions and 378 deletions

View File

@@ -10,9 +10,11 @@
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#pending_order" role="tab">Pending</a>
</li>
<li class="nav-item credit_items">
<a class="nav-link" data-toggle="tab" href="#credits" role="tab"><%= t :credits %></a>
</li>
<%if @cashier_type=='quick_service' %>
<li class="nav-item credit_items">
<a class="nav-link" data-toggle="tab" href="#credits" role="tab"><%= t :credits %></a>
</li>
<% end %>
</ul>
<!-- Nav tabs - End -->
<div id="custom-slimscroll">
@@ -49,6 +51,7 @@
</div>
<!-- Credit Sales Panel -->
<%if @cashier_type=='quick_service' %>
<div class="tab-pane dining" id="credits" role="tabpanel">
<div class="card-block">
<div class="row m-t-10 m-l-10 clearfix">
@@ -80,6 +83,7 @@
</div>
</div>
</div>
<% end %>
<!-- Credit Sales Panel -->
</div>
</div>
@@ -112,39 +116,39 @@
<!-- script data for credit lists -->
<script>
var cashier_type = "quick_service";
var cashier_type = "<%= @cashier_type %>";
$(document).ready(function(){
getCreditSales("","",cashier_type); //credit sales script data binding
$(".sales").on('click',function(){
var sale_id = $(this).attr("data-id");
window.location.href = '/origami/quick_service/pending_order/' + sale_id;
window.location.href = '/origami/'+cashier_type+'/pending_order/' + sale_id;
});
$(".completed").on('click',function(){
var sale_id = $(this).attr("data-id");
window.location.href = '/origami/quick_service/completed_sale/' + sale_id;
window.location.href = '/origami/'+cashier_type+'/completed_sale/' + sale_id;
});
$('#pay').on('click', function () {
var sale_id = $('#sale_id').val();
window.location.href = '/origami/sale/' + sale_id + "/quick_service/payment";
window.location.href = '/origami/sale/' + sale_id + "/"+cashier_type+"/payment";
});
$('#back').on('click', function () {
window.location.href = '/origami/quick_service';
window.location.href = '/origami/'+cashier_type;
});
$('#close_cashier').on('click',function(e){
e.preventDefault(); // Prevent the href from redirecting directly
var linkURL = '/origami/shift/quick_service/close';
var linkURL = '/origami/shift/'+cashier_type+'/close';
occupied_count = $(this).data("count");
warnBeforeRedirect(linkURL,occupied_count);
});
$('#cash_in').on('click',function(){
window.location.href = '/origami/quick_service/cash_ins';
window.location.href = '/origami/'+cashier_type+'/cash_ins';
});
$('#cash_out').on('click',function(){
window.location.href = '/origami/quick_service/cash_outs';
window.location.href = '/origami/'+cashier_type+'/cash_outs';
});
});