Products now have a configurable lot_prefix (e.g. "112"). In the batch form
the prefix is shown read-only next to the suffix input (JJMMTT), and the full
lot_number (e.g. "112-260912") is composed automatically and stored.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When the recipe is changed in a batch form, keep origin data for spices
that exist in both the old and new recipe. Only add empty rows for
spices that are new to the selected recipe version.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each BatchOrigin (spice) now has multiple BatchOriginEntry rows, replacing the flat
single-supplier/farmer fields. Lieferant and Landwirt are Select fields backed by
dedicated tables with inline create support. Migration preserves existing data.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each batch origin row now shows a searchable Rohstoff Select so the same
ingredient can appear in multiple rows with different suppliers or farmers.
Pre-fill from recipe still works (one row per ingredient); user clicks
'Eintrag hinzufügen' to add a second entry for the same ingredient.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When creating a new batch, the Herkunft-Repeater is automatically populated
with one row per Rohstoff from the product's current recipe. The Rohstoff
field is shown as a read-only label (Hidden spice_id + Placeholder name)
so the user only fills in supplier, origin country, farmer and notes.
Changing the recipe field updates the origin rows accordingly.
On edit, existing origin data is preserved unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add size_id, units_produced, quantity_g to batches table
- quantity_g auto-calculated from units × packing size on save
- Batch model deducts spice quantities on create, reverses on delete,
recalculates on update when relevant fields change
- Batch form shows live total weight preview
- Chargen table shows units + grams produced
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Recipe select now has a create/edit modal (name + description)
- Batches RelationManager shows all LOT charges for the product below
the form, sorted newest first, with create/edit/delete actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>