From 659b9558628906081463a756801eb255bd8a4516 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 8 Aug 2021 08:27:53 +1000 Subject: [PATCH] Make markdown support in invoices optional --- app/Models/Company.php | 1 + app/Transformers/CompanyTransformer.php | 1 + ...down_enabled_column_to_companies_table.php | 30 +++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 database/migrations/2021_08_07_222435_add_markdown_enabled_column_to_companies_table.php diff --git a/app/Models/Company.php b/app/Models/Company.php index 653bd5497070..2878cd0446fe 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -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', diff --git a/app/Transformers/CompanyTransformer.php b/app/Transformers/CompanyTransformer.php index ecbfe1a4063b..79bb8ceda245 100644 --- a/app/Transformers/CompanyTransformer.php +++ b/app/Transformers/CompanyTransformer.php @@ -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, ]; } diff --git a/database/migrations/2021_08_07_222435_add_markdown_enabled_column_to_companies_table.php b/database/migrations/2021_08_07_222435_add_markdown_enabled_column_to_companies_table.php new file mode 100644 index 000000000000..60c43d95e4e4 --- /dev/null +++ b/database/migrations/2021_08_07_222435_add_markdown_enabled_column_to_companies_table.php @@ -0,0 +1,30 @@ +boolean('markdown_enabled')->default(1); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + + } +}