change and check order_slim_pdf
This commit is contained in:
@@ -25,7 +25,7 @@ class Oqs::EditController < BaseOqsController
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
|
||||
unique_code="OrderItemPdf"
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
unique_code="OrderItemSlimPdf"
|
||||
end
|
||||
|
||||
@@ -4,7 +4,8 @@ class Oqs::PrintController < ApplicationController
|
||||
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
unique_code="OrderItemPdf"
|
||||
if !order_slim_pdf.nil?
|
||||
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
unique_code="OrderItemSlimPdf"
|
||||
end
|
||||
@@ -40,7 +41,7 @@ class Oqs::PrintController < ApplicationController
|
||||
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
unique_code="OrderSummaryPdf"
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
unique_code="OrderSummarySlimPdf"
|
||||
end
|
||||
|
||||
@@ -104,7 +104,7 @@ class OrderQueueStation < ApplicationRecord
|
||||
def print_slip(oqs, order, order_items)
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
unique_code="OrderSummaryPdf"
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
unique_code="OrderSummarySlimPdf"
|
||||
end
|
||||
@@ -126,7 +126,7 @@ class OrderQueueStation < ApplicationRecord
|
||||
def print_slip_item(oqs, assigned_item)
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
unique_code="OrderItemPdf"
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
unique_code="OrderItemSlimPdf"
|
||||
end
|
||||
|
||||
@@ -18,7 +18,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
# check for item not to show
|
||||
# if order_item[0].price != 0
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderItemSlimPdf.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name)
|
||||
else
|
||||
@@ -67,7 +67,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
# check for item not to show
|
||||
#if odi.price != 0
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderItemSlimPdf.new(print_settings,odi_item[0], print_status, options, oqs.use_alternate_name)
|
||||
else
|
||||
@@ -91,7 +91,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
# For Print Order Summary
|
||||
else
|
||||
filename = "tmp/order_summary_#{order_id}" + ".pdf"
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new(print_settings,order, print_status, order_items, oqs.use_alternate_name)
|
||||
else
|
||||
@@ -134,7 +134,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
# check for item not to show
|
||||
#if odi.price != 0
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderItemSlimPdf.new(print_settings,odi, print_status, options,oqs.use_alternate_name)
|
||||
else
|
||||
@@ -161,7 +161,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
# For Print Order Summary
|
||||
else
|
||||
filename = "tmp/booking_summary_#{booking_id}" + ".pdf"
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new(print_settings,order, print_status,oqs.use_alternate_name)
|
||||
else
|
||||
|
||||
@@ -6,7 +6,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
#Print
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
pdf = OrderItemPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderItemSlimPdf.new
|
||||
end
|
||||
@@ -22,8 +22,8 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
@@ -39,8 +39,8 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
@@ -56,8 +56,8 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
@@ -73,8 +73,8 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
@@ -90,8 +90,8 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
order_slim_pdf = Lookup.collection_of("order_slim_pdf") #order_slim_pdf
|
||||
filename = "tmp/order_summary_#{booking_id}" + ".pdf"
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !order_slim_pdf.nil?
|
||||
if order_slim_pdf[1] == '1'
|
||||
if !order_slim_pdf.empty?
|
||||
if order_slim_pdf[0][1] == '1'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user