I have script what makes two-pages invoices.
Specifically, from the table the script filter out all records for the first company, then displays it in the view which sort and group this records by kind of taxes and save it as PDF file. Then displays this records in the other view, sort them by date of sale and save it as second page (append) of previously created PDF file. Then the script repeat for the next company ....
So, I create some 600 invoices but about 30 of them contain first page only. I tried it 3 times with the same result (but the one-pages invoices are different).
I added pause in the script, but it did not help.
Do you have any idea?