fixed conflict
This commit is contained in:
@@ -39,8 +39,8 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
# end
|
||||
|
||||
|
||||
shop = Shop.current_shop
|
||||
directory_name = 'public/orders_'+shop.shop_code
|
||||
# shop = Shop.current_shop
|
||||
directory_name = 'public/orders_'+oqs.shop_code
|
||||
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
||||
|
||||
filename = directory_name + "/order_item_#{order_id}_#{order_item_id}" + ".pdf"
|
||||
@@ -82,8 +82,9 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
order=print_query('order_summary', order_id)
|
||||
|
||||
|
||||
shop = Shop.current_shop
|
||||
directory_name = 'public/orders_'+ shop.shop_code
|
||||
# shop = Shop.current_shop
|
||||
directory_name = 'public/orders_'+ oqs.shop_code
|
||||
|
||||
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
||||
|
||||
# For Print Per Item
|
||||
@@ -195,8 +196,8 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
order=print_query('booking_summary', booking_id)
|
||||
|
||||
|
||||
shop = Shop.current_shop
|
||||
directory_name = 'public/orders_'+shop.shop_code
|
||||
# shop = Shop.current_shop
|
||||
directory_name = 'public/orders_'+oqs.shop_code
|
||||
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
||||
|
||||
# For Print Per Item
|
||||
@@ -297,7 +298,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
# Query for OQS with status
|
||||
def print_query(type, id)
|
||||
if type == "order_item"
|
||||
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||
OrderItem.select("orders.source,cus.contact_no,rder_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||
.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
|
||||
@@ -307,7 +308,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
.where("order_items.order_items_id = '#{ id }'")
|
||||
.group("order_items.item_code")
|
||||
elsif type == "order_summary"
|
||||
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||
.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
|
||||
@@ -318,7 +319,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
.group("order_items.order_items_id")
|
||||
else
|
||||
# order summary for booking
|
||||
OrderItem.select("order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||
OrderItem.select("orders.source,cus.contact_no,order_items.order_id, order_items.item_code, order_items.item_name, order_items.qty, order_items.price, order_items.options, order_items.item_order_by as order_by, order_items.created_at as order_at, order_items.set_menu_items, cus.name as customer, df.type, df.name as dining,item.alt_name as alt_name")
|
||||
.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
|
||||
|
||||
Reference in New Issue
Block a user