-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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: Force Fetching updates on Subscriptions #42221
fix: Force Fetching updates on Subscriptions #42221
Conversation
a8b392d
to
e63d2bd
Compare
I would love to see this merged! |
Backgroud Job
This behavior is unwanted and was the reason for the original refactor in #30963 Maybe a different approach is required. |
edae6e4
to
1ef890d
Compare
A new action button |
…-42221 fix: Force Fetching updates on Subscriptions (backport #42221)
…-42221 fix: Force Fetching updates on Subscriptions (backport #42221)
some how the price of the resulting invoices is higher/lower than it should be, depending on the distance of the subscription period to the current date. A strange margin is added. Start Date: 16th June Create 2 Invoices with new force action |
Issue
Post this refactor,
Fetch Subscription Updates
creates Invoices only if the Current Invoice Start / End date matches the current date. For old subscriptions, this also resets these values to the current periods' start and end dates without creating any pending invoices.Consider the below subscription,
and current date is 2nd March
When 'Fetch Subscription Updates' is triggered,
Current behavior:
No Invoices are created for Jan and Feb and
current_invoice_start
andcurrent_invoice_end
date are updated to the latest month - MarchExpected behavior:
Invoice for January should be created and the
current_invoice_start
andcurrent_invoice_end
should be updated to February. Upon triggering 'Fetch Subscription Updated' again, the same should happen for February. Triggering it again, should not create any invoices as the current period - March, is not over.Fix
Adding a new Action button
Force-Fetch Subscription Updates
. This will have the expected behavior stated above, without allowing the scheduled job to create invoices for old subscriptions on its own.Internal Ref: 13453