Warenwirtschaft: Bestandsrechnung auf der Rohstoff-Detailseite nachvollziehbar
Neuer Klappbereich „Bestandsrechnung nachvollziehen" zeigt alle gebuchten Eingänge – auch aufgebrauchte mit Rest 0 – mit Produktionsverbrauch, Ausschuss mit Chargenbezug und dem nach FEFO zugerechneten Ausschuss ohne Chargenbezug; Summenzeile bis zum Gesamtbestand identisch zur Kopfzahl. Alt-Ausschuss ohne Chargenbezug wird einzeln mit Grund/Notiz/Bearbeiter gelistet. Anlass: Live-Fall Sonnenblumenöl (doppelte Korrektur vom 28.07.). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
79bec0ff0b
commit
761ea35047
7 changed files with 417 additions and 2 deletions
|
|
@ -108,6 +108,8 @@ class RawMaterialStockController extends Controller
|
|||
$remaining = $this->inventoryService->remainingByIngredient([$ingredient->id])[$ingredient->id] ?? 0.0;
|
||||
|
||||
$remainingByLocation = $this->inventoryService->remainingByLocationForIngredient($ingredient->id);
|
||||
// 17.09.2026: Bestandsrechnung zum Nachvollziehen (auch Eingänge mit Rest 0, Alt-Ausschuss).
|
||||
$breakdown = $this->inventoryService->stockBreakdownForIngredient($ingredient->id);
|
||||
|
||||
$openOrders = $this->inventoryService->openOrdersForIngredient($ingredient->id);
|
||||
$openTotal = roundWawiQuantity((float) $openOrders->sum('ordered_quantity'));
|
||||
|
|
@ -130,6 +132,7 @@ class RawMaterialStockController extends Controller
|
|||
'chargeGroups' => $chargeGroups,
|
||||
'remaining' => roundWawiQuantity($remaining),
|
||||
'remainingByLocation' => $remainingByLocation,
|
||||
'breakdown' => $breakdown,
|
||||
'locations' => Location::query()->where('active', true)->orderBy('name')->get(),
|
||||
'openOrders' => $openOrders,
|
||||
'openTotal' => $openTotal,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue