-
Notifications
You must be signed in to change notification settings - Fork 100
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(fees): Invoice non-invoiceable fees at the end of the period #2171
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julienbourdeau
force-pushed
the
feat-regroup-fees
branch
5 times, most recently
from
June 19, 2024 08:51
a9ff010
to
de6b963
Compare
brunomiguelpinto
force-pushed
the
feat-fees-part-1
branch
from
June 20, 2024 12:03
277ab2c
to
adab3aa
Compare
julienbourdeau
force-pushed
the
feat-fees-part-1
branch
from
June 20, 2024 12:48
f7e081d
to
77e4692
Compare
julienbourdeau
added a commit
that referenced
this pull request
Jun 24, 2024
…o invoice yet (#2197) ## Description When [non-invoiceable fees were introduced](#1069), we only allowed change of `payment_status` if the fee was attached to a non-invoiceable charge. What we really meant is _"the fee is standalone, not attached to an invoice"_. Now we're working on attaching the non-invoiceable fees to an invoice at the end of the period. See #2171 I'm changing the condition so the fee can be updated, only if it's not attached to any invoice yet.
julienbourdeau
force-pushed
the
feat-fees-part-1
branch
from
June 24, 2024 08:26
1cb401e
to
b71a084
Compare
julienbourdeau
force-pushed
the
feat-regroup-fees
branch
from
June 24, 2024 08:52
de6b963
to
f84b777
Compare
julienbourdeau
changed the title
feat(fees): Regroup non-invoiceable fees into invoices at the end of the period
feat(fees): Invoice non-invoiceable fees at the end of the period
Jun 24, 2024
julienbourdeau
force-pushed
the
feat-regroup-fees
branch
from
June 24, 2024 14:03
f397d9d
to
787b469
Compare
julienbourdeau
force-pushed
the
feat-regroup-fees
branch
from
June 26, 2024 08:00
787b469
to
ee07820
Compare
julienbourdeau
force-pushed
the
feat-regroup-fees
branch
2 times, most recently
from
June 27, 2024 08:46
9b298c0
to
1d3474d
Compare
julienbourdeau
force-pushed
the
feat-regroup-fees
branch
from
June 27, 2024 09:03
1d3474d
to
08f20aa
Compare
brunomiguelpinto
force-pushed
the
feat-regroup-fees
branch
2 times, most recently
from
June 28, 2024 14:02
5af195f
to
107e52f
Compare
julienbourdeau
force-pushed
the
feat-regroup-fees
branch
from
July 1, 2024 11:39
107e52f
to
73fc8a1
Compare
brunomiguelpinto
force-pushed
the
feat-regroup-fees
branch
from
July 3, 2024 09:12
f52a5e9
to
058cbf0
Compare
brunomiguelpinto
approved these changes
Jul 3, 2024
julienbourdeau
added a commit
that referenced
this pull request
Jul 4, 2024
## Context When your charge is pay in advance but not invoiceable, the fees are created but not attached to any invoice. This adds an options so at the end of the period, you get a new invoice showing all PAID fees. unpaid fees are ignored. See also #2171 ## Description We're dropping the idea of `invoice_strategy` because it turned out to be a bad idea. Instead we're adding `regroup_paid_fees` attribute that takes only one value today `invoice`.
ancorcruz
pushed a commit
that referenced
this pull request
Jul 7, 2024
) ## Overview This pull request introduces a new feature to handle fees paid in advance that are not invoiceable. The goal is to provide clear visibility for end users on what they have paid during a specific billing period and to ensure all such fees are grouped into invoices at the end of each billing period. ## Changes Introduced > > The code in this PR is currently commented out because we are planning to merge another PR that will allow this code to be toggled based on a setting. Once the subsequent PR is merged, this code will be enabled accordingly. Feel free to adjust the wording to better fit your style or to provide additional context if necessary. - **New Job Implementation**: Introduced `BillNonInvoiceableFeesJob` to handle the periodic billing of non-invoiceable fees, ensuring they are invoiced at the end of each billing period. - **New Invoice Type**: Added a new invoice type `advance_charges` to categorize and manage the fees paid in advance that were previously not included in invoices. - **Service for Advance Charges**: Created `Invoices::AdvanceChargesService` to generate invoices for non-invoiceable fees, ensuring all relevant fees within the billing period are grouped and included. - **Integration in Billing Workflows**: Integrated the new job and service into existing billing workflows within `Subscriptions::BillingService`, `Subscriptions::CreateService`, and `Subscriptions::TerminateService` to ensure seamless operation and timely invoicing. ## New Invoice template ![CleanShot 2024-06-27 at 11 13 56@2x](https://github.com/getlago/lago-api/assets/1525636/dd14317d-ced2-4e46-8c2e-47a853bf75e9) --------- Co-authored-by: Miguel Pinto <darkymiguel@gmail.com>
ancorcruz
pushed a commit
that referenced
this pull request
Jul 7, 2024
When your charge is pay in advance but not invoiceable, the fees are created but not attached to any invoice. This adds an options so at the end of the period, you get a new invoice showing all PAID fees. unpaid fees are ignored. See also #2171 We're dropping the idea of `invoice_strategy` because it turned out to be a bad idea. Instead we're adding `regroup_paid_fees` attribute that takes only one value today `invoice`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This pull request introduces a new feature to handle fees paid in advance that are not invoiceable. The goal is to provide clear visibility for end users on what they have paid during a specific billing period and to ensure all such fees are grouped into invoices at the end of each billing period.
Changes Introduced
Feel free to adjust the wording to better fit your style or to provide additional context if necessary.
BillNonInvoiceableFeesJob
to handle the periodic billing of non-invoiceable fees, ensuring they are invoiced at the end of each billing period.advance_charges
to categorize and manage the fees paid in advance that were previously not included in invoices.Invoices::AdvanceChargesService
to generate invoices for non-invoiceable fees, ensuring all relevant fees within the billing period are grouped and included.Subscriptions::BillingService
,Subscriptions::CreateService
, andSubscriptions::TerminateService
to ensure seamless operation and timely invoicing.New Invoice template