Indicating the billing period automatically on the invoice

This is perhaps big ask…
I bill monthly for hourly work done in that month. I will either bill on the last day of the month or the last working day or the first day of the next month. My intent is always the same, to bill for the month just finished. I send the PDF invoices immediately to the clients.

A client has asked that I indicate on the invoice the month which this invoice is for. There has been some confusion in their Accounts Payable process and he hopes that could help. It’s a reasonable request. I would just like it to be an automatic process so that I’m not relying on my memory to make it happen.

Any ideas out there on how to do it in Dolibarr?
Thanks!

Hello,

You can try with computed extrafields, and a bit of PHP.

Exemple :
(date("d") > 15) ? "Bill of the ".date("F") : "Bill of the ".date("F", strtotime("-1 month"))
not tested

1 Like

Great idea. I was not aware of “computed extra fields”. I’ll have to get myself up to speed on them. I suppose then, I somehow add them to my invoice model?

1 Like

@dleigh
Did you try the computed extrafield?

As an alternative, for the same need as you, I use the module “timesheet”

First you will need to edit a report from the module timesheet and from this report, you can prepare your invoice. The invoice will then indicate the period of time selected for your report.

You will also be able to download the timesheet in a nice pdf, if you need it.

It’s automatic if you use sponge model

1 Like

I usually copy in an Excel table in the public note of the invoice. It was “low-hanging fruit” to do it in Excel so I went that way. Currently I use Clockify to track my time. So it’s Clockify >> Excel via PowerQuery >> Dolibarr. The Excel to Dolibarr is the most disconnected part. I’m fairly invested in the Clockify and Excel parts (even did a write up of my process here: https://david.leighweb.com/2021/05/27/clockify-power-query-excel-dolibarr/ ) But if I could do it all in Dolibarr, that does sound interesting. I’ll have to take a look at it. Thanks!

Thanks for the info!