Move field from company table to settings

This commit is contained in:
David Bomba 2021-01-07 17:08:34 +11:00
parent 2cd5d2d68a
commit 5a840201da
4 changed files with 6 additions and 2 deletions

View File

@ -258,8 +258,10 @@ class CompanySettings extends BaseSettings
public $client_portal_allow_over_payment = false; //@implemented public $client_portal_allow_over_payment = false; //@implemented
public $use_credits_payment = 'off'; //always, option, off //@implemented public $use_credits_payment = 'off'; //always, option, off //@implemented
public $hide_empty_columns_on_pdf = false;
public static $casts = [ public static $casts = [
'hide_empty_columns_on_pdf' => 'bool',
'enable_reminder_endless' => 'bool', 'enable_reminder_endless' => 'bool',
'use_credits_payment' => 'string', 'use_credits_payment' => 'string',
'recurring_invoice_number_pattern' => 'string', 'recurring_invoice_number_pattern' => 'string',

View File

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

View File

@ -149,7 +149,7 @@ class CompanyTransformer extends EntityTransformer
'default_task_is_date_based' => (bool)$company->default_task_is_date_based, 'default_task_is_date_based' => (bool)$company->default_task_is_date_based,
'enable_product_discount' => (bool)$company->enable_product_discount, 'enable_product_discount' => (bool)$company->enable_product_discount,
'calculate_expense_tax_by_amount' =>(bool)$company->calculate_expense_tax_by_amount, 'calculate_expense_tax_by_amount' =>(bool)$company->calculate_expense_tax_by_amount,
'hide_empty_columns_on_pdf' => (bool) $company->hide_empty_columns_on_pdf, 'hide_empty_columns_on_pdf' => false, //@deprecate
]; ];
} }

View File

@ -144,6 +144,9 @@ class ImproveDecimalResolution extends Migration
$table->integer('status_order')->nullable(); $table->integer('status_order')->nullable();
}); });
Schema::table('companies', function (Blueprint $table) {
$table->dropColumn('hide_empty_columns_on_pdf');
});
} }
/** /**