1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Migrate white label license

This commit is contained in:
David Bomba 2020-12-15 08:52:14 +11:00
parent ed20f2c4bc
commit 864892a7d2
5 changed files with 12 additions and 0 deletions

View File

@ -104,6 +104,7 @@ class Import implements ShouldQueue
* @var array * @var array
*/ */
private $available_imports = [ private $available_imports = [
'account',
'company', 'company',
'users', 'users',
'payment_terms', 'payment_terms',
@ -225,6 +226,13 @@ class Import implements ShouldQueue
}); });
} }
private function processAccount(array $data) :void
{
$account = $this->company->account;
$account->fill($data);
$account->save();
}
/** /**
* @param array $data * @param array $data
* @throws Exception * @throws Exception

View File

@ -79,6 +79,7 @@ class Company extends BaseModel
'invoice_task_timelog', 'invoice_task_timelog',
'auto_start_tasks', 'auto_start_tasks',
'is_disabled', 'is_disabled',
'default_task_is_date_based',
]; ];
protected $hidden = [ protected $hidden = [

View File

@ -38,6 +38,7 @@ class Task extends BaseModel
'invoice_documents', 'invoice_documents',
'rate', 'rate',
'number', 'number',
'is_date_based',
]; ];
protected $touches = []; protected $touches = [];

View File

@ -146,6 +146,7 @@ class CompanyTransformer extends EntityTransformer
'invoice_task_documents' => (bool) $company->invoice_task_documents, 'invoice_task_documents' => (bool) $company->invoice_task_documents,
'show_tasks_table' => (bool) $company->show_tasks_table, 'show_tasks_table' => (bool) $company->show_tasks_table,
'use_credits_payment' => 'always', //todo remove 'use_credits_payment' => 'always', //todo remove
'default_task_is_date_based' => (bool)$company->default_task_is_date_based,
]; ];
} }

View File

@ -66,6 +66,7 @@ class TaskTransformer extends EntityTransformer
'custom_value4' => $task->custom_value4 ?: '', 'custom_value4' => $task->custom_value4 ?: '',
'status_id' => $this->encodePrimaryKey($task->status_id) ?: '', 'status_id' => $this->encodePrimaryKey($task->status_id) ?: '',
'status_sort_order' => (int) $task->status_sort_order, 'status_sort_order' => (int) $task->status_sort_order,
'is_date_based' => (bool) $task->is_date_based,
]; ];
} }
} }