Hi NIcolas,
Thaks for you help.
Note that the invoice number will only be generated when the order status is changed to one of the order statuses enabled in the column "invoice" of the menu System>Order statuses. This did the trick.
Indeed generating invoices was not active.
I'm using also the attachinvoice-plug in. The invoice is now send when the order is changed to confirmend. Is it also possible that the invoice is send directly when the order is made? The flow for my customer is then a little bit easier.