update print
This commit is contained in:
@@ -13,6 +13,20 @@ 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"
|
||||
|
||||
@@ -20,7 +34,7 @@ class Crm::HomeController < BaseCrmController
|
||||
|
||||
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