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

@@ -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" }

View File

@@ -15,6 +15,9 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener
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
selected_customer = context[:issue].qbo_customer_id

View File

@@ -14,6 +14,8 @@ class UsersShowHookListener < Redmine::Hook::ViewListener
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
selected = context[:user].qbo_employee_id