add lookup setting for quickservice add order btn
This commit is contained in:
@@ -84,9 +84,9 @@ For ReceiptBillAltName options
|
||||
|
||||
For Using Star Printer
|
||||
*** Need to change these print settings
|
||||
1) settings/print_settings => OrderItemStarPdf
|
||||
2) settings/print_settings => ReceiptBillStarPdf
|
||||
3) settings/print_settings => SaleItemsStarPdf
|
||||
1) settings/print_settings/unique_code => OrderItemStarPdf
|
||||
2) settings/print_settings/unique_code => ReceiptBillStarPdf
|
||||
3) settings/print_settings/unique_code => SaleItemsStarPdf
|
||||
*** Other print settings aren't need to change.
|
||||
|
||||
For Show Sale Items Summary at CloseCashierPrint
|
||||
|
||||
@@ -38,22 +38,22 @@ class Oqs::EditController < BaseOqsController
|
||||
|
||||
if ENV["SERVER_MODE"] != "cloud" #&& order.source == 'cashier' #no print in cloud server
|
||||
# print
|
||||
assigned_item = AssignedOrderItem.find_by_instance_code_and_order_id(order_item.item_instance_code, order_item.order_id)
|
||||
assigned_item = AssignedOrderItem.find_by_instance_code_and_order_id(order_item.item_instance_code, order_item.order_id)
|
||||
assigned_items = nil
|
||||
if !assigned_item.nil?
|
||||
assigned_items = AssignedOrderItem.where("item_code='" + assigned_item.item_code + "' AND " + "order_id='" + assigned_item.order_id + "'")
|
||||
end
|
||||
end
|
||||
if !assigned_items.nil?
|
||||
assigned_items.each do |assign_item|
|
||||
# order queue stations
|
||||
oqs = assign_item.order_queue_station
|
||||
|
||||
printer = PrintSetting.all
|
||||
printer = PrintSetting.all
|
||||
|
||||
unique_code="OrderItemPdf"
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'OrderItemPdf'
|
||||
if printer_setting.unique_code == 'OrderItemPdf'
|
||||
unique_code="OrderItemPdf"
|
||||
elsif printer_setting.unique_code == 'OrderItemSlimPdf'
|
||||
unique_code="OrderItemSlimPdf"
|
||||
@@ -62,12 +62,14 @@ class Oqs::EditController < BaseOqsController
|
||||
elsif printer_setting.unique_code == 'OrderItemCustomisePdf'
|
||||
unique_code="OrderItemCustomisePdf"
|
||||
elsif printer_setting.unique_code == 'OrderSetItemCustomisePdf'
|
||||
unique_code="OrderSetItemCustomisePdf"
|
||||
unique_code="OrderSetItemCustomisePdf"
|
||||
elsif printer_setting.unique_code == 'OrderItemSlimCustomisePdf'
|
||||
unique_code="OrderItemSlimCustomisePdf"
|
||||
end
|
||||
elsif printer_setting.unique_code == 'OrderItemStarPdf'
|
||||
unique_code="OrderItemStarPdf"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
order_queue_printer= Printer::OrderQueuePrinter.new(print_settings)
|
||||
|
||||
@@ -28,7 +28,7 @@ class Origami::VoidController < BaseOrigamiController
|
||||
shift.save
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
sale.rounding_adjustment = 0.0
|
||||
sale.payment_status = 'void'
|
||||
sale.sale_status = 'void'
|
||||
@@ -71,16 +71,16 @@ class Origami::VoidController < BaseOrigamiController
|
||||
table = nil
|
||||
end
|
||||
|
||||
# FOr Sale Audit
|
||||
# FOr Sale Audit
|
||||
action_by = current_user.name
|
||||
if access_code != "null" && current_user.role == "cashier"
|
||||
action_by = Employee.find_by_emp_id(access_code).name
|
||||
end
|
||||
|
||||
|
||||
# remark = "Void Sale ID #{sale_id} | Receipt No #{sale.receipt_no} | Receipt No #{sale.receipt_no} | Table ->#{table.name}"
|
||||
sale_audit = SaleAudit.record_audit_for_edit(sale_id,current_user.name, action_by,remark,"SALEVOID" )
|
||||
|
||||
# For Print
|
||||
# For Print
|
||||
|
||||
member_info = nil
|
||||
rebate_amount = nil
|
||||
@@ -88,7 +88,7 @@ class Origami::VoidController < BaseOrigamiController
|
||||
|
||||
# For Cashier by Zone
|
||||
bookings = Booking.where("sale_id='#{sale_id}'")
|
||||
if bookings.count > 1
|
||||
if bookings.count > 1
|
||||
# for Multiple Booking
|
||||
if bookings[0].dining_facility_id.to_i>0
|
||||
table = DiningFacility.find(bookings[0].dining_facility_id)
|
||||
@@ -102,12 +102,20 @@ class Origami::VoidController < BaseOrigamiController
|
||||
shift = ShiftSale.find(sale.shift_sale_id)
|
||||
cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)
|
||||
end
|
||||
|
||||
|
||||
|
||||
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||
unique_code = "ReceiptBillPdf"
|
||||
# get printer info
|
||||
# print_settings = PrintSetting.find_by_unique_code('ReceiptBillPdf') # SaleItemsPdf
|
||||
#
|
||||
# if !print_settings.nil?
|
||||
# unique_code = 'ReceiptBillPdf'
|
||||
# elsif
|
||||
# unique_code = 'ReceiptBillStarPdf'
|
||||
# end
|
||||
|
||||
customer= Customer.find(sale.customer_id)
|
||||
|
||||
|
||||
#shop detail
|
||||
shop_details = current_shop
|
||||
# get member information
|
||||
@@ -119,34 +127,48 @@ class Origami::VoidController < BaseOrigamiController
|
||||
current_balance = 0
|
||||
end
|
||||
|
||||
printer = PrintSetting.all
|
||||
|
||||
unique_code="ReceiptBillPdf"
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'ReceiptBillPdf'
|
||||
unique_code="ReceiptBillPdf"
|
||||
elsif printer_setting.unique_code == 'ReceiptBillA5Pdf'
|
||||
unique_code="ReceiptBillA5Pdf"
|
||||
elsif printer_setting.unique_code == 'ReceiptBillStarPdf'
|
||||
unique_code="ReceiptBillStarPdf"
|
||||
end
|
||||
end
|
||||
end
|
||||
# get printer info
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
# Calculate Food and Beverage Total
|
||||
item_price_by_accounts = SaleItem.calculate_price_by_accounts(sale.sale_items)
|
||||
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale.sale_items)
|
||||
other_amount = SaleItem.calculate_other_charges(sale.sale_items)
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "VOID",current_balance,nil,other_amount,nil,nil,nil)
|
||||
result = {
|
||||
:filepath => filename,
|
||||
:printer_model => print_settings.brand_name,
|
||||
:printer_url => print_settings.api_settings
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "VOID",current_balance,nil,other_amount,nil,nil,nil)
|
||||
result = {
|
||||
:filepath => filename,
|
||||
:printer_model => print_settings.brand_name,
|
||||
:printer_url => print_settings.api_settings
|
||||
}
|
||||
|
||||
# Mobile Print
|
||||
render :json => result.to_json
|
||||
# end
|
||||
|
||||
|
||||
#end print
|
||||
|
||||
# update complete order items in oqs
|
||||
SaleOrder.where("sale_id = '#{ sale_id }'").find_each do |sodr|
|
||||
SaleOrder.where("sale_id = '#{ sale_id }'").find_each do |sodr|
|
||||
AssignedOrderItem.where("order_id = '#{ sodr.order_id }'").find_each do |aoi|
|
||||
aoi.delivery_status = 1
|
||||
aoi.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -18,7 +18,7 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
||||
# sale.compute_by_sale_items(sale_id, sale.sale_items,0,order_source)
|
||||
# add to sale item with foc
|
||||
# sale_items = SaleItem.where("sale_id='#{ sale_id }' and status is null")
|
||||
|
||||
|
||||
sale.sale_items.each do|item|
|
||||
# SaleItem.update_existing_item(item.qty, item, sale_id, remark, item.unit_price, item.price)
|
||||
item.status = remark
|
||||
@@ -53,7 +53,7 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
||||
table = nil
|
||||
end
|
||||
|
||||
# FOr Sale Audit
|
||||
# FOr Sale Audit
|
||||
action_by = current_user.name
|
||||
if access_code != "null" && current_user.role == "cashier"
|
||||
action_by = Employee.find_by_emp_id(access_code).name
|
||||
@@ -61,7 +61,7 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
||||
# remark = "Void Sale ID #{sale_id} | Receipt No #{sale.receipt_no} | Receipt No #{sale.receipt_no} | Table ->#{table.name}"
|
||||
sale_audit = SaleAudit.record_audit_for_edit(sale_id,current_user.name, action_by,remark,remark )
|
||||
|
||||
# For Print
|
||||
# For Print
|
||||
|
||||
member_info = nil
|
||||
rebate_amount = nil
|
||||
@@ -69,7 +69,7 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
||||
|
||||
# For Cashier by Zone
|
||||
bookings = Booking.where("sale_id='#{sale_id}'")
|
||||
if bookings.count > 1
|
||||
if bookings.count > 1
|
||||
# for Multiple Booking
|
||||
if bookings[0].dining_facility_id.to_i>0
|
||||
table = DiningFacility.find(bookings[0].dining_facility_id)
|
||||
@@ -83,12 +83,12 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
||||
shift = ShiftSale.find(sale.shift_sale_id)
|
||||
cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)
|
||||
end
|
||||
|
||||
|
||||
|
||||
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||
unique_code = "ReceiptBillPdf"
|
||||
# unique_code = "ReceiptBillPdf"
|
||||
customer= Customer.find(sale.customer_id)
|
||||
|
||||
|
||||
#shop detail
|
||||
shop_details = current_shop
|
||||
# get member information
|
||||
@@ -100,34 +100,49 @@ class Origami::WasteSpoileController < BaseOrigamiController
|
||||
current_balance = 0
|
||||
end
|
||||
|
||||
printer = PrintSetting.all
|
||||
|
||||
unique_code="ReceiptBillPdf"
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'ReceiptBillPdf'
|
||||
unique_code="ReceiptBillPdf"
|
||||
elsif printer_setting.unique_code == 'ReceiptBillA5Pdf'
|
||||
unique_code="ReceiptBillA5Pdf"
|
||||
elsif printer_setting.unique_code == 'ReceiptBillStarPdf'
|
||||
unique_code="ReceiptBillStarPdf"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# get printer info
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
# Calculate Food and Beverage Total
|
||||
item_price_by_accounts = SaleItem.calculate_price_by_accounts(sale.sale_items)
|
||||
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale.sale_items)
|
||||
other_amount = SaleItem.calculate_other_charges(sale.sale_items)
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, remark,current_balance,nil,other_amount,nil,nil,nil)
|
||||
result = {
|
||||
:filepath => filename,
|
||||
:printer_model => print_settings.brand_name,
|
||||
:printer_url => print_settings.api_settings
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
filename, sale_receipt_no, printer_name = printer.print_receipt_bill(print_settings,cashier_terminal,sale.sale_items,sale,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, remark,current_balance,nil,other_amount,nil,nil,nil)
|
||||
result = {
|
||||
:filepath => filename,
|
||||
:printer_model => print_settings.brand_name,
|
||||
:printer_url => print_settings.api_settings
|
||||
}
|
||||
|
||||
# Mobile Print
|
||||
render :json => result.to_json
|
||||
# end
|
||||
|
||||
|
||||
#end print
|
||||
|
||||
# update complete order items in oqs
|
||||
SaleOrder.where("sale_id = '#{ sale_id }'").find_each do |sodr|
|
||||
SaleOrder.where("sale_id = '#{ sale_id }'").find_each do |sodr|
|
||||
AssignedOrderItem.where("order_id = '#{ sodr.order_id }'").find_each do |aoi|
|
||||
aoi.delivery_status = 1
|
||||
aoi.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'OrderItemPdf'
|
||||
if printer_setting.unique_code == 'OrderItemPdf'
|
||||
pdf = OrderItemPdf.new
|
||||
elsif printer_setting.unique_code == 'OrderItemSlimPdf'
|
||||
pdf = OrderItemSlimPdf.new
|
||||
@@ -18,12 +18,12 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
elsif printer_setting.unique_code == 'OrderItemCustomisePdf'
|
||||
pdf = OrderItemCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSetItemCustomisePdf'
|
||||
pdf = OrderSetItemCustomisePdf.new
|
||||
pdf = OrderSetItemCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderItemSlimCustomisePdf'
|
||||
pdf = OrderItemSlimCustomisePdf.new
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
pdf.render_file "tmp/order_item_queue_#{order_id}_#{order_item_id}" + ".pdf"
|
||||
#no print in cloud server
|
||||
if ENV["SERVER_MODE"] != "cloud"
|
||||
@@ -41,7 +41,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
pdf = OrderSummaryPdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimPdf'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
@@ -50,12 +50,12 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
elsif printer_setting.unique_code == 'OrderSummaryCustomisePdf'
|
||||
pdf = OrderSummaryCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySetCustomisePdf'
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimCustomisePdf'
|
||||
pdf = OrderSummarySlimCustomisePdf.new
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
#no print in cloud server
|
||||
if ENV["SERVER_MODE"] != "cloud"
|
||||
@@ -72,7 +72,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
pdf = OrderSummaryPdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimPdf'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
@@ -81,12 +81,12 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
elsif printer_setting.unique_code == 'OrderSummaryCustomisePdf'
|
||||
pdf = OrderSummaryCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySetCustomisePdf'
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimCustomisePdf'
|
||||
pdf = OrderSummarySlimCustomisePdf.new
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
#no print in cloud server
|
||||
if ENV["SERVER_MODE"] != "cloud"
|
||||
@@ -103,7 +103,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
pdf = OrderSummaryPdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimPdf'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
@@ -112,12 +112,12 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
elsif printer_setting.unique_code == 'OrderSummaryCustomisePdf'
|
||||
pdf = OrderSummaryCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySetCustomisePdf'
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimCustomisePdf'
|
||||
pdf = OrderSummarySlimCustomisePdf.new
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
#no print in cloud server
|
||||
if ENV["SERVER_MODE"] != "cloud"
|
||||
@@ -134,7 +134,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
pdf = OrderSummaryPdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimPdf'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
@@ -143,12 +143,12 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
elsif printer_setting.unique_code == 'OrderSummaryCustomisePdf'
|
||||
pdf = OrderSummaryCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySetCustomisePdf'
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimCustomisePdf'
|
||||
pdf = OrderSummarySlimCustomisePdf.new
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
#no print in cloud server
|
||||
if ENV["SERVER_MODE"] != "cloud"
|
||||
@@ -165,7 +165,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
pdf = OrderSummaryPdf.new
|
||||
if !printer.empty?
|
||||
printer.each do |printer_setting|
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
if printer_setting.unique_code == 'OrderSummaryPdf'
|
||||
pdf = OrderSummaryPdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimPdf'
|
||||
pdf = OrderSummarySlimPdf.new
|
||||
@@ -174,12 +174,12 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
elsif printer_setting.unique_code == 'OrderSummaryCustomisePdf'
|
||||
pdf = OrderSummaryCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySetCustomisePdf'
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
pdf = OrderSummarySetCustomisePdf.new
|
||||
elsif printer_setting.unique_code == 'OrderSummarySlimCustomisePdf'
|
||||
pdf = OrderSummarySlimCustomisePdf.new
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
pdf.render_file filename
|
||||
#no print in cloud server
|
||||
if ENV["SERVER_MODE"] != "cloud"
|
||||
@@ -191,7 +191,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
def print_receipt_bill(printer_settings,cashier_terminal,sale_items,sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount=nil,shop_details, printed_status,balance,card_data,other_amount,latest_order_no,card_balance_amount,order_reservation)
|
||||
#Use CUPS service
|
||||
#Generate PDF
|
||||
#Print
|
||||
#Print
|
||||
if !printer_settings.nil?
|
||||
if !printer_settings.unique_code.strip.downcase.include? ("receiptbillorder")
|
||||
pdf = ReceiptBillPdf.new(printer_settings, 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)
|
||||
@@ -205,11 +205,11 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
receipt_bill_a5_pdf = Lookup.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'
|
||||
if receipt_bilA5[0] == 'ReceiptBillA5Pdf'
|
||||
if receipt_bilA5[1] == '1'
|
||||
pdf = ReceiptBillA5Pdf.new(printer_settings, 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)
|
||||
# else
|
||||
@@ -222,7 +222,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
||||
#doemal online order pdf template
|
||||
pdf = ReceiptBillOrderPdf.new(printer_settings, 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,order_reservation)
|
||||
end
|
||||
|
||||
|
||||
# print as print copies in printer setting
|
||||
count = printer_settings.print_copies
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
|
||||
<%end%>
|
||||
<%else%>
|
||||
<% if @quick_service_only %>
|
||||
<% if !@quick_service_only %>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-11" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
Reference in New Issue
Block a user