Since printing invoices in that file prints from a found set of line items for a single invoice, you have two options.
1) Create a script that loops through your invoice records and prints each one one at a time. That will kick off a separate print job for each invoice.
2) Make a copy of the print layout used for printing invoices and modify it so that sub summary layout parts separate each invoice and related group of line items from another. You can set this up so that an option on one of these sub summary layout parts forces a page break if that is desirable.
Then your script would use Go To Related records with the match found set option to pull up all the line items records for all the invoices. It would then sort these to group them by invoice and thus make the sub summary layout parts visible before printing them all in one batch print job.
It would be option number two that is desireable, so its possible to generate one PDF with all invoices to the accountant.
Does anyone have an example where this is made, I thought this was a bit tricky...
It's not terribly difficult. You should be able to make a duplicate of the layout that the starter solution uses for printing invoices and modify it to print multiple invoices.
But I'm surprised that your account needs to see all the itemized purchase details. I would have expected an accountant to be more interested in a spread sheet like table where each row is an invoice with columns for the LineItems total cost, shipping, sales tax, etc...
Its the parts of the layout that I find difficult... I'll google around to see if I can find an example somewhere.
I guess its different legal approaches in different countries. In Sweden, a paper copy of every verification / economical tranaction has to be saved for 7 years. The most common way to do this is collecting everything in a box and just send the entire thing to the accountant which check every paper in the box and write it in an bookkeeping application. Then they put the papers in another box in a storage until someone 15 years later accidently finds the box again and its recycled to toiletpaper.
There are some modern approaches as well, where the accountant get the verification as a photo or PDF, puts it into the application, and then the paper copies are saved in a box somewhere else until its accidently found.
The reason for the accountant to see the entire thing is the thousand of different rules how to tax it. not VAT, but some things should be paid before profit tax, while some are paid after profit tax. As an example, if you buy a lunch for you and a customer, 90 SEK (10,4€ or $13,5) per person is paid before profit tax, while the rest is paid after profit tax.
It's a matter of setting up Sub summary layout parts "when sorted by InvoiceID"--I forget the name of the exact field and it differs with the specific version version of FileMaker.
Set up one such to "print above" and another to "print below".
Put your invoice fields in these parts and leave the line items fields in the body.
thanks to the suggestions in this post I was able to mostly find a solution to my invoices print. Thanks phil!
...but I have found a problem: what if the number of rows is high?
I see that thinkgs with sub summary parts are working if the rows are less then paper height... but when they exceed it seems that layout is corrupt and I am not able to have "the new header", that has been made by using sub summary, repeat on the new sheet. Rows will continue on the new sheet without any other info.
Is that fixable?