Auto populate sales invoice from time sheets

We are using ERPNext v5.13.0 installed onto a Ubuntu 22.04 server. We are a service company and only generate invoices for hours worked. In projects, each week a project with tasks is created from a project template. Timesheets are created to record the hours spent on each task of the project. Sales orders are not created as it is unknown how many hours will be acrued. As a result, when it comes time to generate the sales invoice, all information from the project tasks… task name & hours have to be manually entered into the sales invoice. If a sales order could be used, ERPNext will auto populate the invoice, whihc is not the case here. Is there a way to autopopulate a sales invoice from project task hours without a sales order first being created?

Hi,

I don’t know if this is helpful with the version you are using.

https://docs.erpnext.com/docs/user/manual/en/sales-invoice-from-timesheet

I can’t get this to work & have followed these steps in the past. Could it be this works when there is only one timesheet? I typically have up to a dozen or more timesheets which are all billed on a weekly basis. I haven’t tried billing just one timesheet but will give it a whirl.

Just an update. The reference in this link does auto populate a timesheet but only a single timesheet at the time of submitting it. I’m not a programmer but would be a real plus for ERPNext to autopopulate a sales invoice when it is being handed multiple timesheets.

With v15.14.3 Fetch Timesheet brings a popup with a data range and Project. That does populate the Timesheet List with all the timesheets in the range.

I’m only just trying this out, with one Project and Employee, and two Activity Costs.

I did try that but it did not make a difference. I’m guessing I will need to find a way to upgrade from v15.13.0 Interestingly, our installation is within a Docker container & v15.13.0 was the latest image. Will go back & rehearse before looking to upgrade.

The latest image referenced using the git repo is 15.14.3. I haven’t gotten far enough with Docker to offer any advice on upgrading.

https://github.com/frappe/frappe_docker/tree/main

Good luck

I just ran a test with what I typically wind up with each week, scaled down a bit for the sake of getting finished. Yes, it does pull in the timesheets when selecting “Fetch Timesheets” & the date range but what it doesn’t do, is move the time to the invoice lines. If I process the invoice, it will be a $0 amount. In order to actually have the time get onto the invoice, I have to manually enter each line.

After you fetched your timesheets, did the resulting invoice have line items with dollar amounts?

No, I think it would have to be scripted. This video shows how it works for one user:
https://www.youtube.com/watch?v=2iJtI88AAiE

Activities are not Items, as such. A feature request in the making perhaps.

Edit: It might be possible to customize the Sales Invoice and Sales Invoice Item form to fetch to the total billable hours from the timesheets. The individual timesheets do not appear to be fetchable from Project .

An invoice can be created from a single timesheet as shown here.

Only one Timesheet per employee , per invoice it appears .

That is what I have experienced. Unfortunately, the only way to bill multiple timesheets for a project is to enter the hours manually. At least by pulling in the timesheets, there is a reference just occupies time that could be better spent elsewhere.