merged with crm

This commit is contained in:
Yan
2017-06-08 19:04:48 +06:30
12 changed files with 163 additions and 98 deletions

View File

@@ -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

View File

@@ -27,3 +27,5 @@ class Origami::RequestBillsController < BaseOrigamiController
redirect_to origami_root_path
end
end