diff --git a/src/routes/billingAccounts/get.js b/src/routes/billingAccounts/get.js index f5171f5e..76b75c4b 100644 --- a/src/routes/billingAccounts/get.js +++ b/src/routes/billingAccounts/get.js @@ -42,7 +42,7 @@ module.exports = [ } const { accessToken, instanceUrl } = await SalesforceService.authenticate(); // eslint-disable-next-line - const sql = `SELECT TopCoder_Billing_Account_Id__c, Mark_Up__c, Active__c from Topcoder_Billing_Account__c tba where TopCoder_Billing_Account_Id__c='${billingAccountId}'`; + const sql = `SELECT TopCoder_Billing_Account_Id__c, Mark_Up__c, Active__c, Start_Date__c, End_Date__c from Topcoder_Billing_Account__c tba where TopCoder_Billing_Account_Id__c='${billingAccountId}'`; req.log.debug(sql); const billingAccount = await SalesforceService.queryBillingAccount(sql, accessToken, instanceUrl, req.log); const isMachineToken = _.get(req, 'authUser.isMachine', false); diff --git a/src/services/salesforceService.js b/src/services/salesforceService.js index 183c7c9f..92890ad7 100644 --- a/src/services/salesforceService.js +++ b/src/services/salesforceService.js @@ -103,6 +103,8 @@ class SalesforceService { ), markup: _.get(o, config.get('sfdcBillingAccountMarkupField')), active: _.get(o, config.get('sfdcBillingAccountActiveField')), + startDate: _.get(o, 'Start_Date__c'), + endDate: _.get(o, 'End_Date__c'), })); return billingAccounts.length > 0 ? billingAccounts[0] : {}; });