update add order
This commit is contained in:
@@ -108,8 +108,17 @@
|
||||
<button id="cash_in" type="button" class="btn btn-block btn-primary"> Cash In </button>
|
||||
<button id="cash_out" type="button" class="btn btn-block btn-primary"> Cash Out </button>
|
||||
<!-- Temporary Disabled -->
|
||||
<!-- <button id="sale_summary" type="button" class="btn btn-block btn-primary">Sale Sammary</button> -->
|
||||
<%if current_login_employee.role == "cashier" && @shop.quick_sale_summary == true%>
|
||||
<button id="sale_summary" type="button" class="btn btn-block btn-primary">Sale Summary</button>
|
||||
<%end%>
|
||||
<button id="close_cashier" type="button" class="btn btn-block btn-primary"> Close Cashier </button>
|
||||
|
||||
|
||||
<%if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %>
|
||||
<button id="back" type="button" class="btn btn-block btn-primary"><i class="fa fa-home fa-lg"></i> Back
|
||||
</button>
|
||||
<%end%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- Column One -->
|
||||
@@ -218,4 +227,7 @@ $('#cash_out').on('click',function(){
|
||||
$('#close_cashier').on('click',function(){
|
||||
window.location.href = '/origami/shift/close';
|
||||
})
|
||||
$('#back').on('click',function(){
|
||||
window.location.href = '/dashboard';
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Nav tabs - End -->
|
||||
|
||||
<div class="tab-content">
|
||||
<!--- Panel 0 - Completed Orders -->
|
||||
|
||||
@@ -133,6 +132,7 @@
|
||||
|
||||
<% if @status_sale == 'sale' %>
|
||||
<%= @sale_array[0].receipt_no rescue '' %>
|
||||
|
||||
<% end %>
|
||||
</span></p>
|
||||
</div>
|
||||
@@ -144,7 +144,10 @@
|
||||
|
||||
<div class="card-title row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
<%if @customer %>
|
||||
<% if @status_sale == 'sale' %>
|
||||
<p class="hidden customer-id"><%= @sale_array[0].customer_id rescue '' %></p>
|
||||
<p>Customer : <%= @sale_array[0].customer.name rescue '' %></p>
|
||||
<%else%>
|
||||
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
|
||||
<p>Customer : <%= @customer.name rescue "" %></p>
|
||||
<%end%>
|
||||
@@ -305,9 +308,7 @@
|
||||
<button type="button" id="add_order" class="btn btn-primary btn-block" >Add Order</button>
|
||||
<% if @dining.bookings.length >= 1 %>
|
||||
<button type="button" id="customer" class="btn btn-primary btn-block" >Customer</button>
|
||||
|
||||
<% if @status_order == 'order' && @status_sale != 'sale' %>
|
||||
<button type="button" id="add_order" class="btn btn-primary btn-block" >Add Order</button>
|
||||
<button type="button" class="btn btn-primary btn-block" disabled >Edit</button>
|
||||
<button type="button" id="discount" class="btn btn-primary btn-block" disabled>Discount</button>
|
||||
<button type="button" id="other-charges" class="btn btn-primary btn-block" disabled>Charges</button>
|
||||
@@ -317,7 +318,6 @@
|
||||
<button type="button" id="pay" class="btn btn-primary btn-block" disabled>Pay</button>
|
||||
<button type="button" class="btn btn-primary btn-block" disabled> Void </button>
|
||||
<% else %>
|
||||
<button type="button" id="add_order" class="btn btn-primary btn-block">Add Order</button>
|
||||
<button type="button" class="btn btn-primary btn-block" id='edit'>Edit</button>
|
||||
<button type="button" id="discount" class="btn btn-primary btn-block" >Discount</button>
|
||||
<button type="button" id="other-charges" class="btn btn-primary btn-block" >Charges</button>
|
||||
@@ -453,15 +453,16 @@ $("#first_bill").on('click', function(){
|
||||
|
||||
$('#pay').on('click',function() {
|
||||
var sale_id = $('#sale_id').val();
|
||||
var url = '/origami/sale/'+ sale_id + "/rounding_adj" ;
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/origami/sale/'+ sale_id + "/rounding_adj",
|
||||
success:function(result){
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||
}
|
||||
});
|
||||
var url = '/origami/sale/'+ sale_id + "/rounding_adj" ;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/origami/sale/'+ sale_id + "/rounding_adj",
|
||||
success:function(result){
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user