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:
Kevin Adametz 2026-09-08 10:59:48 +00:00
parent fd1572df35
commit 2796b1103e
5 changed files with 114 additions and 2 deletions

View file

@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Prüfung 08.09.2026 F-08: Füllgewicht mit Nachkommastellen (z. B. 50 ml × 0,79 = 39,5 g).
* Als Integer wurde 39,5 zu 39 und die gesamte Rezepturskalierung wich ab.
*/
return new class extends Migration
{
public function up(): void
{
Schema::table('products', function (Blueprint $table) {
$table->decimal('fill_weight', 10, 3)->nullable()->change();
});
}
public function down(): void
{
Schema::table('products', function (Blueprint $table) {
$table->integer('fill_weight')->nullable()->change();
});
}
};