diff --git a/app/controllers/qbo_controller.rb b/app/controllers/qbo_controller.rb index 9fe89e7..840b3e7 100644 --- a/app/controllers/qbo_controller.rb +++ b/app/controllers/qbo_controller.rb @@ -68,7 +68,7 @@ class QboController < ApplicationController if Qbo.exists? then QboCustomers.update_all QboItem.update_all - QboEmployee.update_all + QboEmployee.update_all end redirect_to qbo_path(:redmine_qbo), :flash => { :notice => "Successfully synced to Quickbooks" } diff --git a/lib/issues_form_hook_listener.rb b/lib/issues_form_hook_listener.rb index bc62070..a63d091 100644 --- a/lib/issues_form_hook_listener.rb +++ b/lib/issues_form_hook_listener.rb @@ -14,6 +14,9 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener # Show a dropdown for quickbooks contacts def view_issues_form_details_bottom(context={}) selected = "" + + QboCustomers.update_all + QboItem.update_all # Check to see if there is a quickbooks user attached to the issue if not context[:issue].qbo_customer_id.nil? then diff --git a/lib/users_show_hook_listener.rb b/lib/users_show_hook_listener.rb index 43edb42..042c3c5 100644 --- a/lib/users_show_hook_listener.rb +++ b/lib/users_show_hook_listener.rb @@ -13,6 +13,8 @@ class UsersShowHookListener < Redmine::Hook::ViewListener # View User def view_users_form(context={}) selected = "" + + QboEmployee.update_all # Check to see if there is a quickbooks user attached to the issue if not context[:user].qbo_employee_id.nil? then