update order for oqs

This commit is contained in:
Yan
2017-06-16 19:26:21 +06:30
parent 0a496f2274
commit 9f3acad10d
3 changed files with 4 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ class Api::OrdersController < Api::ApiController
@order.customer_id = params[:customer_id] == ""? "CUS-000000000001" : params[:customer_id] # for no customer id from mobile @order.customer_id = params[:customer_id] == ""? "CUS-000000000001" : params[:customer_id] # for no customer id from mobile
@order.items = params[:order_items] @order.items = params[:order_items]
@order.guest = params[:guest_info] @order.guest = params[:guest_info]
@order.table_id = params[:table_id] @order.table_id = params[:table_id] # this is dining facilities's id
@order.new_booking = true @order.new_booking = true
@order.employee_name = current_login_employee.name @order.employee_name = current_login_employee.name
#Create Table Booking or Room Booking #Create Table Booking or Room Booking

View File

@@ -10,7 +10,7 @@ class OrderQueueStation < ApplicationRecord
def process_order (order, table_id) def process_order (order, table_id)
oqs_stations = OrderQueueStation.active oqs_stations = OrderQueueStation.active
dining=DiningFacility.find_by_name(table_id) dining=DiningFacility.find(table_id)
oqpbz = OrderQueueProcessByZone.find_by_zone_id(dining.zone_id) oqpbz = OrderQueueProcessByZone.find_by_zone_id(dining.zone_id)
order_items = order.order_items order_items = order.order_items
@@ -31,7 +31,6 @@ class OrderQueueStation < ApplicationRecord
end end
end end
end end
end end
#Print OQS where printing is require #Print OQS where printing is require

View File

@@ -147,8 +147,8 @@ admin_employee = Employee.create({name: "Waiter", role: "waiter", password: "111
admin_employee = Employee.create({name: "Waiter 2", role: "waiter", password: "22222", emp_id:"222", created_by: "SYSTEM DEFAULT"}) admin_employee = Employee.create({name: "Waiter 2", role: "waiter", password: "22222", emp_id:"222", created_by: "SYSTEM DEFAULT"})
admin_employee = Employee.create({name: "Cashier", role: "cashier", password: "33333", emp_id:"333", created_by: "SYSTEM DEFAULT"}) admin_employee = Employee.create({name: "Cashier", role: "cashier", password: "33333", emp_id:"333", created_by: "SYSTEM DEFAULT"})
order_station1=PrintSetting.create({name: "OrderItemPdf", unique_code: "OrderItemPdf", printer_name: "EPSON-TM-T82-S-A"}) # order_station1=PrintSetting.create({name: "OrderItemPdf", unique_code: "OrderItemPdf", printer_name: "EPSON-TM-T82-S-A"})
order_station2=PrintSetting.create({name: "Order Summary", unique_code: "OrderSummaryPdf", printer_name: "EPSON-TM-T82-S-A"}) # order_station2=PrintSetting.create({name: "Order Summary", unique_code: "OrderSummaryPdf", printer_name: "EPSON-TM-T82-S-A"})
request_bill_printer=PrintSetting.create({name: "Receipt Bill", unique_code: "ReceiptBillPdf", printer_name: "EPSON-TM-T82-S-A"}) request_bill_printer=PrintSetting.create({name: "Receipt Bill", unique_code: "ReceiptBillPdf", printer_name: "EPSON-TM-T82-S-A"})
crm_order_printer=PrintSetting.create({name: "CRM Order", unique_code: "CrmOrderPdf", printer_name: "EPSON-TM-T82-S-A"}) crm_order_printer=PrintSetting.create({name: "CRM Order", unique_code: "CrmOrderPdf", printer_name: "EPSON-TM-T82-S-A"})
queue_no_printer=PrintSetting.create({name: "Queue No", unique_code: "QueueNoPdf", printer_name: "EPSON-TM-T82-S-A"}) queue_no_printer=PrintSetting.create({name: "Queue No", unique_code: "QueueNoPdf", printer_name: "EPSON-TM-T82-S-A"})