(optional HADAB Factory module, hidden until you switch it on):
Switch on: Settings → POS section → «Least-cost formulation (feed mixes)». A Least-cost feed mix screen appears under Production.
Materials: every item marked «raw material» is listed; tick the ones you have and edit the cost per kg if you like (it starts from the item's cost). Optionally set a min and max share per material.
Nutrient values: also in the raw material's own item card (Products → edit, with the feed switch on; same values). The pencil on a material takes protein, energy, fat, fibre, calcium, phosphorus, lysine, methionine and moisture (all optional; blank counts as zero, with a warning).
Required nutrients: type the minimum and/or maximum for each nutrient you need, and the batch size in kg (default 1000).
Calculate: press «Find the cheapest mix»: the cheapest mix shows the share, kg and amount per material, the cost per kg and the batch total, and each nutrient in the mix against its limits.
No mix possible: a message says which nutrient the chosen materials cannot reach; relax a limit or add a richer material.
Save: «Save as a recipe» → pick the finished item or type a new name (created in kg) and the mix is saved as its recipe in Production (a new version if it had one); make it with a normal production order.
Note: the result is only as good as the values you enter; check the formula with a nutritionist before producing.
If you get stuck on any step, ask the smart assistant inside the program.