Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into loyalty
This commit is contained in:
@@ -13,13 +13,28 @@ class Crm::HomeController < BaseCrmController
|
||||
def print_order
|
||||
|
||||
@booking = Booking.find(params[:id])
|
||||
|
||||
@total_amount = 0.00
|
||||
@total_tax = 0.00
|
||||
|
||||
if @booking.booking_orders
|
||||
order_items = []
|
||||
@booking.booking_orders.each do |bo|
|
||||
order = Order.find(bo.order_id)
|
||||
#if (order.status == "new")
|
||||
order_items = order_items + order.order_items
|
||||
#end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
unique_code="CrmOrderPdf"
|
||||
|
||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
|
||||
printer.print_crm_order(@booking,print_settings)
|
||||
printer.print_crm_order(@booking,order_items,print_settings)
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user