gruene-seele/app/Http/Controllers/Admin/Inventory
Kevin Adametz b8180a06a1 Warenwirtschaft: AP-53 — Gramm-Mengen mit drei Nachkommastellen (Produktion, Wareneingang, Ausschuss)
Kundennachtrag 09.09.2026: Ist-Mengen je Charge in der Produktion sollen auf das Milligramm eingegeben werden können (z. B. 0,125 g). Bisher rundeten Datenbank (decimal 12,2), Bestandslogik, Anzeige und Toleranzsockel auf zwei Stellen; „0,125" wurde still zu 0,13, „0.125" nach der Punkt-Regel zu 125 g.

- Migration 2026_09_09_100000: production_ingredients.quantity_used, stock_entries.ordered_quantity/received_quantity, stock_disposals.quantity → decimal(12,3); Casts decimal:3. Auf der Dev-DB (Live-Kopie) ausgeführt, 53/78/7 Zeilen unverändert.
- InventoryService::QUANTITY_DECIMALS = 3; roundWawiQuantity() ersetzt alle round(…, 2) in InventoryService, ProductionService, StockDisposalController/-Request, StockEntryRepository/-Controller, RawMaterialStockController.
- formatWawiQuantity($v, $min = 2): bis drei Stellen, mindestens zwei — Produktionsdetail, Einkauf Liste/Detail/Formular, Ausschuss-Liste, Chargen-Rest im Rohstoff-Detail.
- Eingaberegel (reFormatWawiNumber, JS parseGerman/parseNumber): zusätzlich „0.xxx" als Dezimalzahl; „1.500" bleibt 1500. Produktions-JS: fmt() bis drei Stellen, fmtInput() schreibt gespeicherte Zahlen deutsch ins Feld (1,125 statt 1.125 = 1125).
- Soll-Ist-Toleranz: Sockel 0,05 → 0,005 g; Ausschuss min 0,001.
- Doku: Hinweise (Neu/geändert), Leitfaden Version 3.1 mit Abschnitt 26, Plan V7 AP-53, README (Deploy-Checkliste, Suite 378).

Tests: QuantityPrecisionTest (6) — Parsing, Anzeige, Produktion 0,125 g exakt + Rest 9,875 g, Entwurf 1,125 wiederöffnen, Toleranz Kleinmengen, Ausschuss 0,005 g.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 15:54:29 +00:00
..
ApiOrderLogController.php Warenwirtschaft: Review-Fix — Indizes + schlanke API-Bestellungen-Seite 2026-07-20 13:02:47 +00:00
DeliveryTimeController.php Warenwirtschaft: OPT-2 Settings-CRUD-Basisklasse 2026-07-06 10:05:35 +00:00
DisposalReasonController.php Warenwirtschaft: OPT-2 Settings-CRUD-Basisklasse 2026-07-06 10:05:35 +00:00
GeneralSettingController.php Warenwirtschaft: AP-48 — Produktbestand-Buchungsgründe pflegbar, getrennt Ein/Aus 2026-08-28 09:22:32 +00:00
LocationController.php Warenwirtschaft: AP-50 — Lagerort löschbar (Buchungen übernehmen) + Köln als Default 2026-08-28 09:17:28 +00:00
MaterialQualityController.php Warenwirtschaft: OPT-2 Settings-CRUD-Basisklasse 2026-07-06 10:05:35 +00:00
NoticeController.php Warenwirtschaft: Audit-Niedrigbefunde N-2/3/4/5/7/8/9/15 2026-07-15 12:57:26 +00:00
OrderFulfillmentController.php Warenwirtschaft: F-16 — fachliche Vorbedingungen innerhalb der Sperre prüfen 2026-09-08 11:09:53 +00:00
PackagingItemController.php Warenwirtschaft: AP-51 — Lagerplatz-Felder für Produkte & Verpackung 2026-08-28 09:46:40 +00:00
PackagingMaterialController.php Warenwirtschaft: OPT-2 Settings-CRUD-Basisklasse 2026-07-06 10:05:35 +00:00
ProductDevelopmentController.php Warenwirtschaft: AP-09 bis AP-13 (Produktbestand, Set-Produkte, Ausschuss, Konzepte) 2026-06-03 11:04:22 +00:00
ProductionController.php Warenwirtschaft: AP-52 — Verpackungsvorschau mit Bestand, Differenz und Lagerort (Kundennachtrag 09.09.2026) 2026-09-09 08:48:30 +00:00
ProductStockController.php Warenwirtschaft: F-13 — Produkthistorie zeigt Kappung mit Gesamtzahl und „Alle anzeigen“ 2026-09-08 11:07:22 +00:00
RawMaterialStockController.php Warenwirtschaft: AP-53 — Gramm-Mengen mit drei Nachkommastellen (Produktion, Wareneingang, Ausschuss) 2026-09-09 15:54:29 +00:00
SettingCrudController.php Warenwirtschaft: AP-31 Löschen mit Soft-Delete + Abhängigkeitsprüfung 2026-07-15 12:31:11 +00:00
StockDisposalController.php Warenwirtschaft: AP-53 — Gramm-Mengen mit drei Nachkommastellen (Produktion, Wareneingang, Ausschuss) 2026-09-09 15:54:29 +00:00
StockEntryController.php Warenwirtschaft: AP-53 — Gramm-Mengen mit drei Nachkommastellen (Produktion, Wareneingang, Ausschuss) 2026-09-09 15:54:29 +00:00
StockMovementReasonController.php Warenwirtschaft: AP-48 — Produktbestand-Buchungsgründe pflegbar, getrennt Ein/Aus 2026-08-28 09:22:32 +00:00
StorageRoomController.php Warenwirtschaft: AP-21 INCI-Erweiterungen 2026-07-06 11:36:28 +00:00
StorageShelfController.php Warenwirtschaft: AP-21 INCI-Erweiterungen 2026-07-06 11:36:28 +00:00
StorageSlotController.php Warenwirtschaft: AP-21 INCI-Erweiterungen 2026-07-06 11:36:28 +00:00
SupplierCategoryController.php Warenwirtschaft: OPT-2 Settings-CRUD-Basisklasse 2026-07-06 10:05:35 +00:00
SupplierController.php Warenwirtschaft: AP-31 Löschen mit Soft-Delete + Abhängigkeitsprüfung 2026-07-15 12:31:11 +00:00
TaxRateController.php Warenwirtschaft: OPT-2 Settings-CRUD-Basisklasse 2026-07-06 10:05:35 +00:00