From df94564d9b281d616d57e7bb6b2353e178b0fb78 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Wed, 10 Aug 2016 23:33:15 -0400 Subject: [PATCH] Update issues_form_hook_listener.rb --- lib/issues_form_hook_listener.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/issues_form_hook_listener.rb b/lib/issues_form_hook_listener.rb index 1ece6b3..fa336c5 100644 --- a/lib/issues_form_hook_listener.rb +++ b/lib/issues_form_hook_listener.rb @@ -23,17 +23,12 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener # Check to see if there is a quickbooks user attached to the issue selected_customer = context[:issue].customer ? context[:issue].customer.id : nil - #selected_invoice = context[:issue].qbo_invoice ? context[:issue].qbo_invoice.id : nil selected_estimate = context[:issue].qbo_estimate ? context[:issue].qbo_estimate.id : nil selected_vehicle = context[:issue].vehicles_id ? context[:issue].vehicles_id : nil # Load customer information without callbacks 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.autocomplete_field :customer_id, autocomplete_customer_name_issues_path, :display_value => :name - - # 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_customer = f.select :customer_id, Customer.all.pluck(:name, :id).sort, :selected => selected_customer, include_blank: true # Generate the drop down list of quickbooks extimates select_estimate = f.select :qbo_estimate_id, QboEstimate.all.pluck(:doc_number, :id).sort! {|x, y| y <=> x}, :selected => selected_estimate, include_blank: true