mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
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:
@@ -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" }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user