Added QBO Sync to Issue and User views

This will allow the databases to automaticly "Refresh" with a simple
page refresh
This commit is contained in:
2016-01-09 09:27:58 -05:00
parent 9781ad39c1
commit ed66b7b7b4
3 changed files with 6 additions and 1 deletions

View File

@@ -15,6 +15,9 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener
def view_issues_form_details_bottom(context={}) def view_issues_form_details_bottom(context={})
selected = "" selected = ""
QboCustomers.update_all
QboItem.update_all
# 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_customer = context[:issue].qbo_customer_id selected_customer = context[:issue].qbo_customer_id

View File

@@ -14,6 +14,8 @@ class UsersShowHookListener < Redmine::Hook::ViewListener
def view_users_form(context={}) def view_users_form(context={})
selected = "" selected = ""
QboEmployee.update_all
# 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[:user].qbo_employee_id.nil? then if not context[:user].qbo_employee_id.nil? then
selected = context[:user].qbo_employee_id selected = context[:user].qbo_employee_id