move table & order item actioncable added
This commit is contained in:
@@ -13,7 +13,19 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
# check for item not to show
|
# check for item not to show
|
||||||
# if order_item[0].price != 0
|
# if order_item[0].price != 0
|
||||||
pdf = print_settings.unique_code.constantize.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name, before_updated_qty)
|
pdf = print_settings.unique_code.constantize.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name, before_updated_qty)
|
||||||
|
booking_id = Booking.get_booking_id(order_id)
|
||||||
# end
|
# end
|
||||||
|
ActionCable.server.broadcast("print_channel",
|
||||||
|
queue: oqs.station_name,
|
||||||
|
unique_code: print_settings.unique_code,
|
||||||
|
print_copies: print_settings.print_copies,
|
||||||
|
data: {
|
||||||
|
order_item: order_item[0].as_json(methods: :type),
|
||||||
|
print_status: print_status.gsub(/[()]/, ""),
|
||||||
|
booking_id: booking_id,
|
||||||
|
precision: print_settings.precision
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
shop = Shop.current_shop
|
shop = Shop.current_shop
|
||||||
directory_name = 'public/orders_'+shop.shop_code
|
directory_name = 'public/orders_'+shop.shop_code
|
||||||
|
|||||||
@@ -211,6 +211,21 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
|||||||
#no print in cloud server
|
#no print in cloud server
|
||||||
self.print("tmp/print_move_table.pdf", oqs.printer_name)
|
self.print("tmp/print_move_table.pdf", oqs.printer_name)
|
||||||
end
|
end
|
||||||
|
ActionCable.server.broadcast("print_channel",
|
||||||
|
queue: oqs.station_name,
|
||||||
|
unique_code: print_settings.unique_code,
|
||||||
|
print_copies: print_settings.print_copies,
|
||||||
|
data: {
|
||||||
|
type: type,
|
||||||
|
body: {
|
||||||
|
to: to,
|
||||||
|
from: from,
|
||||||
|
date: date,
|
||||||
|
moved_by: moved_by,
|
||||||
|
order_items: order_items.as_json,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
#Bill Receipt Print
|
#Bill Receipt Print
|
||||||
|
|||||||
Reference in New Issue
Block a user