To add the condition for CloseCashierCustmisePdf
This commit is contained in:
@@ -43,7 +43,7 @@ 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 = CloseCashierCustomisePdf.new(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges)
|
||||
pdf = CloseCashierPdf.new(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount)
|
||||
close_cashier_pdf = Lookup.collection_of("print_settings") #print_settings with name:CloseCashierPdf
|
||||
|
||||
if !close_cashier_pdf.empty?
|
||||
@@ -52,7 +52,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
|
||||
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)
|
||||
else
|
||||
pdf = CloseCashierPdf.new(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges)
|
||||
pdf = CloseCashierPdf.new(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user