Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update expense redirect link #70

Merged
merged 2 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading