How can we add Project ID to invoice numbers?

You can do that by customizing the invoice numbers for the projects in the Projects > Settings > Billing Options tab. You can set the Project ID as a prefix or suffix to the invoice number sequence. Check CORE Help Center for details.