Warenwirtschaft: AP-45 + AP-47 — Verpackung aus Produktionsergebnis, Produktionsrelevant-Flag

AP-45: Verpackungsverbrauch (Etikett/Tiegel) wird jetzt aus dem tatsächlichen
Produktionsergebnis gebucht — je Ergebnisprodukt dessen eigene Stückliste ×
Ergebnismenge, über alle Outputs summiert — statt aus der geplanten Stückzahl.
syncPackagingSnapshot liest die production_outputs und läuft daher nach
persistOutputs (store + update umgestellt).

AP-47: Neues Produkt-Kennzeichen „produktionsrelevant" (Boolean, Default true).
Nur so markierte Produkte erscheinen in der Produktions-Auswahl
(ProductionController create/edit/copy) und in der „Enthalten in"-Box des
Rohstoffbestands (blendet z. B. Aloe-Handelsware und Zweitgrößen aus).
Checkbox im Produktformular (mit Hidden-Fallback 0). Migration Default true,
damit Bestandsdaten unverändert bleiben.

Migrationen add_production_relevant auf Dev-/Live-DB ausgeführt. 4 Tests, Suite 314 grün.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-08-28 08:38:59 +00:00
parent e6007efc41
commit d51860af39
7 changed files with 132 additions and 17 deletions

View file

@ -544,6 +544,15 @@
{{ Form::text('base_price', $product->getBasePriceFormattedFull(), ['placeholder' => __(''), 'class' => 'form-control', 'id' => 'base_price', 'readonly']) }}
</div>
<div class="form-group col-sm-3 d-flex align-items-end">
{{-- AP-47: nur produktionsrelevante Produkte erscheinen in der Produktions-Auswahl
und in der „Enthalten in"-Box des Rohstoffbestands. --}}
<label class="custom-control custom-checkbox mb-2">
{!! Form::hidden('production_relevant', 0) !!}
{!! Form::checkbox('production_relevant', 1, $product->production_relevant ?? true, ['class' => 'custom-control-input']) !!}
<span class="custom-control-label">{{ __('Produktionsrelevant') }}</span>
</label>
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="number">{{ __('Artikelnummer') }}</label>
{{ Form::text('number', $product->number, ['placeholder' => __('number'), 'class' => 'form-control', 'id' => 'number']) }}