mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Fixed Customer Selection box while
The previously saved customer is now selected in the drop down box when editing an issue
This commit is contained in:
@@ -17,11 +17,11 @@ class QboHookListener < Redmine::Hook::ViewListener
|
|||||||
|
|
||||||
# Check to see if there is a quickbooks user attached to the issue
|
# Check to see if there is a quickbooks user attached to the issue
|
||||||
if not context[:issue].qbo_customer_id.nil? then
|
if not context[:issue].qbo_customer_id.nil? then
|
||||||
selected = QboCustomers.find_by_id(context[:issue].qbo_customer_id).name
|
selected = context[:issue].qbo_customer_id
|
||||||
end
|
end
|
||||||
|
|
||||||
# Generate the drop down list of quickbooks contacts
|
# Generate the drop down list of quickbooks contacts
|
||||||
select = context[:form].select :qbo_customer_id, QboCustomers.all.pluck(:name, :id), include_blank: true, selected: selected
|
select = context[:form].select :qbo_customer_id, QboCustomers.all.pluck(:name, :id), :selected => selected, include_blank: true
|
||||||
return "<p>#{select}</p>"
|
return "<p>#{select}</p>"
|
||||||
|
|
||||||
#TODO save selection to Issues.qbp_customer_id
|
#TODO save selection to Issues.qbp_customer_id
|
||||||
|
|||||||
Reference in New Issue
Block a user