Skip to content

Commit

Permalink
Fix: Bill Memo (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruuushhh authored Dec 18, 2023
1 parent d27cfea commit c1ecf90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/sage_intacct/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,13 @@ def get_memo(expense_group: ExpenseGroup,
return memo.replace('\'', '')
else:
# Safety addition
return 'Reimbursable expenses by {0}'.format(expense_group.description.get('employee_email')) \
memo = 'Reimbursable expenses by {0}'.format(expense_group.description.get('employee_email')) \
if expense_group.fund_source == 'PERSONAL' \
else 'Credit card expenses by {0}'.format(expense_group.description.get('employee_email'))
count = ExportTable.objects.filter(memo__contains=memo, expense_group__workspace_id=workspace_id).count()
if count > 0:
memo = '{} - {}'.format(memo, count)
return memo


def get_expense_purpose(workspace_id, lineitem: Expense, category: str, configuration: Configuration) -> str:
Expand Down

0 comments on commit c1ecf90

Please sign in to comment.