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

fix missing type #195

Merged
merged 1 commit into from
Jun 14, 2024
Merged
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
3 changes: 2 additions & 1 deletion apps/accounting_exports/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


TYPE_CHOICES = (
('INVOICES', 'INVOICES'),
('PURCHASE_INVOICE', 'PURCHASE_INVOICE'),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the display name for 'PURCHASE_INVOICE' to match the convention used for other choices.

-    ('PURCHASE_INVOICE', 'PURCHASE_INVOICE'),
+    ('PURCHASE_INVOICE', 'Purchase Invoice'),

The display name for 'PURCHASE_INVOICE' should be more human-readable and consistent with other entries in TYPE_CHOICES, such as 'DIRECT_COST'.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
('PURCHASE_INVOICE', 'PURCHASE_INVOICE'),
('PURCHASE_INVOICE', 'Purchase Invoice'),

('DIRECT_COST', 'DIRECT_COST'),
('FETCHING_REIMBURSABLE_EXPENSES', 'FETCHING_REIMBURSABLE_EXPENSES'),
('FETCHING_CREDIT_CARD_EXPENENSES', 'FETCHING_CREDIT_CARD_EXPENENSES')
Expand Down Expand Up @@ -142,6 +142,7 @@ def create_accounting_export(expense_objects: List[Expense], fund_source: str, w

# Create an AccountingExport object for the expense group
accounting_export_instance = AccountingExport.objects.create(
type='PURCHASE_INVOICE',
workspace_id=workspace_id,
fund_source=accounting_export['fund_source'],
description=accounting_export,
Expand Down
Loading