Skip to content

Commit

Permalink
feat: Trim memo and date in exports (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 committed Nov 26, 2024
1 parent f1cfdbc commit 2060ae8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/sage_intacct/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def get_memo(expense_group: ExpenseGroup,
return memo

expense_fund_source = 'Reimbursable expense' if expense_group.fund_source == 'PERSONAL' \
else 'Corporate Credit Card expense'
else 'Corporate Card expense'
unique_number = None
count = 0

Expand Down Expand Up @@ -402,12 +402,12 @@ def get_memo(expense_group: ExpenseGroup,
workspace_id=expense_group.workspace_id
)
if expense_group.fund_source == 'CCC':
if expense_group_settings.ccc_export_date_type != 'current_date':
if expense_group_settings.ccc_export_date_type not in ('current_date', 'last_spent_at'):
date = get_transaction_date(expense_group)
date = (datetime.strptime(date, '%Y-%m-%dT%H:%M:%S')).strftime('%d/%m/%Y')
memo = '{} - {}'.format(memo, date)
else:
if expense_group_settings.reimbursable_export_date_type != 'current_date':
if expense_group_settings.reimbursable_export_date_type not in ('current_date', 'last_spent_at'):
date = get_transaction_date(expense_group)
date = (datetime.strptime(date, '%Y-%m-%dT%H:%M:%S')).strftime('%d/%m/%Y')
memo = '{} - {}'.format(memo, date)
Expand Down

0 comments on commit 2060ae8

Please sign in to comment.