1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02: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
*/
private $available_imports = [
'account',
'company',
'users',
'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
* @throws Exception

View File

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

View File

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

View File

@ -146,6 +146,7 @@ class CompanyTransformer extends EntityTransformer
'invoice_task_documents' => (bool) $company->invoice_task_documents,
'show_tasks_table' => (bool) $company->show_tasks_table,
'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 ?: '',
'status_id' => $this->encodePrimaryKey($task->status_id) ?: '',
'status_sort_order' => (int) $task->status_sort_order,
'is_date_based' => (bool) $task->is_date_based,
];
}
}