13-05-2026 Waren Wirtschaft

This commit is contained in:
Kevin Adametz 2026-05-13 18:09:20 +02:00
parent 9ce711d6b2
commit ca3eb663fe
40 changed files with 1000 additions and 189 deletions

View file

@ -247,7 +247,7 @@ test('packaging items full CRUD as admin', function () {
'packaging_material_id' => (string) $material->id,
'supplier_id' => '',
'name' => 'CRUD-Verpack-Art-upd',
'category' => 'label',
'category' => 'shipping',
'weight_grams' => '5',
'min_stock_alert' => '',
'product_id' => '',
@ -256,7 +256,7 @@ test('packaging items full CRUD as admin', function () {
$item->refresh();
expect($item->name)->toBe('CRUD-Verpack-Art-upd');
expect($item->category)->toBe('label');
expect($item->category)->toBe('shipping');
expect($item->supplier_id)->toBeNull();
expect($item->product_id)->toBeNull();

View file

@ -82,6 +82,7 @@ test('admin creates pending stock entry with unit gram', function () {
$ingredient = phase3MakeIngredient();
$location = Location::factory()->create();
$supplier = Supplier::factory()->create();
$quality = MaterialQuality::factory()->create();
$this->actingAs($admin, 'user');
@ -90,6 +91,7 @@ test('admin creates pending stock entry with unit gram', function () {
'ingredient_id' => (string) $ingredient->id,
'supplier_id' => (string) $supplier->id,
'location_id' => (string) $location->id,
'quality_id' => (string) $quality->id,
'ordered_at' => '2026-03-27',
'ordered_quantity' => '1000',
'price_per_kg' => '12,50',
@ -180,6 +182,7 @@ test('listForIndex sorts pending before received', function () {
$ingredient = phase3MakeIngredient();
$location = Location::factory()->create();
$supplier = Supplier::factory()->create();
$quality = MaterialQuality::factory()->create();
$this->actingAs($admin, 'user');
@ -188,6 +191,7 @@ test('listForIndex sorts pending before received', function () {
'ingredient_id' => (string) $ingredient->id,
'supplier_id' => (string) $supplier->id,
'location_id' => (string) $location->id,
'quality_id' => (string) $quality->id,
'ordered_at' => '2026-01-01',
'ordered_quantity' => '100',
'price_per_kg' => '1',
@ -198,6 +202,7 @@ test('listForIndex sorts pending before received', function () {
'ingredient_id' => (string) $ingredient->id,
'supplier_id' => (string) $supplier->id,
'location_id' => (string) $location->id,
'quality_id' => (string) $quality->id,
'ordered_at' => '2026-06-01',
'ordered_quantity' => '200',
'price_per_kg' => '1',

View file

@ -30,7 +30,7 @@ test('product saves packaging bom quantities and order', function () {
'packaging_material_id' => $material->id,
'supplier_id' => $supplier->id,
'name' => 'Etikett',
'category' => 'label',
'category' => 'shipping',
'weight_grams' => 1.5,
]);