mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Minor fixes
This commit is contained in:
parent
ff1e650957
commit
76b2e2290d
@ -103,7 +103,7 @@ class Response
|
||||
public function __construct($data)
|
||||
{
|
||||
if(!$data)
|
||||
return;
|
||||
return $this;
|
||||
|
||||
foreach($data as $key => $value){
|
||||
$this->{$key} = $value;
|
||||
|
@ -11,12 +11,13 @@
|
||||
|
||||
namespace App\Factory;
|
||||
|
||||
use App\DataMapper\ClientRegistrationFields;
|
||||
use App\DataMapper\CompanySettings;
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Models\Company;
|
||||
use App\Utils\Ninja;
|
||||
use App\Models\Company;
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\DataMapper\Tax\TaxModel;
|
||||
use App\DataMapper\CompanySettings;
|
||||
use App\DataMapper\ClientRegistrationFields;
|
||||
|
||||
class CompanyFactory
|
||||
{
|
||||
@ -48,7 +49,8 @@ class CompanyFactory
|
||||
$company->default_password_timeout = 1800000;
|
||||
$company->markdown_email_enabled = true;
|
||||
$company->markdown_enabled = false;
|
||||
|
||||
$company->tax_data = new TaxModel();
|
||||
|
||||
return $company;
|
||||
}
|
||||
}
|
||||
|
@ -11,13 +11,14 @@
|
||||
|
||||
namespace App\Jobs\Company;
|
||||
|
||||
use App\DataMapper\ClientRegistrationFields;
|
||||
use App\DataMapper\CompanySettings;
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Models\Company;
|
||||
use App\Utils\Ninja;
|
||||
use App\Models\Company;
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\DataMapper\Tax\TaxModel;
|
||||
use App\DataMapper\CompanySettings;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use App\DataMapper\ClientRegistrationFields;
|
||||
|
||||
class CreateCompany
|
||||
{
|
||||
@ -65,6 +66,7 @@ class CreateCompany
|
||||
$company->client_registration_fields = ClientRegistrationFields::generate();
|
||||
$company->markdown_email_enabled = true;
|
||||
$company->markdown_enabled = false;
|
||||
$company->tax_data = new TaxModel();
|
||||
|
||||
if (Ninja::isHosted()) {
|
||||
$company->subdomain = MultiDB::randomSubdomainGenerator();
|
||||
|
@ -11,8 +11,9 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\DataMapper\CompanySettings;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\DataMapper\Tax\TaxModel;
|
||||
use App\DataMapper\CompanySettings;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class CompanyFactory extends Factory
|
||||
@ -38,6 +39,7 @@ class CompanyFactory extends Factory
|
||||
'custom_fields' => (object) [
|
||||
],
|
||||
'company_key' => $this->createHash(),
|
||||
'tax_data' => new TaxModel(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Company;
|
||||
use App\Models\Language;
|
||||
use App\DataMapper\Tax\TaxModel;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
@ -26,7 +29,10 @@ return new class extends Migration
|
||||
$table->dropColumn('enable_e_invoice');
|
||||
});
|
||||
|
||||
|
||||
Company::query()->cursor()->each(function ($company){
|
||||
$company->tax_data = new TaxModel();
|
||||
$company->save();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user