mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 00:11:35 +02:00
Additional migrations for the company table
This commit is contained in:
parent
6a59102a90
commit
6c8038da13
@ -241,12 +241,12 @@ class Company extends BaseModel
|
||||
protected array $tax_coverage_countries = [
|
||||
'US',
|
||||
// //EU countries
|
||||
// 'AT', // Austria
|
||||
'AT', // Austria
|
||||
// 'BE', // Belgium
|
||||
// 'BG', // Bulgaria
|
||||
// 'CY', // Cyprus
|
||||
// 'CZ', // Czech Republic
|
||||
// 'DE', // Germany
|
||||
'DE', // Germany
|
||||
// 'DK', // Denmark
|
||||
// 'EE', // Estonia
|
||||
// 'ES', // Spain
|
||||
@ -269,9 +269,12 @@ class Company extends BaseModel
|
||||
// 'SI', // Slovenia
|
||||
// 'SK', // Slovakia
|
||||
// //EU Countries
|
||||
'AU', // Australia
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'invoice_task_item_description',
|
||||
'invoice_task_project_header',
|
||||
'invoice_task_hours',
|
||||
'markdown_enabled',
|
||||
'calculate_expense_tax_by_amount',
|
||||
|
@ -201,6 +201,8 @@ class CompanyTransformer extends EntityTransformer
|
||||
'tax_data' => $company->tax_data ?: new \stdClass,
|
||||
'has_e_invoice_certificate' => $company->e_invoice_certificate ? true : false,
|
||||
'has_e_invoice_certificate_passphrase' => $company->e_invoice_certificate_passphrase ? true : false,
|
||||
'invoice_task_project_header' => (bool) $company->invoice_task_project_header,
|
||||
'invoice_task_item_description' => (bool) $company->invoice_task_item_description,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('companies', function (Illuminate\Database\Schema\Blueprint $table) {
|
||||
$table->boolean('invoice_task_project_header')->default(true);
|
||||
$table->boolean('invoice_task_item_description')->default(true);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user