Purchase Consignment invoicing

Hi! everybody…

I need advice for invoicing consignment inventory.

We buy all our products with consignment, and we do not invoice our purchase orders untill we sell the products(with LS Retail POS).

The problem is that how could i know after i have sell several items in the store´s POS , wich purchase order should be invoiced.

Im actually consultant jr. and i have and idea, in order to invoice what has been sold, against the receipts by selecting receipt lines to combine shipments in one invoice in the purchase module and invoice the oldest purchase so i dont generet too many open orders without invoices.

But it would still need a person reconciling, i need advice on how to make this process automatic. So i can explain it to the developers in case we need customization. any advice pls.