Various fixes for DB seeding

This commit is contained in:
2025-12-04 22:37:16 +01:00
parent 0200c38f30
commit b7a880d66a
12 changed files with 71 additions and 75 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ public static function generateCustomerNumber()
// DATEV standard
$randomNumber = rand(10000, 69999);
$customer = Customer::firstWhere('customer_nr', $randomNumber);
if ($customer) {
if ($customer || Customer::count() === 0) {
return $randomNumber;
}
}