mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01: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 = [
|
protected array $tax_coverage_countries = [
|
||||||
'US',
|
'US',
|
||||||
// //EU countries
|
// //EU countries
|
||||||
// 'AT', // Austria
|
'AT', // Austria
|
||||||
// 'BE', // Belgium
|
// 'BE', // Belgium
|
||||||
// 'BG', // Bulgaria
|
// 'BG', // Bulgaria
|
||||||
// 'CY', // Cyprus
|
// 'CY', // Cyprus
|
||||||
// 'CZ', // Czech Republic
|
// 'CZ', // Czech Republic
|
||||||
// 'DE', // Germany
|
'DE', // Germany
|
||||||
// 'DK', // Denmark
|
// 'DK', // Denmark
|
||||||
// 'EE', // Estonia
|
// 'EE', // Estonia
|
||||||
// 'ES', // Spain
|
// 'ES', // Spain
|
||||||
@ -269,9 +269,12 @@ class Company extends BaseModel
|
|||||||
// 'SI', // Slovenia
|
// 'SI', // Slovenia
|
||||||
// 'SK', // Slovakia
|
// 'SK', // Slovakia
|
||||||
// //EU Countries
|
// //EU Countries
|
||||||
|
'AU', // Australia
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
|
'invoice_task_item_description',
|
||||||
|
'invoice_task_project_header',
|
||||||
'invoice_task_hours',
|
'invoice_task_hours',
|
||||||
'markdown_enabled',
|
'markdown_enabled',
|
||||||
'calculate_expense_tax_by_amount',
|
'calculate_expense_tax_by_amount',
|
||||||
|
@ -201,6 +201,8 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'tax_data' => $company->tax_data ?: new \stdClass,
|
'tax_data' => $company->tax_data ?: new \stdClass,
|
||||||
'has_e_invoice_certificate' => $company->e_invoice_certificate ? true : false,
|
'has_e_invoice_certificate' => $company->e_invoice_certificate ? true : false,
|
||||||
'has_e_invoice_certificate_passphrase' => $company->e_invoice_certificate_passphrase ? 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