Skip to content

Commit

Permalink
fix: CC Line date should be same as body date (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shwetabhk authored Nov 14, 2023
1 parent a48f20b commit 1999027
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/qbd/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ def create_credit_card_purchase_lineitems(
:return: None
"""
field_mappings: FieldMapping = FieldMapping.objects.get(workspace_id=workspace_id)
export_settings: ExportSettings = ExportSettings.objects.get(workspace_id=workspace_id)

lineitems = []
for expense in expenses:
Expand All @@ -515,7 +516,7 @@ def create_credit_card_purchase_lineitems(

lineitem = CreditCardPurchaseLineitem.objects.create(
transaction_type='CREDIT CARD' if expense.amount > 0 else 'CCARD REFUND',
date=expense.spent_at,
date=get_transaction_date(expenses, date_preference=export_settings.credit_card_expense_date),
account=expense.category,
name=project_name,
class_name=class_name,
Expand Down

0 comments on commit 1999027

Please sign in to comment.