Numbering of transactions?

Have an idea to read static info like name, address etc from a toml file. And read the info for amount, description etc from a json.

That sounds like good plan for prototype, at least. And probably the production setup could be something like that. Those static info's are the things people like to customize the most, among the template (visual and information content). So it would be good to have solid story how to provide an easy way to do that for the users. And the triplet of template, basic info as toml and actual report data as json sounds good.

How do you go about exporting that?

The question above is related to exporting JSON, isn't it?

In the template config, there is setting about formats - add "json" there, like that:

formats = [ "txt", "json" ]

After that, when you do file based reports, it will write json alonside of txt:

tackler --config journal/conf/tackler.toml \
   --output.dir . \
   --output.prefix reports
       Balance Report (TEXT): ./reports.bal.txt
       Balance Report (JSON): ./reports.bal.json
      Register Report (TEXT): ./reports.reg.txt
      Register Report (JSON): ./reports.reg.json

If you don't need text based reports on file, then it could be just "json".

Generating the Invoice

Does it make sense and is possible to only export the last tx (for the invoice)?

There are couple of options here:

First of tackler is operating of stream of transaction, and that stream can be filtered as you like. So it's possible to generate balance for only one week, month, etc. So you could use that to generate the content for the invoice, and maybe even translate e.g. time-and-materials to monetary value with pricedb.

The second option is to generate "the invoice" transaction, and only report that. To report only that single txn or few related txns for invoice, one option could be to use tags in the transactions and filter them based on that. So only those txns with "Invoice-May-2025" will be used.

There is that Trimix Filling Station example, which uses billing transactions, but for the simplicity of the example, it doesn't use any tags, etc.

With transaction filters you can do really odd stuff relatively easily. The filter is just plain JSON, and it can be generated by any means. There is an option to do base64 ascii armor, so it's easy to use complex filter definition with shell scripts.

In above links, there are examples of of time based filters, some of them are using natural language as part of description (courtesy from date).

Epilogue

It would be really nice and appreciated if you would be interested in to work with the PDF templates. It's also something which would be beneficial for other tools too (e.g. hledger), as most of them have JSON output.

But this is getting really off topic for the original post, so maybe we should have own thread for that. There is Matrix channel for tackler, and there is also Zulip chat which is really great way to coordinate and discuss actual technical plans and implementation. Let me know if you would like join zulip, especially if you would like to work with the PDF reporting.