mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 10:30:36 -05:00
Update customer.rb
This commit is contained in:
1 parent
c72d375aea
commit
fd8ca2d44d
1 file changed
+4
@@ -105,6 +105,8 @@ class Customer < ActiveRecord::Base
|
||||
def self.sync
|
||||
last = Qbo.first.last_sync
|
||||
|
||||
background do
|
||||
|
||||
query = "Select Id, DisplayName From Customer"
|
||||
query << " Where Metadata.LastUpdatedTime >= '#{last.iso8601}' " if last
|
||||
query << " Order By DisplayName "
|
||||
@@ -121,6 +123,8 @@ class Customer < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# remove deleted customers
|
||||
#where.not(customers.map(&:id)).destroy_all
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user