We did a very simple mod for a customer which placed the sales order into the line aswell. I know this was for the sales side, but in effect it is the same thing. We placed the sales order no. into the shipment line, and then moved that into the invoice line when the Get Shipments function was used. This then gave us all the links required.
Depending on your version - there is a link between the receipt and the Invoice. You will need to go from the item ledger entry to the value ledger entry (or vise versa) tables using the item ledger entry no. as the link. The PO should be linked to the receipt header and also to the invoice header if invoiced from the order.