mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Only pull QBO Service Items & Auto sync QBO Items
This commit is contained in:
@@ -19,7 +19,7 @@ class QboItem < ActiveRecord::Base
|
|||||||
service = Quickbooks::Service::Item.new(:company_id => qbo.realmId, :access_token => Qbo.get_auth_token)
|
service = Quickbooks::Service::Item.new(:company_id => qbo.realmId, :access_token => Qbo.get_auth_token)
|
||||||
|
|
||||||
# Update the item table
|
# Update the item table
|
||||||
service.all.each { |item|
|
service.find_by(:type, "Service").each { |item|
|
||||||
qbo_item = QboItem.find_or_create_by(id: item.id)
|
qbo_item = QboItem.find_or_create_by(id: item.id)
|
||||||
qbo_item.name = item.name
|
qbo_item.name = item.name
|
||||||
qbo_item.id = item.id
|
qbo_item.id = item.id
|
||||||
|
|||||||
@@ -40,4 +40,3 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||||||
<br/>
|
<br/>
|
||||||
<%= link_to "Sync", qbo_sync_path %>
|
<%= link_to "Sync", qbo_sync_path %>
|
||||||
</body>
|
</body>
|
||||||
t
|
|
||||||
@@ -16,7 +16,7 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener
|
|||||||
selected = ""
|
selected = ""
|
||||||
|
|
||||||
QboCustomers.update_all
|
QboCustomers.update_all
|
||||||
#QboItem.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
|
||||||
|
|||||||
Reference in New Issue
Block a user