After selecting the Business Partner on the invoice (customer or supplier) window, the order ref. is blanked out (it is copied from the BP, and even if the order ref is blank on the BP, it still overwrites the order ref).
If doing many invoices this is non-optimal, as one needs to continuously re-enter the order ref, if one had the incorrect BP. Further, the order ref appears first on the window, and it is natural to first enter the order ref, and then select the BP.
Here is a screen shot:
In CalloutInvoice, in method bPartner: