Skip to content

Commit

Permalink
Allowing only credit card accounts for C1 (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shwetabhk authored May 23, 2024
1 parent 28d6332 commit 290ea03
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/qa_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
environment: QA
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: push to dockerhub
uses: fylein/docker-release-action@master
env:
Expand Down
32 changes: 22 additions & 10 deletions apps/netsuite/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,28 @@ def sync_accounts(self):
'active': not account['isInactive']
})

attributes['credit_card_account'].append({
'attribute_type': 'CREDIT_CARD_ACCOUNT',
'display_name': 'Credit Card Account',
'value': account['acctName'],
'destination_id': account['internalId'],
'detail': {
'account_type': account['acctType']
},
'active': not account['isInactive']
})
if settings.BRAND_ID == 'fyle':
attributes['credit_card_account'].append({
'attribute_type': 'CREDIT_CARD_ACCOUNT',
'display_name': 'Credit Card Account',
'value': account['acctName'],
'destination_id': account['internalId'],
'detail': {
'account_type': account['acctType']
},
'active': not account['isInactive']
})
elif account['acctType'] == '_creditCard':
attributes['credit_card_account'].append({
'attribute_type': 'CREDIT_CARD_ACCOUNT',
'display_name': 'Credit Card Account',
'value': account['acctName'],
'destination_id': account['internalId'],
'detail': {
'account_type': account['acctType']
},
'active': not account['isInactive']
})

if account['acctType'] == '_accountsPayable':
attributes['accounts_payable'].append({
Expand Down

0 comments on commit 290ea03

Please sign in to comment.