Have you looked at the Invoice Starter Solution? You can pick that apart to see how selecting "New Invoice", captures the primary key as a variable, goes to Invoice Table, creates a new record, and sets the Primary key
Every time I transport a client, I want to create an invoice. At the end of the month, I would like to invoice this particular company for as many clients I transported.
In those two sentences, you actually refer to two different entities and call them both an "invoice". In one case, you need to create a record logging the details of your trip. In the other case, you want to pull up a list of all those entries for a given company for a specified month in order to present to that company as a Bill.
As Steve suggested, there's an invoices starter solution that you can look at. You may be able to adapt the methods shown there where "Every time I transport a client, I want to create an invoice." is accomplished by creating a record in Invoice Data and "I would like to invoice this particular company for as many clients I transported." is a matter of creating a record in Invoices and linking all those Invoice Data records for that particular company to it.
From an accounting perspective, each transportation might be an invoice, i.e. date and some identifiable information to the transport. Then at some point in the month you want to send a STATEMENT of the account, listing all INVOICES that are open as unpaid, or unbilled, either or.