From 2060ae86f2983325326819ebee3a0a1db5772b11 Mon Sep 17 00:00:00 2001 From: Ashwin Thanaraj <37061471+ashwin1111@users.noreply.github.com> Date: Tue, 26 Nov 2024 19:46:34 +0530 Subject: [PATCH] feat: Trim memo and date in exports (#582) --- apps/sage_intacct/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/sage_intacct/models.py b/apps/sage_intacct/models.py index 75d9a188..a51df55f 100644 --- a/apps/sage_intacct/models.py +++ b/apps/sage_intacct/models.py @@ -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 @@ -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)