Add LineItem CSV import and fix Unit API

This commit is contained in:
2025-12-08 13:20:52 +01:00
parent ee6525b549
commit 7ddf1337c1
12 changed files with 437 additions and 59 deletions
@@ -18,10 +18,13 @@ public function up(): void
$table->boolean('is_section')->default(false);
$table->string('title')->nullable();
$table->string('description')->nullable();
$table->integer('quantity')->default(1);
$table->decimal('quantity')->default(1);
$table->foreignId('unit_id')->nullable()->constrained()->nullOnDelete();
$table->decimal('price', 10, 2)->nullable();
$table->timestamps();
$table->index('position');
$table->index('invoice_id');
});
}
+1 -1
View File
@@ -9,7 +9,7 @@ class UnitSeeder extends Seeder
{
public function run(): void
{
Unit::create(['name' => 'Stück', 'symbol' => 'Stk']);
Unit::create(['name' => 'Stück', 'symbol' => 'Stk.']);
Unit::create(['name' => 'Stunden', 'symbol' => 'h']);
Unit::create(['name' => 'Tage', 'symbol' => 'd']);
Unit::create(['name' => 'pauschal', 'symbol' => 'p']);