-
Notifications
You must be signed in to change notification settings - Fork 112
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
Poc multientities - 1 #3130
base: main
Are you sure you want to change the base?
Poc multientities - 1 #3130
Conversation
ece1f15
to
f665cbc
Compare
@@ -18,7 +18,7 @@ class Create < BaseMutation | |||
def resolve(**args) | |||
result = ::Customers::CreateService | |||
.new(context[:current_user]) | |||
.create(**args.merge(organization_id: current_organization.id)) | |||
.create(**args.merge(organization_id: current_organization.id, billing_entity_id: current_organization.billing_entities.first.id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hack to create customers assigned to the default billing entity (without changes on the FE, so we can release DB changes before actual changes)
only Premium — Pro and Premium — Enterprise will have more than one entity
@@ -27,6 +27,10 @@ def query(organization_id, **args) | |||
and_currency_sql = sanitize_sql(['AND currency = :currency', args[:currency].upcase]) | |||
end | |||
|
|||
if args[:billing_entity_id].present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's not sent, we will simply retrieve all credit notes for the organization
8e65b60
to
e27a480
Compare
Roadmap Task
👉 https://getlago.canny.io/feature-requests/p/{{FEATURE_SLUG}}
Context
Include relevant motivation and context.
Description
Describe your changes in detail.
List any dependencies that are required.