This commit is contained in:
phyusin
2018-03-19 19:41:32 +06:30
parent bf84392ef8
commit 27a3026c2a
2 changed files with 6 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ class OrderQueueStation < ApplicationRecord
# validations
validates_presence_of :station_name, :printer_name
def process_order (order, table_id)
def process_order (order, table_id, order_source = nil)
oqs_stations = OrderQueueStation.active
@@ -55,7 +55,7 @@ class OrderQueueStation < ApplicationRecord
end
end
if oqs.auto_print
if oqs.auto_print && order_source != "quick_service"
if oqs_order_items.length > 0
print_slip(oqs, order, oqs_order_items)
is_auto_printed = true
@@ -90,7 +90,7 @@ class OrderQueueStation < ApplicationRecord
end
end
if oqs.auto_print
if oqs.auto_print && order_source != "quick_service"
if oqs_order_items.length > 0
print_slip(oqs, order, oqs_order_items)
is_auto_printed = true

View File

@@ -144,9 +144,12 @@ $(document).ready(function(){
});
$('#back').on('click', function () {
var booking_id = '<%= @booking.booking_id %>';
<% if !@link_type.nil? %>
<% if @link_type == 'oqs' %>
window.location.href = '/oqs';
<% elsif @link_type == 'pending' %>
window.location.href = '/origami/quick_service/pending_order/'+booking_id;
<% else %>
<% if !@dining_type.nil? %>
<% if @dining_type == 'Table' %>