Gebinde-Bezeichnung je Produkt + Spalte "Einheiten (ist / soll)"

- Neues Feld products.package_label: pro Artikel einstellbar, wie das Gebinde
  heisst (Packung, Glas, Tuete, Flasche, Dose, Tube, ...) - Eingabe mit
  Vorschlagsliste, frei ueberschreibbar. Migration per ADD COLUMN IF NOT EXISTS.
- Produkttabelle: Spalte "Packungen" heisst jetzt "Einheiten (ist / soll)" und
  zeigt Bestand und Mindestbestand als "11 / 12 Glas"; die separate Spalte
  "Mindest" entfaellt. Das "niedrig"-Badge sitzt jetzt dort.
- Die Bezeichnung wird ueberall verwendet (Chargenanzeige, Einheiten-Umschalter
  beim Bearbeiten, Mindestbestand-Auswahl, Umrechnungshinweis).
- Speichern/Abbrechen im Chargen-Editor sind jetzt gleich breit (.btn-pair).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-07-22 13:39:44 +02:00
parent c065b8879d
commit 3884919a4c
7 changed files with 54 additions and 20 deletions

View File

@@ -119,6 +119,8 @@ class Product(Base):
)
# Number of base units contained in one package (e.g. 500 g per package).
package_size: Mapped[float | None] = mapped_column(Float, nullable=True)
# Bezeichnung eines Gebindes: "Packung", "Glas", "Tüte", "Flasche", …
package_label: Mapped[str | None] = mapped_column(String(32), nullable=True)
group_id: Mapped[int | None] = mapped_column(
ForeignKey("groups.id", ondelete="SET NULL"), nullable=True