Add MoveTablePdf and FOC update error
This commit is contained in:
@@ -62,9 +62,19 @@ class Origami::MovetableController < BaseOrigamiController
|
||||
bookings = Booking.where('dining_facility_id=?',change_from)
|
||||
|
||||
booking_array = Array.new
|
||||
bookings.each do | booking |
|
||||
if booking.sale_id.nil? && booking.booking_status != 'moved'
|
||||
booking_array.push(booking)
|
||||
order_items = Array.new
|
||||
if !bookings.nil?
|
||||
bookings.each do | booking |
|
||||
if booking.sale_id.nil? && booking.booking_status != 'moved'
|
||||
booking_array.push(booking)
|
||||
end
|
||||
|
||||
booking.booking_orders.each do |booking_order|
|
||||
order = Order.find(booking_order.order_id)
|
||||
order.order_items.each do |order_item|
|
||||
order_items.push(order_item)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -82,12 +92,13 @@ class Origami::MovetableController < BaseOrigamiController
|
||||
#print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
printer_array = []
|
||||
printer_array = PrintSetting.where(:unique_code => unique_code)
|
||||
|
||||
for i in 0..pdf_no
|
||||
if i != pdf_no
|
||||
print_settings = printer_array[i]
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
printer.print_move_table(print_settings,@to,@from ,@shop,@date,@type,@moved_by)
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
printer.print_move_table(print_settings,@to,@from ,@shop,@date,@type,@moved_by,order_items)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user