check req bil
This commit is contained in:
@@ -45,22 +45,7 @@ class Api::BillController < Api::ApiController
|
||||
@sale_id = booking.sale_id
|
||||
@sale_data = Sale.find_by_sale_id(@sale_id)
|
||||
end
|
||||
|
||||
if 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)
|
||||
|
||||
if !printer.nil?
|
||||
order_queue_printer.print_check_in_out(printer, booking, table)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
elsif (params[:order_id])
|
||||
order = Order.find(params[:order_id])
|
||||
@sale = Sale.new
|
||||
@@ -75,6 +60,22 @@ class Api::BillController < Api::ApiController
|
||||
# @sale_data.shift_sale_id = shift_by_terminal.id
|
||||
# @sale_data.save
|
||||
|
||||
#check checkInOut pdf print
|
||||
check_booking = Booking.find_by_sale_id(@sale_id)
|
||||
checkout_time = Lookup.collection_of('checkout_time')
|
||||
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)
|
||||
|
||||
if !printer.nil?
|
||||
order_queue_printer.print_check_in_out(printer, check_booking, table)
|
||||
end
|
||||
end
|
||||
|
||||
Promotion.promo_activate(@sale)
|
||||
|
||||
#BillBroadcastJob.perform_later(table)
|
||||
|
||||
@@ -67,9 +67,10 @@ class Origami::RequestBillsController < ApplicationController
|
||||
result = {:status=> @status, :data => @sale.sale_id }
|
||||
render :json => result.to_json
|
||||
else
|
||||
|
||||
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||
|
||||
#check checkInOut pdf print
|
||||
check_booking = Booking.find_by_sale_id(@sale_id)
|
||||
checkout_time = Lookup.collection_of('checkout_time')
|
||||
if (!checkout_time.empty?) && (ENV["SERVER_MODE"] != "cloud") #no print in cloud server
|
||||
unique_code = "CheckInOutPdf"
|
||||
printer = PrintSetting.find_by_unique_code(unique_code)
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ class SalePayment < ApplicationRecord
|
||||
self.sale = invoice
|
||||
self.received_amount = cash_amount
|
||||
self.payment_reference = remark
|
||||
puts action_by
|
||||
puts "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
# puts action_by
|
||||
# puts "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
self.action_by = action_by
|
||||
#get all payment for this invoices
|
||||
if payment_for
|
||||
|
||||
Reference in New Issue
Block a user