Skip to content

Commit

Permalink
Mark export state before loading attachments (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 authored Oct 4, 2023
1 parent f7c44dd commit 5e3ef20
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions apps/quickbooks_online/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ def create_bill(expense_group, task_log_id, last_export: bool):

resolve_errors_for_exported_expense_group(expense_group)

load_attachments(qbo_connection, created_bill['Bill']['Id'], 'Bill', expense_group)

generate_export_url_and_update_expense(expense_group)

load_attachments(qbo_connection, created_bill['Bill']['Id'], 'Bill', expense_group)

if last_export:
update_last_export_details(expense_group.workspace_id)

Expand Down Expand Up @@ -378,10 +378,10 @@ def create_cheque(expense_group, task_log_id, last_export: bool):

resolve_errors_for_exported_expense_group(expense_group)

load_attachments(qbo_connection, created_cheque['Purchase']['Id'], 'Purchase', expense_group)

generate_export_url_and_update_expense(expense_group)

load_attachments(qbo_connection, created_cheque['Purchase']['Id'], 'Purchase', expense_group)

if last_export:
update_last_export_details(expense_group.workspace_id)

Expand Down Expand Up @@ -431,10 +431,10 @@ def create_qbo_expense(expense_group, task_log_id, last_export: bool):

resolve_errors_for_exported_expense_group(expense_group)

load_attachments(qbo_connection, created_qbo_expense['Purchase']['Id'], 'Purchase', expense_group)

generate_export_url_and_update_expense(expense_group)

load_attachments(qbo_connection, created_qbo_expense['Purchase']['Id'], 'Purchase', expense_group)

if last_export:
update_last_export_details(expense_group.workspace_id)

Expand Down Expand Up @@ -483,10 +483,10 @@ def create_credit_card_purchase(expense_group: ExpenseGroup, task_log_id, last_e

resolve_errors_for_exported_expense_group(expense_group)

load_attachments(qbo_connection, created_credit_card_purchase['Purchase']['Id'], 'Purchase', expense_group)

generate_export_url_and_update_expense(expense_group)

load_attachments(qbo_connection, created_credit_card_purchase['Purchase']['Id'], 'Purchase', expense_group)

if last_export:
update_last_export_details(expense_group.workspace_id)

Expand Down Expand Up @@ -533,10 +533,10 @@ def create_journal_entry(expense_group, task_log_id, last_export: bool):

resolve_errors_for_exported_expense_group(expense_group)

load_attachments(qbo_connection, created_journal_entry['JournalEntry']['Id'], 'JournalEntry', expense_group)

generate_export_url_and_update_expense(expense_group)

load_attachments(qbo_connection, created_journal_entry['JournalEntry']['Id'], 'JournalEntry', expense_group)

if last_export:
update_last_export_details(expense_group.workspace_id)

Expand Down

0 comments on commit 5e3ef20

Please sign in to comment.