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(subscription): Fix generating invoice with pending downgrade #2581

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

vincent-pochet
Copy link
Collaborator

@vincent-pochet vincent-pochet commented Sep 12, 2024

Context

Invoice for subscription termination are stuck in a generating status when the subscription is attached to a next subscription with pending status.

NOTE: A terminated subscription should never be attached to a pending subscription, as next possible status should be either, active or canceled. The initial issue seems to be related to a race condition with multiple simultaneous upgrades and downgrades.

Description

This PR does not fixes the initial issue but it makes sure that the Subscriptions::DatesService#to_datetime cannot returns a date before the start date of the subscription

@vincent-pochet vincent-pochet force-pushed the fix-timezone-upgrade branch 3 times, most recently from 2350ffb to f1e9bc8 Compare September 16, 2024 13:26
@vincent-pochet vincent-pochet changed the title fix(subscription): Fix generating invoice with upgrade and timezone fix(subscription): Fix generating invoice with pending downgrade Sep 16, 2024
@vincent-pochet vincent-pochet force-pushed the fix-timezone-upgrade branch 2 times, most recently from 3575c8e to 2c86dce Compare September 16, 2024 13:41
@vincent-pochet vincent-pochet self-assigned this Sep 16, 2024
@vincent-pochet vincent-pochet added the 🐞 Bug Something isn't working label Sep 16, 2024
@vincent-pochet vincent-pochet merged commit 5c2e95b into main Sep 16, 2024
6 checks passed
@vincent-pochet vincent-pochet deleted the fix-timezone-upgrade branch September 16, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants