Hello everyone,
I’m facing an issue in ERPNext that I’d like some help with.
Whenever I select a Project in a sales invoice, all timesheets associated with that project are automatically loaded. However, this results in all hours for the project being added to the invoice, rather than only the timesheets that match the specific Customer/Project/Order combination.
Issue:
I need to ensure that only the timesheets that exactly match the Customer, Project, and Order combination are included in the invoice. Currently, the system adds all timesheets for the project, which can lead to incorrect billing.
Example:
If I want to automatically create an invoice for a specific order and the associated hours for a customer, timesheets that belong to the same project but different orders are also being included.
Objective:
I’m looking for a way to automatically filter the timesheets in the sales invoice so that only the relevant hours (based on the Customer/Project/Order combination) are considered. Ideally, the system should not load all timesheets when selecting a project but should only include those that match the specific combination of customer, project, and order.
Does anyone have any suggestions on how to solve this issue? Is there a way to adjust the filtering criteria or the automation process to ensure that only the relevant timesheets are included?
Thank you in advance for your help!