Track crates and fruits separately for production

Hello,
I have a scenario for fruit pulp production. The production flow is pretty common. However, I couldn’t find a workaround to create the production flow. This is my workflow:

  1. Fruits are purchased and delivered by the vendors in crates. The fruits in these crates are then transferred to our crates and stored in either dry or cold storage. How do I add these as stock? Product bundling was my first option (i. One qty of Crate ii. Fruits in Kg). But the weights of the fruits in each crates will be different. Therefore, I cannot use product bundle since the bundle qty will be fixed.

  2. Also fruits are chosen for production according to how ripe they are. Which means fruits are taken from different crates at a time.

I need to track the crates through its life cycle of production.

So what would be the best method to store these different crates? Or what would be the closest method I can do through ERPNext?

my proposal:

  1. create crate as serialized item, goods receipt to generate/create serial number for crates
  2. add link field crate_sn with options Serial Number to work order item child table via customize form
  3. add customized logic via client and server side script to enforce select only serial number of crate in crate_sn field, only sn not in active work order selectable, sn used count(count of records of work order items contain the sn) less than preset threshold can be selected, etc.