Warenwirtschaft: F-08 — Füllgewicht mit Nachkommastellen
fill_weight decimal(10,3) + float-Cast; deutsche Eingabe normalisiert, positiv validiert, Fehler im Formular sichtbar. Tests für F-07/F-08. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
fd1572df35
commit
2796b1103e
5 changed files with 114 additions and 2 deletions
|
|
@ -532,7 +532,10 @@
|
|||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="form-label" for="fill_weight">{{ __('Füllgewicht (g) – für Produktion') }}</label>
|
||||
{{ Form::text('fill_weight', $product->fill_weight, ['placeholder' => __('leer = Menge = Gramm (1 g/ml)'), 'class' => 'form-control', 'id' => 'fill_weight']) }}
|
||||
{{ Form::text('fill_weight', $product->fill_weight !== null ? rtrim(rtrim(number_format((float) $product->fill_weight, 3, ',', '.'), '0'), ',') : null, ['placeholder' => __('leer = Menge = Gramm (1 g/ml)'), 'class' => 'form-control'.($errors->has('fill_weight') ? ' is-invalid' : ''), 'id' => 'fill_weight', 'inputmode' => 'decimal']) }}
|
||||
@error('fill_weight')
|
||||
<div class="invalid-feedback">{{ $message }}</div>
|
||||
@enderror
|
||||
<small class="form-text text-muted">{{ __('Basis für die Rezeptur-Mengenberechnung (Prozent × Füllgewicht).') }}</small>
|
||||
</div>
|
||||
<div class="form-group col-sm-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue