diff --git a/app/Console/Commands/DemoMode.php b/app/Console/Commands/DemoMode.php index 4cd84e8656..6e62da7eff 100644 --- a/app/Console/Commands/DemoMode.php +++ b/app/Console/Commands/DemoMode.php @@ -103,7 +103,7 @@ class DemoMode extends Command 'enabled_modules' => 4095, ]); - $settings = $company->settings; + $settings = $company->settings; $settings->name = $faker->company; $settings->address1 = $faker->buildingNumber; @@ -112,11 +112,11 @@ class DemoMode extends Command $settings->state = $faker->state; $settings->postal_code = $faker->postcode; $settings->website = $faker->url; - $settings->vat_number = $faker->numberBetween(123456789, 987654321); - $settings->phone = $faker->phoneNumber; + $settings->vat_number = (string)$faker->numberBetween(123456789, 987654321); + $settings->phone = (string)$faker->phoneNumber; - $company->settings = $settings; - $company->save(); + $company->settings = $settings; + $company->save(); $account->default_company_id = $company->id; $account->save(); diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 179c877ac5..65c98a14a3 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -27,7 +27,7 @@ class CompanySettings extends BaseSettings public $auto_archive_invoice = false; public $lock_sent_invoices = false; - //public $lock_invoices = 'off'; //off,when_sent,when_paid + public $lock_invoices = 'off'; //off,when_sent,when_paid public $enable_client_portal_tasks = false; public $enable_client_portal_password = false; @@ -238,7 +238,7 @@ class CompanySettings extends BaseSettings public $client_portal_privacy_policy = ''; public static $casts = [ - // 'lock_invoices' => 'string', + 'lock_invoices' => 'string', 'client_portal_terms' => 'string', 'client_portal_privacy_policy' => 'string', 'client_can_register' => 'bool',