This commit is contained in:
@@ -38,7 +38,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
|
||||
# self.print(filename, cashier_terminal.printer_name)
|
||||
# end
|
||||
|
||||
def print_close_cashier(printer_settings,cashier_terminal,shift_sale, sale_items, total_other_charges_info,shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments)
|
||||
def print_close_cashier(printer_settings,cashier_terminal,shift_sale, sale_items, total_other_charges_info,shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments,foodcourt=nil)
|
||||
|
||||
if !sale_items.blank? or !sale_items.nil?
|
||||
@account_cate_count = Hash.new {|hash, key| hash[key] = 0}
|
||||
@@ -59,16 +59,16 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
|
||||
cashier = shift_sale.employee.name
|
||||
shift_name = shift_sale.shift_started_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") + "_" + shift_sale.shift_closed_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p")
|
||||
filename = "tmp/close_cashier_#{cashier}_#{shift_name}.pdf"
|
||||
pdf = CloseCashierPdf.new(printer_settings,shift_sale, sale_items, total_other_charges_info, @account_cate_count, @menu_cate_count, @totalByAccount, shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments)
|
||||
pdf = CloseCashierPdf.new(printer_settings,shift_sale, sale_items, total_other_charges_info, @account_cate_count, @menu_cate_count, @totalByAccount, shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments,foodcourt)
|
||||
close_cashier_pdf = Lookup.collection_of("print_settings") #print_settings with name:CloseCashierPdf
|
||||
|
||||
if !close_cashier_pdf.empty?
|
||||
close_cashier_pdf.each do |close_cashier|
|
||||
if close_cashier[0] == 'CloseCashierCustomisePdf'
|
||||
if close_cashier[1] == '1'
|
||||
pdf = CloseCashierCustomisePdf.new(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments)
|
||||
pdf = CloseCashierCustomisePdf.new(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments,foodcourt)
|
||||
else
|
||||
pdf = CloseCashierPdf.new(printer_settings,shift_sale, sale_items, total_other_charges_info, @account_cate_count, @menu_cate_count, @totalByAccount, shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments)
|
||||
pdf = CloseCashierPdf.new(printer_settings,shift_sale, sale_items, total_other_charges_info, @account_cate_count, @menu_cate_count, @totalByAccount, shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments,foodcourt)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user