api for cashier app
This commit is contained in:
@@ -166,7 +166,7 @@ class Origami::CustomersController < BaseOrigamiController
|
||||
receipt_no = params[:receipt_no]
|
||||
sale = Sale.find_by_receipt_no(receipt_no)
|
||||
@out = []
|
||||
action_by = current_user.id
|
||||
action_by = current_user.name
|
||||
membership_setting = MembershipSetting.find_by_membership_type("paypar_url")
|
||||
if membership_setting.gateway_url
|
||||
member_actions =MembershipAction.find_by_membership_type("get_account_balance")
|
||||
|
||||
@@ -72,19 +72,21 @@ class Origami::RequestBillsController < ApplicationController
|
||||
#check checkInOut pdf print
|
||||
check_booking = Booking.find_by_sale_id(@sale_id)
|
||||
checkout_time = Lookup.collection_of('checkout_time')
|
||||
terminal = DiningFacility.find_by_id(check_booking.dining_facility_id)
|
||||
cashier_terminal = CashierTerminal.find_by_id(terminal.zone_id)
|
||||
if !check_booking.dining_facility_id.nil?
|
||||
terminal = DiningFacility.find_by_id(check_booking.dining_facility_id)
|
||||
cashier_terminal = CashierTerminal.find_by_id(terminal.zone_id)
|
||||
|
||||
if (!checkout_time.empty?) && (ENV["SERVER_MODE"] != "cloud") #no print in cloud server
|
||||
unique_code = "CheckInOutPdf"
|
||||
printer = PrintSetting.find_by_unique_code(unique_code)
|
||||
if (!checkout_time.empty?) && (ENV["SERVER_MODE"] != "cloud") #no print in cloud server
|
||||
unique_code = "CheckInOutPdf"
|
||||
printer = PrintSetting.find_by_unique_code(unique_code)
|
||||
|
||||
# print when complete click
|
||||
order_queue_printer = Printer::OrderQueuePrinter.new(printer)
|
||||
# print when complete click
|
||||
order_queue_printer = Printer::OrderQueuePrinter.new(printer)
|
||||
|
||||
if !printer.nil?
|
||||
order_queue_printer.print_check_in_out(printer, cashier_terminal, check_booking, table)
|
||||
end
|
||||
if !printer.nil?
|
||||
order_queue_printer.print_check_in_out(printer, cashier_terminal, check_booking, table)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user