...
The "Invoice (create)" form. The Additionally tab
You can enter the number and date of the incoming document on which this document is based, in the In. Doc. # and From fields, respectively. If the invoice is based on a customer order or other document, the values are filled in automatically. If the CRM module is enabled, you can select a Lead in the In.Doc.# field.
...