Skip to content

fix(multientities): wrong document numbering #3602

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

Merged
merged 4 commits into from
May 14, 2025
Merged

Conversation

annvelents
Copy link
Contributor

@annvelents annvelents commented May 7, 2025

Context

When creating billing entity per organization, we generate it's document number prefix the same way as we generate it for org: first 3 letters of name + last 3 letters of id. That's why when we create a first billing_entity per organization, it inherits org's ID.
But at some point we were not populating the id of billing entity, as result generated document_number_prefix was different from the organization (the id part).
Later billing_entities ids were fixed to always match organizations, but we didn't fix the document_number_prefix (on US cluster there are 4 orgs with this issue, 0 on EU).
This PR finds these BEs and fixes them

Description

Find default billing_entities per organizations, where billing_entity.documnet_number_prefix != organization.document_number_prefix and fix them to have org's document_number_prefix

@annvelents annvelents self-assigned this May 7, 2025
Copy link
Contributor

@ancorcruz ancorcruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should work.

@annvelents annvelents force-pushed the fix/be_numbering_prefix branch from b7a309b to dccc29a Compare May 14, 2025 08:36
@annvelents annvelents force-pushed the fix/be_numbering_prefix branch from 9f1940b to dc53b9d Compare May 14, 2025 08:46
@annvelents annvelents merged commit 50aa6f1 into main May 14, 2025
14 checks passed
@annvelents annvelents deleted the fix/be_numbering_prefix branch May 14, 2025 08:52
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.

2 participants