oqs options printer
This commit is contained in:
@@ -30,6 +30,7 @@ class Origami::TableInvoicesController < BaseOrigamiController
|
||||
end
|
||||
|
||||
def show
|
||||
puts 'Catch me if you can.......................'
|
||||
@table = DiningFacility.find(params[:table_id])
|
||||
@membership = MembershipSetting::MembershipSetting
|
||||
@payment_methods = PaymentMethodSetting.all
|
||||
|
||||
@@ -8,7 +8,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
end
|
||||
|
||||
order_item = print_query('order_item', order_item_id) #OrderItem.find_by_item_code(item_code)
|
||||
|
||||
options = order_item[0].options
|
||||
# filename = "tmp/order_item_#{order_id}_#{order_item_id}" + ".pdf"
|
||||
|
||||
pdf = OrderItemPdf.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name, before_updated_qty)
|
||||
@@ -34,7 +34,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
end
|
||||
end
|
||||
end
|
||||
# end
|
||||
# end
|
||||
|
||||
shop = Shop.first
|
||||
directory_name = 'public/orders_'+shop.shop_code
|
||||
@@ -43,7 +43,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
filename = directory_name + "/order_item_#{order_id}_#{order_item_id}" + ".pdf"
|
||||
|
||||
pdf.render_file filename
|
||||
|
||||
|
||||
if oqs.print_copy
|
||||
#no print in cloud server
|
||||
if ENV["SERVER_MODE"] != "cloud"
|
||||
|
||||
@@ -42,6 +42,9 @@ class Printer::PrinterWorker
|
||||
printer_destination = self.printer_destination
|
||||
end
|
||||
|
||||
puts printer_destination
|
||||
puts '........Printer Destination..........'
|
||||
|
||||
copy = self.print_copies
|
||||
#Print only when printer information is not null
|
||||
if !self.printer_destination.nil?
|
||||
|
||||
@@ -88,7 +88,8 @@ class OrderItemSlimPdf < Prawn::Document
|
||||
|
||||
#Add Order Item
|
||||
add_order_items_slim(order_item_slim, options, alt_name, precision)
|
||||
|
||||
puts options
|
||||
puts '............PDF OPTIONS...............'
|
||||
dash(1, :space => 1, :phase => 1)
|
||||
stroke_horizontal_line 0, (self.page_width - self.margin)
|
||||
add_updated_qty_text(before_updated_qty, order_item_slim.qty, precision)
|
||||
|
||||
Reference in New Issue
Block a user