lib/sapos/print/q_reader.rb in sapos-print-1.1.0 vs lib/sapos/print/q_reader.rb in sapos-print-1.1.1
- old
+ new
@@ -29,15 +29,16 @@
end
document = Base64.decode64(msg)
current_printer = reader.printer
-
+ printer_name = 'default'
if msg['printer'] && reader.printers[msg['printer']]
+ printer_name = msg['printer']
current_printer = reader.printers[msg['printer']]
end
- if !current_printer.print(document: document, print_control: print_control, document_number: document_number, id: msgid)
+ if !current_printer.print(document: document, print_control: print_control, document_number: document_number, id: msgid, printer: printer_name)
puts "Printer Error"
end
rescue => e
puts "Error: #{e.message}"
end
\ No newline at end of file