Warenwirtschaft: AP-20 Rohstoffbestand-Filter + Kein-Rohstoffbestand-Flag

- ingredients.exclude_from_stock (Checkbox im INCI-Formular, z. B. Allergene):
  erscheint nie im Rohstoffbestand und nicht im Kritisch-Badge
- Rohstoffbestand-Uebersicht: Umschalter "Alle" / "Nur aus Herstellerrezepturen"
  (?scope=recipe, nutzt scopeUsedInActiveRecipes aus AP-21)
- Fix: AP-21-Migrationen hatten identischen Timestamp (add_storage lief vor
  create_storage und scheiterte auf MySQL am FK) - umbenannt auf 120753,
  Teilreste bereinigt, Migrationen sauber ausgefuehrt
- Hinweise-Doku fortgeschrieben

Tests: RawMaterialStockTest +2 (volle Suite 172 gruen, 624 Assertions)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-06 11:42:55 +00:00
parent d05df498d3
commit ea36067831
11 changed files with 113 additions and 5 deletions

View file

@ -120,6 +120,11 @@
- **INCI-Liste „nur aktive":** Der Filter zeigt nur Inhaltsstoffe, die in der
**Hersteller-Rezeptur mindestens eines aktiven Produkts** vorkommen – nicht zu
verwechseln mit dem Aktiv-Häkchen am INCI selbst.
- **Rohstoffbestand-Filter:** Die Übersicht kennt zwei Modi – **„Alle"** (auch
Rohstoffe ohne Rezeptur-Bezug, z. B. für Neuentwicklungen eingekauft) und
**„Nur aus Herstellerrezepturen"** (aktiver Produkte). INCI mit dem Häkchen
**„Kein Rohstoffbestand"** (z. B. Allergen-Angaben) erscheinen nie im
Rohstoffbestand und zählen nicht im Kritisch-Badge.
---

View file

@ -184,5 +184,15 @@
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="custom-control custom-checkbox">
{!! Form::checkbox('exclude_from_stock', 1, $model->exclude_from_stock, ['class'=>'custom-control-input', 'id'=>'exclude_from_stock']) !!}
<span class="custom-control-label">{{ __('Kein Rohstoffbestand') }}</span>
</label>
<small class="text-muted d-block">{{ __('Für Einträge ohne Bevorratung (z. B. Allergen-Angaben) — erscheint nie im Rohstoffbestand.') }}</small>
</div>
</div>
</div>
</div>

View file

@ -65,6 +65,12 @@
<input type="text" id="rms-search" class="form-control" autocomplete="off"
placeholder="{{ __('Rohstoff suchen …') }}">
</div>
<div class="btn-group btn-group-sm ml-2" role="group" aria-label="{{ __('Rohstoff-Filter') }}">
<a href="{{ route('admin.inventory.raw-material-stock.index') }}"
class="btn {{ $scope === 'all' ? 'btn-primary' : 'btn-outline-secondary' }}">{{ __('Alle') }}</a>
<a href="{{ route('admin.inventory.raw-material-stock.index', ['scope' => 'recipe']) }}"
class="btn {{ $scope === 'recipe' ? 'btn-primary' : 'btn-outline-secondary' }}">{{ __('Nur aus Herstellerrezepturen') }}</a>
</div>
<div class="wawi-toolbar__spacer"></div>
<label class="form-check d-inline-flex align-items-center mb-0">
<input type="checkbox" id="rms-only-critical" class="form-check-input mr-2">