update query in order queue printer

This commit is contained in:
Yan
2017-06-06 10:19:15 +06:30
parent 64f5dd65bd
commit 820b1d5e96

View File

@@ -31,7 +31,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
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 customers as cus ON cus.customer_id = orders.customer_id")
.where("order_items.item_code=" + code)
.where("order_items.item_code='" + code + "'")
.group("order_items.item_code")
else
OrderItem.select("order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.item_order_by as order_by, order_items.created_at as order_at, cus.name as customer, df.name as dining")
@@ -40,7 +40,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
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 customers as cus ON cus.customer_id = orders.customer_id")
.where("orders.order_id=" + code.to_s)
.where("orders.order_id='" + code.to_s + "'")
.group("order_items.item_code")
end