Make markdown support in invoices optional

This commit is contained in:
David Bomba 2021-08-08 08:27:53 +10:00
parent 2ec4adc4c8
commit 659b955862
3 changed files with 32 additions and 0 deletions

View File

@ -50,6 +50,7 @@ class Company extends BaseModel
protected $presenter = CompanyPresenter::class;
protected $fillable = [
'markdown_enabled',
'calculate_expense_tax_by_amount',
'invoice_expense_documents',
'invoice_task_documents',

View File

@ -159,6 +159,7 @@ class CompanyTransformer extends EntityTransformer
'default_password_timeout' => (int) $company->default_password_timeout,
'invoice_task_datelog' => (bool) $company->invoice_task_datelog,
'show_task_end_date' => (bool) $company->show_task_end_date,
'markdown_enabled' => (bool) $company->markdown_enabled,
];
}

View File

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddMarkdownEnabledColumnToCompaniesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('companies', function (Blueprint $table) {
$table->boolean('markdown_enabled')->default(1);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}