Merge branch 'r-1902001-01' into foodcourt
This commit is contained in:
@@ -31,47 +31,40 @@ class Origami::HomeController < BaseOrigamiController
|
||||
|
||||
@status_order = ""
|
||||
@status_sale = ""
|
||||
@sale_array = Array.new
|
||||
|
||||
@shop = current_shop
|
||||
@membership = MembershipSetting::MembershipSetting
|
||||
@payment_methods = PaymentMethodSetting.all
|
||||
|
||||
@order_items = Array.new
|
||||
@dining.current_bookings.each do |booking|
|
||||
if @obj_sale || @booking.blank?
|
||||
@booking = booking
|
||||
end
|
||||
@sale_array = @dining.current_sales
|
||||
if (booking = @dining.current_checkin_booking)
|
||||
@booking = booking
|
||||
@order_items = booking.order_items
|
||||
@obj_order = booking.orders.first
|
||||
end
|
||||
|
||||
if booking.sale_id
|
||||
@sale_array.push(booking.sale)
|
||||
if (booking = @dining.current_checkout_booking)
|
||||
@booking = booking
|
||||
@obj_sale = booking.sale
|
||||
@sale_taxes = @obj_sale.sale_taxes
|
||||
@status_sale = 'sale'
|
||||
end
|
||||
|
||||
if @obj_sale.blank?
|
||||
@obj_sale = booking.sale
|
||||
@sale_taxes = @obj_sale.sale_taxes
|
||||
@status_sale = 'sale'
|
||||
end
|
||||
else
|
||||
@order_items += booking.order_items
|
||||
@obj_order = booking.orders.first
|
||||
if @obj_sale || @customer.blank?
|
||||
if obj = @obj_sale || @obj_order
|
||||
@customer = obj.customer
|
||||
@date = obj.created_at
|
||||
end
|
||||
end
|
||||
|
||||
if @obj_sale || @customer.blank?
|
||||
if obj = @obj_sale || @obj_order
|
||||
@customer = obj.customer
|
||||
@date = obj.created_at
|
||||
end
|
||||
end
|
||||
if @obj_sale
|
||||
@status_order = 'sale'
|
||||
elsif @obj_order
|
||||
@status_order = 'order'
|
||||
end
|
||||
|
||||
if @obj_sale
|
||||
@status_order = 'sale'
|
||||
else
|
||||
@status_order = 'order'
|
||||
end
|
||||
|
||||
if (@obj_sale || @account_arr.blank?) && @customer
|
||||
@account_arr = TaxProfile.find_by(id: @customer.tax_profiles)
|
||||
end
|
||||
if (@obj_sale || @account_arr.blank?) && @customer
|
||||
@account_arr = TaxProfile.find_by(id: @customer.tax_profiles)
|
||||
end
|
||||
|
||||
#for bank integration
|
||||
|
||||
@@ -610,7 +610,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
end
|
||||
|
||||
# get printer info
|
||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
# print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
printer.print_receipt_pdf(filename,receipt_no,print_settings.print_copies,printer_name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user