Nachschlagen: Lagerort-QR zeigt alle Artikel an diesem Ort
Neuer Endpunkt GET /location/{code} liefert alle Artikel an einem Lagerort inkl. der Unterorte (Lot-Bestaende und Einzelstuecke), sortiert nach Name mit Menge in Artikeleinheiten. In der App loest der /l/-QR beim Nachschlagen jetzt diese Liste auf; ein Tipp auf einen Eintrag oeffnet den Artikel.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -658,6 +658,23 @@ class LocationNeeds(BaseModel):
|
||||
groups: list[LocationNeedGroup] = []
|
||||
|
||||
|
||||
class LocationContentEntry(BaseModel):
|
||||
"""Ein Artikel mit seinem Bestand an einem Lagerort (in Artikeleinheiten)."""
|
||||
product_id: int
|
||||
name: str
|
||||
brand: str | None = None
|
||||
stock: float
|
||||
unit_label: str = ""
|
||||
individual: bool = False
|
||||
|
||||
|
||||
class LocationContents(BaseModel):
|
||||
"""Alle Artikel, die an einem Lagerort liegen – inklusive der Unterorte."""
|
||||
location_id: str
|
||||
location_name: str
|
||||
products: list[LocationContentEntry] = []
|
||||
|
||||
|
||||
class MovementOut(BaseModel):
|
||||
id: int
|
||||
product_id: int
|
||||
|
||||
Reference in New Issue
Block a user