Entry of one Invoice that refers to many PO's

How would you enter a Vendor Invoice with many Line Items, but with some of the,lines referring to PO#1, some others to PO#2 and the remaining lines of the same Vendor Invoice referring to PO#3 ? Tks in advance for any ideas.