diff --git a/lib/sf/opportunity.rb b/lib/sf/opportunity.rb index 30e8901..5221063 100644 --- a/lib/sf/opportunity.rb +++ b/lib/sf/opportunity.rb @@ -35,7 +35,7 @@ def self.inc_participations(since_date=nil) def self.cert_subscribers(since_date=nil) since_date ||=Date.today since = since_date.to_date.to_s - sobjects = Sf.client.query("select #{FIELDS_SELECT_STR} from Opportunity where Name like '%Certificate Service%' and Type not like '%Existing Business%' and IsWon = true and CloseDate >= #{since}") + sobjects = Sf.client.query("select #{FIELDS_SELECT_STR} from Opportunity where Name like '%Certificate Service%' and not Type like '%Existing Business%' and IsWon = true and CloseDate >= #{since}") build_collection sobjects unless sobjects.blank? end