Warenwirtschaft: R-02 — leerer historischer Verpackungs-Snapshot gilt in der Vorschau

Ob der Snapshot gilt, entscheidet der Buchungsstatus (nicht die Zeilenzahl);
ohne Verpackung gebuchte Produktionen zeigen „Kein Verpackungsverbrauch gebucht“.
Tests R-01/R-02.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-09-09 07:28:06 +00:00
parent fda37d5599
commit bdaac3b8fb
4 changed files with 110 additions and 3 deletions

View file

@ -170,6 +170,8 @@ class ProductionController extends Controller
return view('admin.inventory.productions.edit', [
'model' => $production,
'packagingSnapshot' => $packagingSnapshot,
// R-02: gebucht = historischer Snapshot gilt (auch wenn er leer ist: „kein Verbrauch“).
'packagingSnapshotApplies' => ! $production->isDraft(),
'initialOutputTotals' => $initialOutputTotals,
...$this->productCatalogs($production),
'locations' => Location::query()->where('active', true)->orderBy('name')->get(),