finished customer to sale assign in crm
This commit is contained in:
@@ -10,17 +10,31 @@ class Crm::HomeController < BaseCrmController
|
||||
end
|
||||
|
||||
#print for crm
|
||||
def print
|
||||
def print_order
|
||||
|
||||
@booking = Booking.find(params[:id])
|
||||
|
||||
unique_code="CrmOrderPdf"
|
||||
|
||||
#print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||
|
||||
printer = Printer::ReceiptPrinter.new()
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
|
||||
printer.print_crm_order(@booking)
|
||||
printer.print_crm_order(@booking,print_settings)
|
||||
|
||||
end
|
||||
|
||||
def update_sale_by_customer
|
||||
|
||||
sale = Sale.find(params[:sale_id])
|
||||
status = sale.update_attributes(customer_id: params[:customer_id])
|
||||
|
||||
if status == true
|
||||
render json: JSON.generate({:status => true})
|
||||
else
|
||||
render json: JSON.generate({:status => false, :error_message => "Record not found"})
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user