mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 01:14:23 -05:00
Update qbo_item.rb
This commit is contained in:
@@ -26,9 +26,11 @@ class QboItem < ActiveRecord::Base
|
|||||||
query = "SELECT Id, Name FROM Item WHERE Type = 'Service' "
|
query = "SELECT Id, Name FROM Item WHERE Type = 'Service' "
|
||||||
query << " AND Metadata.LastUpdatedTime >= '#{last.iso8601}' " if last
|
query << " AND Metadata.LastUpdatedTime >= '#{last.iso8601}' " if last
|
||||||
|
|
||||||
items = get_base.service.query(query)
|
if count == 0
|
||||||
|
items = get_base.service.all
|
||||||
items = get_base.service.all if count == 0
|
else
|
||||||
|
items = get_base.service.query(query)
|
||||||
|
end
|
||||||
|
|
||||||
unless items.count = 0
|
unless items.count = 0
|
||||||
items.find_by(:type, "Service").each { |i|
|
items.find_by(:type, "Service").each { |i|
|
||||||
|
|||||||
Reference in New Issue
Block a user