mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Additional logging
This commit is contained in:
parent
b8365d94f8
commit
5be8910c38
@ -210,11 +210,16 @@ class CompanyImport implements ShouldQueue
|
||||
|
||||
if($this->company->account->isFreeHostedClient()){
|
||||
|
||||
nlog("This is a free account");
|
||||
nlog("Backup user count = ".count($backup_users));
|
||||
|
||||
if(count($backup_users) > 1){
|
||||
$this->message = 'Only one user can be in the import for a Free Account';
|
||||
$this->pre_flight_checks_pass = false;
|
||||
}
|
||||
|
||||
nlog("backup users email = " . $backup_users[0]->email);
|
||||
|
||||
if(count($backup_users) == 1 && $company_owner->email != $backup_users[0]->email) {
|
||||
$this->message = 'Account emails do not match. Account owner email must match backup user email';
|
||||
$this->pre_flight_checks_pass = false;
|
||||
@ -226,6 +231,8 @@ class CompanyImport implements ShouldQueue
|
||||
|
||||
$existing_user_count = count(array_intersect($backup_users_emails, $company_users_emails));
|
||||
|
||||
nlog("existing user count = {$existing_user_count}");
|
||||
|
||||
if($existing_user_count > 1){
|
||||
|
||||
if($this->account->plan == 'pro'){
|
||||
@ -249,6 +256,8 @@ class CompanyImport implements ShouldQueue
|
||||
|
||||
if($this->company->account->isFreeHostedClient() && count($this->backup_file->clients) > config('ninja.quotas.free.clients')){
|
||||
|
||||
nlog("client quota busted");
|
||||
|
||||
$client_count = count($this->backup_file->clients);
|
||||
|
||||
$client_limit = config('ninja.quotas.free.clients');
|
||||
|
Loading…
Reference in New Issue
Block a user