diff --git a/app/Models/Company.php b/app/Models/Company.php index efa36e138ee5..f13ec767538a 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -45,6 +45,8 @@ class Company extends BaseModel protected $presenter = CompanyPresenter::class; protected $fillable = [ + 'hide_empty_columns_on_pdf', + 'calculate_expense_tax_by_amount', 'invoice_expense_documents', 'invoice_task_documents', 'show_tasks_table', diff --git a/app/Transformers/CompanyTransformer.php b/app/Transformers/CompanyTransformer.php index f41c4bddcb46..dae894cb95f7 100644 --- a/app/Transformers/CompanyTransformer.php +++ b/app/Transformers/CompanyTransformer.php @@ -148,6 +148,8 @@ class CompanyTransformer extends EntityTransformer 'use_credits_payment' => 'always', //todo remove 'default_task_is_date_based' => (bool)$company->default_task_is_date_based, 'enable_product_discount' => (bool)$company->enable_product_discount, + 'calculate_expense_tax_by_amount' =>(bool)$company->calculate_expense_tax_by_amount, + 'hide_empty_columns_on_pdf' => (bool) $company->hide_empty_columns_on_pdf, ]; } diff --git a/database/migrations/2021_01_05_013203_improve_decimal_resolution.php b/database/migrations/2021_01_05_013203_improve_decimal_resolution.php index 8bf01ff58e0c..5165091e075b 100644 --- a/database/migrations/2021_01_05_013203_improve_decimal_resolution.php +++ b/database/migrations/2021_01_05_013203_improve_decimal_resolution.php @@ -97,6 +97,11 @@ class ImproveDecimalResolution extends Migration $table->decimal('amount', 20, 6)->change(); }); + Schema::table('clients', function (Blueprint $table) { + $table->decimal('balance', 20, 6)->change(); + $table->decimal('paid_to_date', 20, 6)->change(); + $table->decimal('credit_balance', 20, 6)->change(); + }); Schema::table('tasks', function (Blueprint $table) { $table->decimal('rate', 20, 6)->change(); @@ -105,6 +110,11 @@ class ImproveDecimalResolution extends Migration Schema::table('tax_rates', function (Blueprint $table) { $table->decimal('rate', 20, 6)->change(); }); + + Schema::table('companies', function (Blueprint $table) { + $table->boolean('calculate_expense_tax_by_amount')->false(); + $table->boolean('hide_empty_columns_on_pdf')->false(); + }); } /**