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: generate invoice for overdraft credits #796

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

kushsharma
Copy link
Member

@kushsharma kushsharma commented Oct 20, 2024

It's necessary to configure the product name to calculate per unit price before the overdraft credits can be invoiced in billing.customer.credit_overdraft_product. If not set, invoice reconcilation and creation is skipped.

If there is already an invoice for overdraft credits for same time range, no new invoice will be created for that customer. Currently the system generates them on the first day of the month.
Reconciliation of these invoice happens on same cadence as invoices gets synced from the billing provider.

Copy link

vercel bot commented Oct 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontier ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 7:05am

@coveralls
Copy link

coveralls commented Oct 20, 2024

Pull Request Test Coverage Report for Build 12154689030

Details

  • 37 of 518 (7.14%) changed or added relevant lines in 13 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.4%) to 30.423%

Changes Missing Coverage Covered Lines Changed/Added Lines %
billing/usage/service.go 0 1 0.0%
cmd/serve.go 0 2 0.0%
billing/credit/credit.go 0 3 0.0%
billing/credit/service.go 0 3 0.0%
pkg/server/interceptors/authorization.go 0 3 0.0%
billing/invoice/invoice.go 0 6 0.0%
internal/api/v1beta1/billing_invoice.go 0 7 0.0%
pkg/utils/pointers.go 0 8 0.0%
pkg/db/db.go 24 41 58.54%
internal/store/postgres/billing_invoice_repository.go 0 32 0.0%
Files with Coverage Reduction New Missed Lines %
billing/invoice/service.go 5 1.36%
Totals Coverage Status
Change from base Build 12153549585: -0.4%
Covered Lines: 7667
Relevant Lines: 25201

💛 - Coveralls

@kushsharma kushsharma marked this pull request as ready for review November 11, 2024 04:34
It's necessary to configure the product name to calculate
per unit price before the overdraft credits can be invoiced
in `billing.customer.credit_overdraft_product`.
If not set, invoice reconcilation and creation is skipped.

If there is already an invoice for overdraft credits for same
time range, no new invoice will be created for that customer.
Currently the system generates them on the first day of the month.
When the overdraft invoice is created for the first time, it
accounts for transactions from the start of customer life but
then moving forward only accounts from the last month time
range.

Reconcilation of these invoice happens on same cadence as
invoices gets synced from the billing provider.

Signed-off-by: Kush Sharma <[email protected]>
@kushsharma kushsharma merged commit d4b1a43 into main Dec 4, 2024
7 checks passed
@kushsharma kushsharma deleted the token-invoice branch December 4, 2024 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants