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

@ -81,25 +81,9 @@ class StockEntryFactory extends Factory
});
}
public function label(): static
public function shipping(): static
{
return $this->state(function () {
$supplier = Supplier::factory()->create();
$item = PackagingItem::factory()->create([
'supplier_id' => $supplier->id,
'category' => 'label',
]);
return [
'entry_type' => 'label',
'ingredient_id' => null,
'packaging_item_id' => $item->id,
'supplier_id' => $supplier->id,
'unit' => 'piece',
'price_per_kg' => null,
'price_total' => $this->faker->randomFloat(4, 5, 800),
];
});
return $this->shippingOffice();
}
public function shippingOffice(): static
@ -108,11 +92,11 @@ class StockEntryFactory extends Factory
$supplier = Supplier::factory()->create();
$item = PackagingItem::factory()->create([
'supplier_id' => $supplier->id,
'category' => 'shipping_office',
'category' => 'shipping',
]);
return [
'entry_type' => 'shipping_office',
'entry_type' => 'shipping',
'ingredient_id' => null,
'packaging_item_id' => $item->id,
'supplier_id' => $supplier->id,