Update issues_form_hook_listener.rb

This commit is contained in:
2016-08-10 22:42:43 -04:00
committed by GitHub
parent ad8d15203e
commit e5601030b1

View File

@@ -30,6 +30,7 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener
# Load customer information without callbacks # Load customer information without callbacks
customer = Customer.find_by_id(selected_customer) if selected_customer customer = Customer.find_by_id(selected_customer) if selected_customer
select_customer = f.select :customer_id, Customer.all.pluck(:name, :id).sort, :selected => selected_customer, include_blank: true select_customer = f.select :customer_id, Customer.all.pluck(:name, :id).sort, :selected => selected_customer, include_blank: true
select_customer = f.autocomplete_field :customer_id, autocomplete_customer_name_path, :update_elements => {:id => '#customer_id'}
# Generate the drop down list of quickbooks invoices # Generate the drop down list of quickbooks invoices
#select_invoice = f.select :qbo_invoice_id, QboInvoice.all.pluck(:doc_number, :id).sort! {|x, y| y <=> x}, :selected => selected_invoice, include_blank: true #select_invoice = f.select :qbo_invoice_id, QboInvoice.all.pluck(:doc_number, :id).sort! {|x, y| y <=> x}, :selected => selected_invoice, include_blank: true