fix for undefied method type in item pdf

This commit is contained in:
Yan
2017-06-28 15:40:54 +06:30
parent 879a4b366c
commit 5ff75fad7d
3 changed files with 5 additions and 5 deletions

View File

@@ -33,13 +33,13 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
order=print_query('order_summary', order_id)
# For Print Per Item
if oqs.cut_per_item
order_items.each do|odi|
order.each do|odi|
filename = "tmp/order_item_#{odi.item_name}" + ".pdf"
# For Item Options
options = odi.options == "[]"? "" : odi.options
# check for item not to show
if odi.price != 0 || odi.price != 10
if odi.price != 0
pdf = OrderItemPdf.new(odi, print_status, options)
# pdf.render_file "tmp/order_item.pdf"
pdf.render_file filename