Updates for check data script
This commit is contained in:
parent
789a3d0ca7
commit
c37318c2cc
|
|
@ -970,14 +970,14 @@ class CheckData extends Command
|
||||||
public function checkClientSettings()
|
public function checkClientSettings()
|
||||||
{
|
{
|
||||||
if ($this->option('fix') == 'true') {
|
if ($this->option('fix') == 'true') {
|
||||||
Client::query()->whereNull('country_id')->orWhere('country_id', 0)->cursor()->each(function ($client) {
|
Client::query()->withTrashed()->whereNull('country_id')->orWhere('country_id', 0)->cursor()->each(function ($client) {
|
||||||
$client->country_id = $client->company->settings->country_id;
|
$client->country_id = $client->company->settings->country_id;
|
||||||
$client->saveQuietly();
|
$client->saveQuietly();
|
||||||
|
|
||||||
$this->logMessage("Fixing country for # {$client->id}");
|
$this->logMessage("Fixing country for # {$client->id}");
|
||||||
});
|
});
|
||||||
|
|
||||||
Client::query()->whereNull("settings->currency_id")->orWhereJsonContains('settings', ['currency_id' => ''])->cursor()->each(function ($client) {
|
Client::query()->withTrashed()->whereNull("settings->currency_id")->orWhereJsonContains('settings', ['currency_id' => ''])->cursor()->each(function ($client) {
|
||||||
$settings = $client->settings;
|
$settings = $client->settings;
|
||||||
$settings->currency_id = (string)$client->company->settings->currency_id;
|
$settings->currency_id = (string)$client->company->settings->currency_id;
|
||||||
$client->settings = $settings;
|
$client->settings = $settings;
|
||||||
|
|
@ -987,7 +987,7 @@ class CheckData extends Command
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Payment::withTrashed()->where('exchange_rate', 0)->cursor()->each(function ($payment) {
|
Payment::withTrashed()->withTrashed()->where('exchange_rate', 0)->cursor()->each(function ($payment) {
|
||||||
$payment->exchange_rate = 1;
|
$payment->exchange_rate = 1;
|
||||||
$payment->saveQuietly();
|
$payment->saveQuietly();
|
||||||
|
|
||||||
|
|
@ -1000,11 +1000,11 @@ class CheckData extends Command
|
||||||
})
|
})
|
||||||
->cursor()
|
->cursor()
|
||||||
->each(function ($p) {
|
->each(function ($p) {
|
||||||
$p->currency_id = $p->client->settings->currency_id;
|
$p->currency_id = $p->client->settings->currency_id ?? $p->company->settings->currency_id;
|
||||||
$p->saveQuietly();
|
$p->saveQuietly();
|
||||||
|
|
||||||
|
|
||||||
$this->logMessage("Fixing currency for # {$p->id}");
|
$this->logMessage("Fixing currency for # {$p->id} with new currency {$p->currency_id}");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -1015,7 +1015,7 @@ class CheckData extends Command
|
||||||
$c->subdomain = MultiDB::randomSubdomainGenerator();
|
$c->subdomain = MultiDB::randomSubdomainGenerator();
|
||||||
$c->save();
|
$c->save();
|
||||||
|
|
||||||
$this->logMessage("Fixing subdomain for # {$c->id}");
|
$this->logMessage("Fixing subdomain for # {$c->id} with new subdomain {$c->subdomain}");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -1076,7 +1076,7 @@ class CheckData extends Command
|
||||||
public function checkVendorSettings()
|
public function checkVendorSettings()
|
||||||
{
|
{
|
||||||
if ($this->option('fix') == 'true') {
|
if ($this->option('fix') == 'true') {
|
||||||
Vendor::query()->whereNull('currency_id')->orWhere('currency_id', '')->cursor()->each(function ($vendor) {
|
Vendor::query()->withTrashed()->whereNull('currency_id')->orWhere('currency_id', '')->cursor()->each(function ($vendor) {
|
||||||
$vendor->currency_id = $vendor->company->settings->currency_id;
|
$vendor->currency_id = $vendor->company->settings->currency_id;
|
||||||
$vendor->saveQuietly();
|
$vendor->saveQuietly();
|
||||||
|
|
||||||
|
|
@ -1174,7 +1174,7 @@ class CheckData extends Command
|
||||||
$bt->invoice_ids = collect($bt->payment->invoices)->pluck('hashed_id')->implode(',');
|
$bt->invoice_ids = collect($bt->payment->invoices)->pluck('hashed_id')->implode(',');
|
||||||
$bt->save();
|
$bt->save();
|
||||||
|
|
||||||
$this->logMessage("Fixing - {$bt->id}");
|
$this->logMessage("Fixing - {$bt->id} with new invoice IDs {$bt->invoice_ids}");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1195,7 +1195,7 @@ class CheckData extends Command
|
||||||
$c->send_email = false;
|
$c->send_email = false;
|
||||||
$c->saveQuietly();
|
$c->saveQuietly();
|
||||||
|
|
||||||
$this->logMessage("Fixing - {$c->id}");
|
$this->logMessage("Fixing - {$c->id} with new send email {$c->send_email}");
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1234,11 +1234,11 @@ class CheckData extends Command
|
||||||
|
|
||||||
if ($this->option('fix') == 'true') {
|
if ($this->option('fix') == 'true') {
|
||||||
|
|
||||||
$p->cursor()->each(function ($c) {
|
$p->cursor()->each(function ($payment) {
|
||||||
$c->currency_id = $c->client->settings->currency_id ?? $c->company->settings->currency_id;
|
$payment->currency_id = $payment->client->settings->currency_id ?? $payment->company->settings->currency_id;
|
||||||
$c->saveQuietly();
|
$payment->saveQuietly();
|
||||||
|
|
||||||
$this->logMessage("Fixing - {$c->id}");
|
$this->logMessage("Fixing payment ID - {$payment->id} with new currency {$payment->currency_id}");
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -619,7 +619,7 @@ class ClientTest extends TestCase
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => $this->faker->unique()->safeEmail(),
|
'contacts' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
];
|
];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -674,7 +674,7 @@ class ClientTest extends TestCase
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
['email' => $this->faker->unique()->safeEmail()],
|
['email' => \Illuminate\Support\Str::random(32)."@example.com"],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -690,7 +690,7 @@ class ClientTest extends TestCase
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
'password' => '*****',
|
'password' => '*****',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -706,7 +706,7 @@ class ClientTest extends TestCase
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
'password' => '1',
|
'password' => '1',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -728,7 +728,7 @@ class ClientTest extends TestCase
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
'password' => '1Qajsj...33',
|
'password' => '1Qajsj...33',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -751,11 +751,11 @@ class ClientTest extends TestCase
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
'password' => '1Qajsj...33',
|
'password' => '1Qajsj...33',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
'password' => '1234AAAAAaaaaa',
|
'password' => '1234AAAAAaaaaa',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -786,7 +786,7 @@ class ClientTest extends TestCase
|
||||||
|
|
||||||
$arr = $response->json();
|
$arr = $response->json();
|
||||||
|
|
||||||
$safe_email = $this->faker->unique()->safeEmail();
|
$safe_email = \Illuminate\Support\Str::random(32)."@example.com";
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
|
|
@ -820,7 +820,7 @@ class ClientTest extends TestCase
|
||||||
|
|
||||||
$this->assertEquals(0, strlen($contact->password));
|
$this->assertEquals(0, strlen($contact->password));
|
||||||
|
|
||||||
$safe_email = $this->faker->unique()->safeEmail();
|
$safe_email = \Illuminate\Support\Str::random(32)."@example.com";
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ class ArDetailReportTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ class ArSummaryReportTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ class ClientBalanceReportTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ class ClientSalesReportTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ class ProductSalesReportTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ class ProfitAndLossReportTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ class ReportCsvGenerationTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ class UserSalesReportTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@ class InventoryManagementTest extends TestCase
|
||||||
|
|
||||||
public function testInventoryMovements()
|
public function testInventoryMovements()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
config(['queue.default' => 'sync']);
|
||||||
|
|
||||||
$product = Product::factory()->create([
|
$product = Product::factory()->create([
|
||||||
'user_id' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'company_id' => $this->company->id,
|
'company_id' => $this->company->id,
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ class MultiPaymentDeleteTest extends TestCase
|
||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'confirmation_code' => '11',
|
'confirmation_code' => '11',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$cu = CompanyUserFactory::create($user->id, $company->id, $account->id);
|
$cu = CompanyUserFactory::create($user->id, $company->id, $account->id);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ class QuoteReminderTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if(!$settings) {
|
if(!$settings) {
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ class ReminderTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if(!$settings) {
|
if(!$settings) {
|
||||||
|
|
@ -295,7 +295,7 @@ class ReminderTest extends TestCase
|
||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class UserTest extends TestCase
|
||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user->password = \Illuminate\Support\Facades\Hash::make('ALongAndBriliantPassword');
|
$user->password = \Illuminate\Support\Facades\Hash::make('ALongAndBriliantPassword');
|
||||||
|
|
@ -204,7 +204,7 @@ class UserTest extends TestCase
|
||||||
|
|
||||||
$data = $user->toArray();
|
$data = $user->toArray();
|
||||||
|
|
||||||
$data['email'] = $this->faker->unique()->safeEmail();
|
$data['email'] = \Illuminate\Support\Str::random(32)."@example.com";
|
||||||
unset($data['password']);
|
unset($data['password']);
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
|
@ -357,7 +357,7 @@ class UserTest extends TestCase
|
||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
'password' => \Illuminate\Support\Facades\Hash::make('ALongAndBriliantPassword'),
|
'password' => \Illuminate\Support\Facades\Hash::make('ALongAndBriliantPassword'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class StorecoveRouterTest extends TestCase
|
||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
'password' => \Illuminate\Support\Facades\Hash::make('ALongAndBriliantPassword'),
|
'password' => \Illuminate\Support\Facades\Hash::make('ALongAndBriliantPassword'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1018,7 +1018,7 @@ $this->assertTrue(in_array($item->tax_id, ['1','2']));
|
||||||
$settings->state = 'Lazio';
|
$settings->state = 'Lazio';
|
||||||
$settings->postal_code = '00187';
|
$settings->postal_code = '00187';
|
||||||
$settings->phone = '06 1234567';
|
$settings->phone = '06 1234567';
|
||||||
$settings->email = $this->faker->unique()->safeEmail();
|
$settings->email = \Illuminate\Support\Str::random(32)."@example.com";
|
||||||
$settings->country_id = '380'; // Italy's ISO country code
|
$settings->country_id = '380'; // Italy's ISO country code
|
||||||
$settings->vat_number = 'IT92443356490'; // Italian VAT number
|
$settings->vat_number = 'IT92443356490'; // Italian VAT number
|
||||||
$settings->id_number = 'RM 123456'; // Typical Italian company registration format
|
$settings->id_number = 'RM 123456'; // Typical Italian company registration format
|
||||||
|
|
@ -1181,7 +1181,7 @@ $this->assertTrue(in_array($item->tax_id, ['1','2']));
|
||||||
$settings->state = 'Berlin';
|
$settings->state = 'Berlin';
|
||||||
$settings->postal_code = '10115';
|
$settings->postal_code = '10115';
|
||||||
$settings->phone = '030 1234567';
|
$settings->phone = '030 1234567';
|
||||||
$settings->email = $this->faker->unique()->safeEmail();
|
$settings->email = \Illuminate\Support\Str::random(32)."@example.com";
|
||||||
$settings->country_id = '276'; // Germany's ISO country code
|
$settings->country_id = '276'; // Germany's ISO country code
|
||||||
$settings->vat_number = 'DE123456789';
|
$settings->vat_number = 'DE123456789';
|
||||||
$settings->id_number = 'HRB 98765';
|
$settings->id_number = 'HRB 98765';
|
||||||
|
|
@ -1289,7 +1289,7 @@ $this->assertTrue(in_array($item->tax_id, ['1','2']));
|
||||||
$settings->state = 'Madrid';
|
$settings->state = 'Madrid';
|
||||||
$settings->postal_code = '28013';
|
$settings->postal_code = '28013';
|
||||||
$settings->phone = '030 1234567';
|
$settings->phone = '030 1234567';
|
||||||
$settings->email = $this->faker->unique()->safeEmail();
|
$settings->email = \Illuminate\Support\Str::random(32)."@example.com";
|
||||||
$settings->country_id = '724'; // Germany's ISO country code
|
$settings->country_id = '724'; // Germany's ISO country code
|
||||||
$settings->vat_number = 'ESB16645678';
|
$settings->vat_number = 'ESB16645678';
|
||||||
$settings->id_number = 'HRB 12345';
|
$settings->id_number = 'HRB 12345';
|
||||||
|
|
@ -1397,7 +1397,7 @@ $this->assertTrue(in_array($item->tax_id, ['1','2']));
|
||||||
$settings->state = 'Île-de-France';
|
$settings->state = 'Île-de-France';
|
||||||
$settings->postal_code = '75002';
|
$settings->postal_code = '75002';
|
||||||
$settings->phone = '01 23456789';
|
$settings->phone = '01 23456789';
|
||||||
$settings->email = $this->faker->unique()->safeEmail();
|
$settings->email = \Illuminate\Support\Str::random(32)."@example.com";
|
||||||
$settings->country_id = '250'; // France's ISO country code
|
$settings->country_id = '250'; // France's ISO country code
|
||||||
$settings->vat_number = 'FR82345678911';
|
$settings->vat_number = 'FR82345678911';
|
||||||
$settings->id_number = '12345678900010';
|
$settings->id_number = '12345678900010';
|
||||||
|
|
@ -1508,7 +1508,7 @@ $this->assertTrue(in_array($item->tax_id, ['1','2']));
|
||||||
$settings->state = 'Vienna';
|
$settings->state = 'Vienna';
|
||||||
$settings->postal_code = '1010';
|
$settings->postal_code = '1010';
|
||||||
$settings->phone = '+43 1 23456789';
|
$settings->phone = '+43 1 23456789';
|
||||||
$settings->email = $this->faker->unique()->safeEmail();
|
$settings->email = \Illuminate\Support\Str::random(32)."@example.com";
|
||||||
$settings->country_id = '40'; // Austria's ISO country code
|
$settings->country_id = '40'; // Austria's ISO country code
|
||||||
$settings->vat_number = 'ATU92335648';
|
$settings->vat_number = 'ATU92335648';
|
||||||
$settings->id_number = 'FN 123456x';
|
$settings->id_number = 'FN 123456x';
|
||||||
|
|
@ -1617,7 +1617,7 @@ $this->assertTrue(in_array($item->tax_id, ['1','2']));
|
||||||
$settings->state = 'Bucharest';
|
$settings->state = 'Bucharest';
|
||||||
$settings->postal_code = '010101';
|
$settings->postal_code = '010101';
|
||||||
$settings->phone = '021 1234567';
|
$settings->phone = '021 1234567';
|
||||||
$settings->email = $this->faker->unique()->safeEmail();
|
$settings->email = \Illuminate\Support\Str::random(32)."@example.com";
|
||||||
$settings->country_id = '642'; // Romania's ISO country code
|
$settings->country_id = '642'; // Romania's ISO country code
|
||||||
$settings->vat_number = 'RO92443356490'; // Romanian VAT number format
|
$settings->vat_number = 'RO92443356490'; // Romanian VAT number format
|
||||||
$settings->id_number = 'B12345678'; // Typical Romanian company registration format
|
$settings->id_number = 'B12345678'; // Typical Romanian company registration format
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ trait MockUnitData
|
||||||
|
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->company = Company::factory()->create([
|
$this->company = Company::factory()->create([
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class CheckDataTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
@ -182,12 +182,12 @@ class CheckDataTest extends TestCase
|
||||||
|
|
||||||
User::factory()->create([
|
User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
User::factory()->create([
|
User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user_hash = 'a';
|
$user_hash = 'a';
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ class InvoiceMarkPaidTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ class LateFeeTest extends TestCase
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail(),
|
'email' => \Illuminate\Support\Str::random(32)."@example.com",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->company = Company::factory()->create([
|
$this->company = Company::factory()->create([
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class RecurringExpenseCloneTest extends TestCase
|
||||||
public function testBadBase64String()
|
public function testBadBase64String()
|
||||||
{
|
{
|
||||||
$account = Account::factory()->create();
|
$account = Account::factory()->create();
|
||||||
$user = User::factory()->create(['account_id' => $account->id, 'email' => $this->faker->unique()->safeEmail()]);
|
$user = User::factory()->create(['account_id' => $account->id, 'email' => \Illuminate\Support\Str::random(32)."@example.com"]);
|
||||||
$company = Company::factory()->create(['account_id' => $account->id]);
|
$company = Company::factory()->create(['account_id' => $account->id]);
|
||||||
|
|
||||||
$client = Client::factory()->create([
|
$client = Client::factory()->create([
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue