shop code
This commit is contained in:
@@ -38,8 +38,8 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
end
|
||||
# end
|
||||
|
||||
shop = Shop.first
|
||||
directory_name = 'public/orders_'+shop.shop_code
|
||||
# shop = Shop.first
|
||||
directory_name = 'public/orders_'+oqs.shop_code
|
||||
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
||||
|
||||
filename = directory_name + "/order_item_#{order_id}_#{order_item_id}" + ".pdf"
|
||||
@@ -80,8 +80,8 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
print_setting = PrintSetting.all.order("id ASC")
|
||||
order=print_query('order_summary', order_id)
|
||||
|
||||
shop = Shop.first
|
||||
directory_name = 'public/orders_'+shop.shop_code
|
||||
# shop = Shop.first
|
||||
directory_name = 'public/orders_'+oqs.shop_code
|
||||
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
||||
|
||||
# For Print Per Item
|
||||
@@ -192,8 +192,8 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
|
||||
order=print_query('booking_summary', booking_id)
|
||||
|
||||
shop = Shop.first
|
||||
directory_name = 'public/orders_'+shop.shop_code
|
||||
# shop = Shop.first
|
||||
directory_name = 'public/orders_'+oqs.shop_code
|
||||
Dir.mkdir(directory_name) unless File.exists?(directory_name)
|
||||
|
||||
# For Print Per Item
|
||||
|
||||
@@ -195,7 +195,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
if !printer_settings.nil?
|
||||
if !printer_settings.unique_code.strip.downcase.include? ("receiptbillorder")
|
||||
pdf = ReceiptBillPdf.new(printer_settings, kbz_pay_status, qr_code, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details,printed_status,balance,card_data,other_amount,latest_order_no,card_balance_amount)
|
||||
settings = PrintSetting.all
|
||||
settings = PrintSetting.where("shop_code='#{shop_details.shop_code}'")
|
||||
if !settings.nil?
|
||||
settings.each do |setting|
|
||||
if setting.unique_code == 'ReceiptBillPdf'
|
||||
@@ -206,7 +206,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
end
|
||||
end
|
||||
|
||||
receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
|
||||
receipt_bill_a5_pdf = Lookup.where("shop_code='#{shop_details.shop_code}'").collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
|
||||
if !receipt_bill_a5_pdf.empty?
|
||||
receipt_bill_a5_pdf.each do |receipt_bilA5|
|
||||
if receipt_bilA5[0] == 'ReceiptBillA5Pdf'
|
||||
|
||||
Reference in New Issue
Block a user