WHMCS has an option to set custom invoice numbering. Obviously the UNPAID invoices that are sent to the customer have NO custom invoice number. Only the system generated numbering is applied.
This means that only the PAID invoices get the custom invoice number!
I think it should not matter if the invoice is unpaid or paid. The invoice is unique for that order and should always have an unique invoice number. Also the customer can get confused and it is not practical for administrative processing.
It seems that WHMCS has implemented it as a feature without considering the practical use of it.
Maybe it is just a minor adjustment in the code to get the custom invoice number on the unpaid invoice.