Skip to content

Conversation

@ThierryHFR
Copy link

@ThierryHFR ThierryHFR commented Dec 22, 2025

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

menu-service

Service creation page

create-service

Service selection when creating a quote or invoice

create-quotr

When listing quotes or invoices, the service appears in brackets.

lisste-facture

On quotations or invoices, the service appears under the customer's name.

devis-facture

In system settings, add the option to enable or disable the new feature.

Capture du 2026-01-16 14-05-28

Pull Request Checklist

  • My code follows the code formatting guidelines.
  • I have an issue ID for this pull request.
  • I selected the corresponding branch.
  • I have rebased my changes on top of the corresponding branch.

Issue Type (Please check one or more)

  • Bugfix
  • Improvement of an existing Feature
  • New Feature

Summary by CodeRabbit

  • New Features

    • Services management UI: create, edit, delete services and link services to clients.
    • Choose and assign a service to invoices and quotes across create, edit, copy, convert, and modal flows.
    • Services entries added to navigation and selection controls throughout the app.
  • Improvements

    • Service names surfaced in lists, tables, PDFs, payments, guest/status views, and filters for clearer context.

✏️ Tip: You can customize this high-level summary in your review settings.

coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Dec 22, 2025
@nielsdrost7 nielsdrost7 marked this pull request as draft December 22, 2025 21:57
@nielsdrost7 nielsdrost7 added this to the 1.7.1 milestone Dec 22, 2025
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@nielsdrost7
Copy link
Contributor

@ThierryHFR thanks for the PR.
Can you git pull? I made 1 correction in the source regarding primary key for the services table

@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Dec 23, 2025
Copy link
Contributor

@nielsdrost7 nielsdrost7 left a 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.

@nielsdrost7 nielsdrost7 requested a review from Copilot December 23, 2025 03:27
Copy link
Contributor

Copilot AI left a 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.

@nielsdrost7 nielsdrost7 requested a review from Copilot December 23, 2025 03:59

This comment was marked as outdated.

Ordissimo and others added 2 commits December 23, 2025 07:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Dec 23, 2025
ThierryHFR and others added 3 commits December 23, 2025 07:23
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>
@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Dec 23, 2025
ThierryHFR and others added 5 commits December 28, 2025 10:29
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>
@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Dec 29, 2025
@nielsdrost7 nielsdrost7 requested a review from Copilot December 29, 2025 09:39
Copy link
Contributor

Copilot AI left a 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)
Copy link

Copilot AI Dec 29, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines 33 to +38
}

$invoices = $this->mdl_invoices->get()->result();

foreach ($invoices as $invoice) {
$servicesById = $this->mdl_services->get_names_by_ids([$invoice->service_id]);
Copy link

Copilot AI Dec 29, 2025

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.

Copilot uses AI. Check for mistakes.
@nielsdrost7
Copy link
Contributor

@ThierryHFR great job, I'll approve your PR.
Version 1.6.4 and version 1.7.0 are in Beta at the moment.
They are bugfix releases, so I cannot merge new functionality in those versions.

As soon as both versions are released your new functionality will be merged.

Thank you for your contribution

@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Dec 29, 2025
@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Jan 16, 2026
@ThierryHFR
Copy link
Author

Commit f18fc7f introduces a global setting to enable or disable the use of services on invoices and quotes.
When the option is disabled, service-related fields are hidden from the UI and a default value (service_id = 0) is applied to maintain backward compatibility.
This change makes the services feature optional, simplifies the interface for users who do not rely on services, and avoids impacting existing data or workflows.

@nielsdrost7 nielsdrost7 changed the base branch from development to prep/v170 January 19, 2026 13:28
@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Jan 19, 2026
nielsdrost7 and others added 3 commits January 19, 2026 14:29
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>
@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Jan 19, 2026
@nielsdrost7
Copy link
Contributor

@copilot open a new pull request to apply changes based on the comments in this thread

@nielsdrost7 nielsdrost7 modified the milestones: 1.7.1, 1.7.x Jan 19, 2026
@nielsdrost7 nielsdrost7 self-assigned this Jan 19, 2026
@nielsdrost7 nielsdrost7 changed the base branch from prep/v170 to prep/v171 January 20, 2026 07:44
@ThierryHFR ThierryHFR marked this pull request as ready for review January 20, 2026 20:16
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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