Various fixes for DB seeding

This commit is contained in:
vollstock committed 2025-12-04 22:37:16 +01:00
1 parent 0200c38f30
commit b7a880d66a
12 files changed
+71 -75

No files matched your search

+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;
}
}