The Invoice option must be selected. The Additional Cost Link Option and the No Reference Source Document must be selected. The account must then be selected and the down arrow clicked.
A link class and Tax code must then be selected and Comments entered in order to Apply (save) the record.
This is repeated for all lines.
When preparing the invoice for payment, each line link must be selected and a Credit Link be created by clicking on Credit Link. (If the Credit Link is not enabled, click on an arbitrary field on the line link.) The same link class must be selected and a matching record (matching to the link class) must be created.
In order to prevent an invoice from being paid automatically, either do not create a credit link for every line link OR place a line link On Hold.
The tables concerned are Invoice, Invoice_Line, Invoice_Line_Link and Invoice_Line_Link_Status_Hist.
See the Creditors training material for additional detailed information.