If you are applying payment to an order through portal or process payment wizard then an invoice will automatically generate. You can also adjust your setting to automatically generate invoices for certain order type. If you need to create an invoice manually the process is pretty simple.
Select and open the record for the Order that needs to generate an Invoice.
The Invoice will be created automatically. All of the fields filled out in the Order will auto populate in the Invoice as well.
*If you do not allow the system to create the invoice and attempt to create it as a manual record, the connection between the order and the invoice will not be correct and will cause problems when trying to apply payment or if one of the records gets updated. So follow the steps above to avoid errors.