Warenwirtschaft: N-6 — Punkt mit 1-2 Nachkommastellen = Dezimaltrenner (Kundenentscheid 15.07.2026)

Neuer Helper reFormatWawiNumber(): '5.1'/'5.12' werden als 5,1/5,12
gelesen (kommt beim Kopieren von Daten vor); '1.500' bleibt Tausender.
Gilt nur für die WaWi-Eingaben (Mengen, Preise, Gewichte, Rezeptur) —
reFormatNumber() app-weit unverändert. JS-Parser (parseGerman,
parseDeNumber) auf dieselbe Regel vereinheitlicht; parseDeNumber
behandelte '1.500' bisher sogar als 1,5.

Tests: +1 (Parsing-Matrix).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-15 13:25:35 +00:00
parent 9b6c9def97
commit 016e8bbbd8
11 changed files with 60 additions and 31 deletions

View file

@ -49,10 +49,10 @@ class UpdateStockEntryRequest extends FormRequest
protected function prepareForValidation(): void
{
$this->merge([
'ordered_quantity' => reFormatNumber($this->input('ordered_quantity')),
'price_per_kg' => $this->filled('price_per_kg') ? reFormatNumber($this->input('price_per_kg')) : null,
'price_per_kg_gross' => $this->filled('price_per_kg_gross') ? reFormatNumber($this->input('price_per_kg_gross')) : null,
'price_total' => $this->filled('price_total') ? reFormatNumber($this->input('price_total')) : null,
'ordered_quantity' => reFormatWawiNumber($this->input('ordered_quantity')),
'price_per_kg' => $this->filled('price_per_kg') ? reFormatWawiNumber($this->input('price_per_kg')) : null,
'price_per_kg_gross' => $this->filled('price_per_kg_gross') ? reFormatWawiNumber($this->input('price_per_kg_gross')) : null,
'price_total' => $this->filled('price_total') ? reFormatWawiNumber($this->input('price_total')) : null,
]);
}