Added sync functionality to Item and Employee

This commit is contained in:
2016-01-07 15:52:52 -05:00
parent fa230a400e
commit c666f41d68
4 changed files with 34 additions and 2 deletions

View File

@@ -16,6 +16,8 @@ class QboController < ApplicationController
#
def index
@qbo_customer_count = QboCustomers.count
@qbo_item_count = QboItem.count
@qbo_employee_count = QboEmployee.count
end
#
@@ -61,6 +63,8 @@ class QboController < ApplicationController
def sync
if Qbo.exists? then
QboCustomers.update_all
QboItem.update_all
QboEmployee.update_all
end
redirect_to qbo_path(:redmine_qbo), :flash => { :notice => "Successfully synced to Quickbooks" }