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 accounting export summary generation script #487

Merged
merged 2 commits into from
Sep 21, 2023
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
4 changes: 2 additions & 2 deletions scripts/python/fill-accounting-export-summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
error_type = None
url = None
if task_log.status == 'FAILED' or task_log.status == 'FATAL':
error_type = 'ACCOUNTING_INTEGRATION_ERROR' if task_log.quickbooks_errors else 'MAPPING_ERROR'
error_type = 'ACCOUNTING_INTEGRATION_ERROR' if task_log.quickbooks_errors else 'MAPPING'
url = '{}/workspaces/main/dashboard'.format(settings.QBO_INTEGRATION_APP_URL)
else:
export_type, export_id = generate_export_type_and_id(expense_group)
Expand All @@ -59,7 +59,7 @@
export_type=export_type,
export_id=export_id
)
for expense in expense_group.expenses.all():
for expense in expense_group.expenses.filter(accounting_export_summary__state__isnull=True):
expense_to_be_updated.append(
Expense(
id=expense.id,
Expand Down
Loading