Skip to content

Commit e716cfc

Browse files
authored
Merge pull request #731 from topcoder-platform/develop
Add billing account information for Work Manager
2 parents 9d7c4b2 + 94559c9 commit e716cfc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/routes/billingAccounts/get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = [
4242
}
4343
const { accessToken, instanceUrl } = await SalesforceService.authenticate();
4444
// eslint-disable-next-line
45-
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}'`;
45+
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}'`;
4646
req.log.debug(sql);
4747
const billingAccount = await SalesforceService.queryBillingAccount(sql, accessToken, instanceUrl, req.log);
4848
const isMachineToken = _.get(req, 'authUser.isMachine', false);

src/services/salesforceService.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ class SalesforceService {
103103
),
104104
markup: _.get(o, config.get('sfdcBillingAccountMarkupField')),
105105
active: _.get(o, config.get('sfdcBillingAccountActiveField')),
106+
startDate: _.get(o, 'Start_Date__c'),
107+
endDate: _.get(o, 'End_Date__c'),
106108
}));
107109
return billingAccounts.length > 0 ? billingAccounts[0] : {};
108110
});

0 commit comments

Comments
 (0)