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(customer-type): Replace customer name with display_name in templates #2556

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

ivannovosad
Copy link
Contributor

Context

We currently only create Lago customers as companies, but there is a need to support both companies and individuals. This change is motivated by scenarios where customers may be a mix of B2B and B2C, and where external integrations require handling both Contacts and Companies.

To address this, we are introducing a new field, customer_type, to distinguish whether a customer is a company or an individual. Existing customers will remain unaffected with customer_type set to the default nil.

Description

This PR modifies all the invoice/credit note templates so that they call customer.display_name method that handles the logic of what's displayed.

@ivannovosad ivannovosad merged commit 1ae3c70 into main Sep 10, 2024
6 checks passed
@ivannovosad ivannovosad deleted the feat-customer-type-templates branch September 10, 2024 09:01
@brunomiguelpinto brunomiguelpinto added the Invoice Related to Invoices label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invoice Related to Invoices
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants