From abca371eb3e6b27c2285a6f43f70aadc5e948eee Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Thu, 11 Mar 2021 20:39:32 +0530 Subject: [PATCH] fix: git#636-Need details of billing account for the project for the purpose of invoicing Fixed case sensitive naming of fields between dev and prod SFDC --- config/development.json | 3 ++- config/production.json | 3 ++- src/services/salesforceService.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/development.json b/config/development.json index 2730c285..621fcff6 100644 --- a/config/development.json +++ b/config/development.json @@ -8,5 +8,6 @@ "memberServiceEndpoint": "https://api.topcoder-dev.com/v3/members", "identityServiceEndpoint": "https://api.topcoder-dev.com/v3/", "taasJobApiUrl": "https://api.topcoder-dev.com/v5/jobs", - "sfdcBillingAccountNameField": "Billing_Account_Name__c" + "sfdcBillingAccountNameField": "Billing_Account_Name__c", + "sfdcBillingAccountMarkupField": "Mark_Up__c" } diff --git a/config/production.json b/config/production.json index a800ab45..0baf3b1a 100644 --- a/config/production.json +++ b/config/production.json @@ -1,5 +1,6 @@ { "authDomain": "topcoder.com", "connectProjectsUrl": "https://connect.topcoder.com/projects/", - "sfdcBillingAccountNameField": "Billing_Account_name__c" + "sfdcBillingAccountNameField": "Billing_Account_name__c", + "sfdcBillingAccountMarkupField": "Mark_up__c" } diff --git a/src/services/salesforceService.js b/src/services/salesforceService.js index 2ddd65af..022916dc 100644 --- a/src/services/salesforceService.js +++ b/src/services/salesforceService.js @@ -101,7 +101,7 @@ class SalesforceService { 10, null, // fallback to null if cannot parse ), - markup: _.get(o, 'Mark_Up__c'), + markup: _.get(o, config.get('sfdcBillingAccountMarkupField')), })); return billingAccounts.length > 0 ? billingAccounts[0] : {}; });