Skip to content

Feature/ifmc 997 exclude existing business cert subscribers #3

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/sf/opportunity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down