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

feat: handle invoice tax status pending #1937

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ansmonjol
Copy link
Collaborator

@ansmonjol ansmonjol commented Dec 24, 2024

⚠️ Wait for BE before merging this PR ⚠️

Context

When interacting with Anrok, jobs are handled asynchronously.
Now they can also be re-triggered after a fail, and enqueued so stuck in a "pending" state.

To represent that, we introduce new states on Invoice model

  • a new status: pending
  • a new attribute: taxStatus - that have value failed, pending and succeeded

Description

This PR makes sure the pending states are correctly represented and handled on our side:

  • show pending invoices in customer invoice list and "general" invoice list
  • only the "copy invoice id" action should be shown
  • show alerts in invoice overview for those new states
  • add new label for pending status badge

Please note we mostly rely on taxStatus to compute our logic, but invoice status should also be check almost in any cases.
This is more relevant as it's possible to have an invoice in this state:

  • status: draft
  • taxStatus: pending

Fixes LAGO-629

@ansmonjol ansmonjol added the 🛠 feature New feature or request label Dec 24, 2024
@ansmonjol ansmonjol self-assigned this Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants