diff --git a/lib/hooks/issues_form_hook_listener.rb b/lib/hooks/issues_form_hook_listener.rb index 40bcc31..ae59ecd 100644 --- a/lib/hooks/issues_form_hook_listener.rb +++ b/lib/hooks/issues_form_hook_listener.rb @@ -39,7 +39,7 @@ module Hooks # Generate the drop down list of quickbooks estimates owned by the selected customer select_estimate = f.select :estimate_id, issue.customer ? issue.customer.estimates.pluck(:doc_number, :id).sort! {|x, y| y <=> x} : [], - selected: issue.estimate, + selected: issue.estimate ? issue.estimate.id : nil, include_blank: true # Pass all prebuilt form components to our partial