Mindestbestaende: Bestand je Lagerort anzeigen (nicht nur Gesamt)
Per-Lagerort-Zeilen (Produkt und Gruppe) zeigten '-' beim Bestand, weil die Seite nur den Gesamtbestand kannte. Jetzt liefert LocationMinStockOut.stock den Bestand AN DEM Ort (inkl. Unterorte) mit - bei Produkten in Basiseinheiten, bei Gruppen in der Gruppen-Einheit (analog zu ProductOut.stock/GroupOut.stock). Berechnet ueber location_subtree_stock_base; die Weboberflaeche zeigt ihn wie beim Gesamt-Bestand. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -73,7 +73,9 @@ export default function MinStock() {
|
||||
locId: l.location_id, name: p.name, catId: p.category_id,
|
||||
ort: locationPathById(l.location_id, locations) || "?",
|
||||
// je-Lagerort ist in Artikeleinheiten gespeichert → in Anzeigeeinheit umrechnen.
|
||||
soll: (l.min_stock * articleUnit(p)) / dispFactor(p), unit: dispLabel(p), bestand: null,
|
||||
soll: (l.min_stock * articleUnit(p)) / dispFactor(p), unit: dispLabel(p),
|
||||
// Bestand kommt in Basiseinheiten (wie der Gesamt-Bestand) → in Anzeigeeinheit.
|
||||
bestand: l.stock != null ? l.stock / dispFactor(p) : null, bestandUnit: dispLabel(p),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -88,7 +90,9 @@ export default function MinStock() {
|
||||
key: `g:${g.id}:${l.location_id}`, kind: "group", scope: "loc", entity: g,
|
||||
locId: l.location_id, name: g.name, catId: null,
|
||||
ort: locationPathById(l.location_id, locations) || "?",
|
||||
soll: l.min_stock, unit: g.min_stock_unit_name || "", bestand: null,
|
||||
// Gruppen-Bestand je Ort kommt schon in der Gruppen-Einheit (wie Gesamt).
|
||||
soll: l.min_stock, unit: g.min_stock_unit_name || "",
|
||||
bestand: l.stock ?? null, bestandUnit: g.min_stock_unit_name || "",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user