Bug when combining settings 'Mark invoices as sent when PDF is generated' (yes) and 'Generate the invoice number for draft invoices' (no)

I like to set ‘Mark invoices as sent when PDF is generated’ to ‘yes’, so that the status goes from Draft to Sent when I generate a PDF for the first time.

I would like to combine this with setting ‘Generate the invoice number for draft invoices’ to ‘no’

What happens in this case it that first the PDF is generated without having an invoice number. And then the invoice is set to ‘Sent’ but the invoice number is never set. No invoice number appears in the PDF. In the GUI it shows only the ‘id’ of the invoice instead of the invoice number that normally gets generated as per the ‘identifier formatting’ settings (which in my case is year-id).

What I expect when generating a PDF in this case is that first the invoice is set to ‘Sent’, gets an invoice number (according to the specified pattern), and then the PDF is generated correctly.

@Kovah should I report this bug somewhere else?

No, just leave this open here please.

I have the same view as dnidtest :slight_smile:
+1