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

@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* AP-20: „Kein Rohstoffbestand" — INCI (z. B. Allergen-Angaben), die nie
* im Rohstoffbestand geführt werden.
*/
public function up(): void
{
Schema::table('ingredients', function (Blueprint $table) {
$table->boolean('exclude_from_stock')->default(false)->after('min_stock_alert');
});
}
public function down(): void
{
Schema::table('ingredients', function (Blueprint $table) {
$table->dropColumn('exclude_from_stock');
});
}
};