Various fixes for DB seeding
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user