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