Skip to content

Commit

Permalink
Update expense redirect link (#70)
Browse files Browse the repository at this point in the history
* Update expense redirect link

* fix test
  • Loading branch information
ashwin1111 authored Jan 2, 2024
1 parent 25f58a5 commit cb6b432
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/qbd/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import List

from django.db import models
from django.conf import settings

from apps.fyle.models import Expense
from apps.tasks.models import AccountingExport
Expand Down Expand Up @@ -78,8 +79,8 @@ def get_expense_purpose(workspace_id: str, expense: Expense) -> str:
'purpose': '{0}'.format(expense.purpose) if expense.purpose else '',
'report_number': '{0}'.format(expense.claim_number),
'spent_on': '{0}'.format(expense.spent_at.date()) if expense.spent_at else '',
'expense_link': '{0}/app/main/#/enterprise/view_expense/{1}?org_id={2}'.format(
fyle_credentials.cluster_domain, expense.expense_id, org_id
'expense_link': '{0}/app/admin/#/view_expense/{1}/?org_id={2}'.format(
settings.FYLE_APP_URL, expense.expense_id, org_id
)
}

Expand Down
1 change: 1 addition & 0 deletions quickbooks_desktop_api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@


FYLE_BASE_URL = os.environ.get('FYLE_BASE_URL')
FYLE_APP_URL = os.environ.get('FYLE_APP_URL')
FYLE_TOKEN_URI = os.environ.get('FYLE_TOKEN_URI')
FYLE_CLIENT_ID = os.environ.get('FYLE_CLIENT_ID')
FYLE_CLIENT_SECRET = os.environ.get('FYLE_CLIENT_SECRET')
Expand Down
1 change: 1 addition & 0 deletions quickbooks_desktop_api/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@


FYLE_BASE_URL = os.environ.get('FYLE_BASE_URL')
FYLE_APP_URL = os.environ.get('FYLE_APP_URL')
FYLE_TOKEN_URI = os.environ.get('FYLE_TOKEN_URI')
FYLE_CLIENT_ID = os.environ.get('FYLE_CLIENT_ID')
FYLE_CLIENT_SECRET = os.environ.get('FYLE_CLIENT_SECRET')
Expand Down

0 comments on commit cb6b432

Please sign in to comment.