diff --git a/lib/sf/account.rb b/lib/sf/account.rb index 693d972..741169a 100644 --- a/lib/sf/account.rb +++ b/lib/sf/account.rb @@ -89,13 +89,13 @@ def self.intl_partner?(account_id) # It looks up for the past one year def self.inc_parts_to_be - acct_ids = Sf::Opportunity.inc_participations(Date.today.prev_month(12)).map(&:AccountId) + acct_ids = Sf::Opportunity.inc_participations(Date.today.prev_month(2)).map(&:AccountId) accts_str = acct_ids.map{|v| "\'#{v}\'"}.join(', ') build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where InCommon_Participant__c != true and Id in (#{accts_str})") end def self.inc_certs_to_be - acct_ids = Sf::Opportunity.cert_subscribers(Date.today.prev_month(12)).map(&:AccountId) + acct_ids = Sf::Opportunity.cert_subscribers(Date.today.prev_month(2)).map(&:AccountId) accts_str = acct_ids.map{|v| "\'#{v}\'"}.join(', ') build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where InCommon_Participant__c = true and Id in (#{accts_str})") end