oqs print query update
This commit is contained in:
@@ -2,7 +2,7 @@ class Oqs::PrintController < ApplicationController
|
||||
def print
|
||||
unique_code="OrderItemPdf"
|
||||
assigned_item_id=params[:id]
|
||||
assigned_order_item=AssignedOrderItem.select("order_id, item_code").where('assigned_order_item_id='+assigned_item_id)
|
||||
assigned_order_item=AssignedOrderItem.select("order_id, item_code").where("assigned_order_item_id='" + assigned_item_id + "'")
|
||||
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
order_queue_printer= Printer::OrderQueuePrinter.new(print_settings)
|
||||
|
||||
@@ -29,7 +29,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
.joins("left join orders ON orders.order_id = order_items.order_id
|
||||
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||
left join dining_facilities AS df ON df.dining_facility_id = b.dining_facility_id
|
||||
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
||||
left join customers as cus ON cus.customer_id = orders.customer_id")
|
||||
.where("order_items.item_code='" + code + "'")
|
||||
.group("order_items.item_code")
|
||||
@@ -38,7 +38,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
.joins("left join orders ON orders.order_id = order_items.order_id
|
||||
left join booking_orders AS bo ON bo.order_id=order_items.order_id
|
||||
left join bookings AS b ON b.booking_id = bo.booking_id
|
||||
left join dining_facilities AS df ON df.dining_facility_id = b.dining_facility_id
|
||||
left join dining_facilities AS df ON df.id = b.dining_facility_id
|
||||
left join customers as cus ON cus.customer_id = orders.customer_id")
|
||||
.where("orders.order_id='" + code.to_s + "'")
|
||||
.group("order_items.item_code")
|
||||
|
||||
Reference in New Issue
Block a user