calculate induties in bill
This commit is contained in:
@@ -35,7 +35,7 @@ class Origami::HomeController < BaseOrigamiController
|
||||
@payment_methods = PaymentMethodSetting.all
|
||||
@dining_booking = @dining.bookings.active.where("DATE_FORMAT(created_at,'%Y-%m-%d') = '#{DateTime.now.strftime('%Y-%m-%d')}' OR DATE_FORMAT(created_at,'%Y-%m-%d') = '#{Date.today.prev_day}' ")
|
||||
#@dining_booking = @dining.bookings.active.where("created_at between '#{DateTime.now.utc - 12.hours}' and '#{DateTime.now.utc}'")
|
||||
@order_items = Array.new
|
||||
@order_items = Array.new
|
||||
@dining_booking.each do |booking|
|
||||
if booking.sale_id.nil? && booking.booking_status != 'moved'
|
||||
@order_items = Array.new
|
||||
@@ -144,6 +144,7 @@ class Origami::HomeController < BaseOrigamiController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def check_emp_access_code
|
||||
|
||||
@@ -28,7 +28,7 @@ class Origami::RequestBillsController < ApplicationController
|
||||
|
||||
if check_booking.sale_id.nil?
|
||||
# Create Sale if it doesn't exist
|
||||
@status, @sale_id = @sale.generate_invoice_from_booking(check_booking.id,current_login_employee, current_user, order.source)
|
||||
@status, @sale_id = @sale.generate_invoice_from_booking(check_booking.id,current_login_employee, current_user, order.source, params[:current_checkin_induties_count])
|
||||
@sale_data = Sale.find_by_sale_id(@sale_id)
|
||||
@sale_items = SaleItem.where("sale_id=?",@sale_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user