-
Notifications
You must be signed in to change notification settings - Fork 852
Add service for a company (replace #1020) #1372
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
base: prep/v171
Are you sure you want to change the base?
Conversation
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
@ThierryHFR thanks for the PR. |
nielsdrost7
left a comment
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.
@ThierryHFR
Consider making an option in the settings, just like they did with "Projects".
if "option services" is true, use that code that you just showed in your pull-request. That way all the other users are not seeing the new feature until they turn on that option.
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.
Pull request overview
This pull request introduces a comprehensive service management feature for InvoicePlane, allowing users to assign department-specific services to invoices and quotes. The implementation adds a new ip_services database table and integrates service selection throughout the quote and invoice workflows.
Key Changes
- Database schema additions for services management and service-to-document associations
- Complete CRUD operations for services with dedicated controller, model, and views
- Service selection integrated into invoice and quote creation, editing, copying, and conversion workflows
- Service names displayed in document lists, PDFs, and payment views
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| application/modules/setup/sql/038_1.6.x.sql | Creates ip_services table and adds service_id columns to invoices/quotes tables |
| application/modules/services/* | New services module with controller, model, and views for CRUD operations |
| application/modules/quotes/models/Mdl_quotes.php | Adds service_id validation, join, and handling logic to quotes model |
| application/modules/quotes/controllers/*.php | Integrates service selection into quote workflows and retrieves service data |
| application/modules/quotes/views/*.php | Adds service dropdowns to quote forms and displays service names in lists |
| application/modules/invoices/models/Mdl_invoices.php | Adds service_id validation, join, and handling logic to invoices model |
| application/modules/invoices/controllers/*.php | Integrates service selection into invoice workflows and retrieves service data |
| application/modules/invoices/views/*.php | Adds service dropdowns to invoice forms and displays service names in lists |
| application/modules/payments/controllers/Payments.php | Retrieves and displays service names in payment views |
| application/modules/guest/controllers/Invoices.php | Fetches service names for guest invoice views |
| application/modules/filter/controllers/Ajax.php | Includes service name retrieval in invoice/quote filters |
| application/modules/layout/views/includes/navbar.php | Adds navigation menu items for services |
| application/language/english/ip_lang.php | Adds translation keys for service-related UI elements |
| application/views/*/pdf/InvoicePlane.php | Displays service names in PDF templates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull request overview
Copilot reviewed 27 out of 27 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** | ||
| * @param null $id | ||
| */ | ||
| public function form_client($client_id, $id = null) |
Copilot
AI
Dec 29, 2025
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.
The method name form_client is ambiguous. Consider renaming to something more descriptive like form_for_client or create_service_for_client to clarify that this creates/edits a service in the context of a client.
| } | ||
|
|
||
| $invoices = $this->mdl_invoices->get()->result(); | ||
|
|
||
| foreach ($invoices as $invoice) { | ||
| $servicesById = $this->mdl_services->get_names_by_ids([$invoice->service_id]); |
Copilot
AI
Dec 29, 2025
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.
The services model is referenced ($this->mdl_services) but never loaded. Add $this->load->model('services/mdl_services'); before line 35 to avoid potential errors.
|
@ThierryHFR great job, I'll approve your PR. As soon as both versions are released your new functionality will be merged. Thank you for your contribution |
|
Commit f18fc7f introduces a global setting to enable or disable the use of services on invoices and quotes. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
I've been using InvoicePlane for a number of years.
I have several customers who have departments, and these customers ask us to send invoices directly to the relevant department.
So I've added service management for customers.
I finally took the time to clean it up and offer it as a feature.
Related Issue
Motivation and Context
Screenshots (if appropriate):
Add 2 entries to add and list services
Service creation page
Service selection when creating a quote or invoice
When listing quotes or invoices, the service appears in brackets.
On quotations or invoices, the service appears under the customer's name.
In system settings, add the option to enable or disable the new feature.
Pull Request Checklist
Issue Type (Please check one or more)
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.