Food customer/producer Issue

We are a Food Hub in the United States. By law we are required to track exactly where we bought our goods. We want to set up our system so we can track exactly who we bought each item from on our purchasing side which I figured out how to do. But on our sales side we want to combine multiple identical products from different producers into a single sales item. Is there away to efficiently do this so that our margins and accounting and everything still works.

Example:
Product A (Organic Ground Beef 1lb. package)

Purchased from:

Farm’s A (10lb), B (3lb), and C (5lb)

I need someone buying Product A to see a total of 18lb. in stock
As we fill an order of 11lb. we can subtract 10 from Farmer A and 1lb from farmer C to fill the order.

I’m running into an issue that if I set up Farmer A’s product to be tracked by the system I can’t add it to the sales list for Product A also.
Is there a config or setting I can change to allow me to track the same item in multiple products or an external module that already exists that we can use to provide the functionality we need? Is there a way to do this built into the core system that I am missing? We are running on 7.0.2

Interesting workflow :wink: remember you should always give “batch” and “limit date” to customer also :wink:
So there is a module : product batch numbers in Dolibarr didn’t you see it in the config ?
We made also, a module ourselves to “combine” many A+B’s product’s batches in a single “box” and have a simple way to take them out of stock, then put them back in stock but “combined”.
with module batch numbers you should use manual “ventilation” of the stocks (incoming and exiting stocks)