Update issues_form_hook_listener.rb

This commit is contained in:
2016-05-12 09:34:38 -04:00
parent 402f6f1097
commit 9838b831ec

View File

@@ -24,9 +24,9 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener
vehicle = context[:issue].vehicles_id
# Generate the drop down list of quickbooks customers
Customer.without_callback(:initialize, :after, :pull) do |c|
customer = c.find_by_id(selected_customer) if selected_customer
select_customer = f.select :customer_id, c.all.pluck(:name, :id).sort, :selected => selected_customer, include_blank: true
Customer.without_callback(:initialize, :after, :pull) do
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
end
# Generate the drop down list of quickbooks items