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
fd8ca2d44d
commit
181b928d19
1 file changed
+1
-5
@@ -105,10 +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 << " Where Metadata.LastUpdatedTime >= '#{last.iso8601}' " if last
|
||||
query << " Order By DisplayName "
|
||||
|
||||
customers = Qbo.get_base(:customer).service.query_in_batches(query, per_page: 100) do |batch|
|
||||
@@ -123,8 +121,6 @@ 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