Add new column for invoice_task_project

This commit is contained in:
David Bomba 2022-08-25 08:00:52 +10:00
parent 0a5e0e2ee6
commit 7d01295168
3 changed files with 33 additions and 0 deletions

View File

@ -120,6 +120,7 @@ class Company extends BaseModel
'inventory_notification_threshold', 'inventory_notification_threshold',
'stock_notification', 'stock_notification',
'enabled_expense_tax_rates', 'enabled_expense_tax_rates',
'invoice_task_project',
]; ];
protected $hidden = [ protected $hidden = [

View File

@ -178,6 +178,7 @@ class CompanyTransformer extends EntityTransformer
'track_inventory' => (bool) $company->track_inventory, 'track_inventory' => (bool) $company->track_inventory,
'enable_applying_payments' => (bool) $company->enable_applying_payments, 'enable_applying_payments' => (bool) $company->enable_applying_payments,
'enabled_expense_tax_rates' => (int) $company->enabled_expense_tax_rates, 'enabled_expense_tax_rates' => (int) $company->enabled_expense_tax_rates,
'invoice_task_project' => (bool) $company->invoice_task_project,
]; ];
} }

View File

@ -0,0 +1,31 @@
<?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 (Blueprint $table) {
$table->boolean('invoice_task_project')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};