Group (time)entries on Invoice

Hy Folks,

I’m new to InvoiceNinja, and I’m trying to set up my billing-strategy. I am a freelancer IT-Admin, and I’m working for different clients. I record my time with Toggl and just got the automatic import working.
So now my time-Entries are imported with the right customer and assigned to the specific Projects.

What I want to do now is to only display the summarized Amount of one project, since I have several projects for a client, and they are all billed with a single invoice.

Is there a way to “group” them together? I know I could do it manually, but that’s not helpful with several hundred entries a month :slight_smile:

Hi,

This isn’t currently supported, feel free to create an issue to request this feature:

Thanks for your quick reply. I opened a feature request.

Hi @mIghTy

Just curiuos, how do you import your toggl entries? Via Make or Zapier or are you using something else?

Thanks,
Gijs

Hy ecomsilio,

I found this github-project for importing toggl entries. Unfortunately it’s not maintained anymore, but there’s this forked project , which runs the importer in an container and is compatible to invoice ninja v5.

It took me a while to really get this working, but I could finally manage it to run without errors.

I’m not at my computer, but I can share my steps in the beginning of next week, if you are interested.

Spoiler: you’ll need to configure a connection from every customer AND project within toggl in order to get it working. So for me I had to create all customers within invoice ninja and all projects, that are in toggl. They don’t need to have the same name, since you connect them via the internal alphanumeric ID.

So once, you have setup all projects and customers from Toggl to InvoiceNinja, you’ll have to get the customer-ID and project-ID. Unfortunately, I didn’t find a way within the GUI, so I followed the instructions for the API and came up with this command to get a list of all customers:

curl -X GET "https://invoice.example.com/api/v1/clients" -H "X-API-TOKEN: xXxXxXxXxXxXxXxXxXxXxXxX"

Make sure you put in your domain instead of “example.com” and your API-Token from within InvoiceNinja.

If the output is too extensive, you can add “>> clients.txt” at the end to paste it into the text file “clients.txt”. Open it and it looks like this:


the marked lines are the customer name you created within the WebUI and the ID i the one you’ll have to put into the Config-File.

To do the same for projects, you simply have to change “clients” into “projects” and you’ll end up with a list of all your created projects:

curl -X GET "https://invoice.example.com/api/v1/clients" -H "X-API-TOKEN: xXxXxXxXxXxXxXxXxXxXxXxX"

Add them as well with the Toggl name and the invoiceninja-ID to the conf-file, and you can give it a try.

If you’ll need further info, I can send more info, but maybe it’s better you open a new issue and send me the link inhere.

Caveats with this way are:

  • you’ll have to manually keep up with changes in Toggl (maybe I’ll write a little workaround for this later)
  • it’s only a one way sync from Toggl to InvoiceNinja
  • it’s only a onetime sync - you’ll have to figure out how to run it periodically (with cron for instance)
1 Like

Hi @mIghTy

Thanks for your effort and your explanations. This looks already very nice but unfortunately not useable for us. We get dozens of new project every day and also new clients every week. So clients and projects need to be synced automatically as well.

I have set up a few scenarios in Make to do this. It needs a few tweaks but is already working for most of the times. I guess, with a few more changes, I get it to work properly and sync all clients, projects and time tracking reports almost in real time. Of course, it is a solution that cost a bit of money, depending on the amount of clients, projects and time entries but in the end it is very reliable and (very important for me) I can maintain it myself.

I will fine tune my scenarios and make them available as a template/blueprint if anyone else wants to use it.

Again, thanks a lot for you effort @mIghTy
Gijs

Hy Ecomsilio,

yeah, for many items it’s a pain to do it all by yourself. I’m also open for any other option, so feel free to link me a guide on how to realize it in make - I’ll have a look at it.

I’m thinking to automate the syncing of customers and projects, but that’s time - and in the end money. Maybe it’s easier and more affordable to utilize make or some tool of that kind for this task.