The LotNR field you placed on the Invoice Details screen is a new field in the Invoice Data table (i.e., line items), right?
Create a relationship between an occurrence of the Lotnumbers table and the table occurrence of Products that is already related to Invoice Data [Product ID (Lot Numbers = Product ID (Products).
Now create a new value list that will be the pop-up list of the LotNr field in your invoice line items portal.
For this new value list, specify "specify only related values" starting from table occurrence of Product related to Ibnvoice and Use Values from first field LotNR of the Lot Numbers table you just related to Invoice Data (line items).
When you choose a Product in an invoice line item portal, the pop-up list in the LotNr field should show only the valid Lot Numbers of the selected product.